ba2213a53e110e127ebab4fc27e8af06a3ca6602 |
|
28-Feb-2018 |
Sen Jiang <senj@google.com> |
Fix P2PDownloadActionTest. DownloadAction is now always using MultiRangeHttpFetcher, so had to implement MultiRangeHttpFetcher::SetOffset() for unittest. Bug: 73949420 Test: tests pass Change-Id: I4ced2431e6a649402a318d601c384e998ef96b47
/system/update_engine/payload_consumer/download_action_unittest.cc
|
1841408827c93f8ba7bb44ba95a8fb3438762b9d |
|
11-Jan-2018 |
Sen Jiang <senj@google.com> |
Merge remote-tracking branch 'goog/upstream-master'. The following commits were reverted: 840703a Fix update over cellular network on guest account eaad5d0 Do not merge to AOSP: Fixes the link to brillo-clang-format in CrOS 740efad Reboot even if a system update is not available. Fixed a few sign compare warnings. Had to ifdef out 2 SquashfsFilesystemTest because it depends on unsquashfs -m. Test: update_engine_unittests Change-Id: I6f4ca5003e78c76064ec60d0797505d8c18d00bf Merged-In: I6f4ca5003e78c76064ec60d0797505d8c18d00bf
|
2b9d2417722cd4052b0e22494886f93c5b4ef042 |
|
13-Dec-2017 |
Hidehiko Abe <hidehiko@google.com> |
update_engine: Update libchrome APIS to r456626. The new libchrome has been ported from Chromium and some APIs have changed. Make necessary changes at call sites. BUG=chromium:724678 CQ-DEPEND=CL:480928 Test: Build. Change-Id: I01b70da87521d0884ed21acbd7ed3e0ff1e94357 Merged-In: I4dbaea4a2a19031375a8bf2415645a4f226dab57
/system/update_engine/payload_consumer/download_action_unittest.cc
|
cd7edbe3eeff0b4379649eea8308c325882407ff |
|
19-Sep-2017 |
Amin Hassani <ahassani@google.com> |
update_engine: Replace vector<Extent> with RepeatedPtrField<Extent> This patch removes references to vector<Extent> and replaces them with RepeatedPtrField in payload_consumer. Extent itself is a protobuf item and it makes sense to use google::protobuf::RepeatedPtrField instead of vector because then we won't have any extra copy to vector. We can directly use the list of extents given in the payload protobuf. Also removed references to vector in files which did not use vector. BUG=chromium:766397 TEST=FEATURES="test" emerge-amd64-generic update_engine Change-Id: I1f12332ff4d6303c1e4b7470bb87bf934acdf81a Reviewed-on: https://chromium-review.googlesource.com/672006 Commit-Ready: Amin Hassani <ahassani@chromium.org> Tested-by: Amin Hassani <ahassani@chromium.org> Reviewed-by: Ben Chan <benchan@chromium.org>
/system/update_engine/payload_consumer/download_action_unittest.cc
|
9321f501029e7c0fdca55db3a79c9dcb24e4a767 |
|
07-Sep-2017 |
Aaron Wood <aaronwood@google.com> |
Track bytes received across multiple update files When downloading the packages that comprise a multi-package or multi-app update, the UpdateAttempter receives BytesReceived() callbacks with bytes_received resetting to 0 for each file. This causes the progress calculations to be incorrect. This change tracks the total of the previously downloaded packages within the DownloadAction, so that it properly tracks. Resumed downloads will jump ahead over skipped data, when the payload is incremented. Bug: 65451460 Tests: Added unit tests to directly test the accumulation and the the transition from the previous state to UpdateStatus::DOWNLOADING when the first bytes are received. Change-Id: I3b540df16b9a664b09f53ee3ec962e2cbc8adf1b (cherry picked from commit d6f869dbd9952be8a926e80c4f1e172845ab8d5f)
/system/update_engine/payload_consumer/download_action_unittest.cc
|
7ecda265a87236e83cf820364947a1618872b6be |
|
12-Jul-2017 |
Amin Hassani <ahassani@google.com> |
Open partitions with O_DSYNC flag only if the update is periodic. Currently when updating we always open the target partition with flag O_DSYNC (CL:562552), but this makes all infrastructure operations like 'cros flash', provisioning, force update, paygen, etc much slower. This changes the update engine to only add O_DSYNC flag if an update is triggered by periodic checks (not interactively forced). This means if the user clicks on 'check for update' it will be an interactive update and O_DSYNC will not be used. This change keeps the AOSP partitions open without O_DSYNC flag. This CL uses non-interactive mode for all unit tests but currently there are no integration test like provisioning for triggering periodic updates. Currently 'parrot' board canaries (only board with rotating HDD) is failing due to timeouts related to slow updates. This CL potentially will clear that problem. TEST=cros_workon_make --test, installed an image with/out the O_DSYCN flag and measured the 'cros flash' time. BUG=chromium:738027 Change-Id: If45fcf5e798b9c9353e09021ad812c859d983a65 Reviewed-on: https://chromium-review.googlesource.com/567360 Commit-Ready: Amin Hassani <ahassani@chromium.org> Tested-by: Amin Hassani <ahassani@chromium.org> Reviewed-by: Grant Grundler <grundler@chromium.org>
/system/update_engine/payload_consumer/download_action_unittest.cc
|
cdd5206c6507fa5c70344c269053d30777f7d674 |
|
19-May-2017 |
Sen Jiang <senj@google.com> |
Support IsDeltaPayload per <package>. Mixed full and delta payloads are now supported for multi-payload. Bug: 36252799 Test: update_engine_unittests Change-Id: Ic519f8399579c714a65ba9f9f948a389fcc249ed (cherry picked from commit 4928112f8635f7a5b583171640aee2bda690ba34)
/system/update_engine/payload_consumer/download_action_unittest.cc
|
5ae865b431cc041feed82f1db28a38e99dbd631f |
|
18-Apr-2017 |
Sen Jiang <senj@google.com> |
Resume multiple payloads. DownloadAction will first go through all the already applied payload and only downloading the manifest and filling in partitions info in install plan without applying or downloading any operations. And then resume the partially applied payload using states in prefs. Moved constuction of MultiRangeHttpFetcher from UpdateAttempter to DownloadAction, because we now need to setup the range for every payload, also reduced code duplication. Also fixed download progress for multi payload. Bug: 36252799 Test: stop an update during second payload and resume the update Change-Id: I9ee54a87d15d88c7a14a13575965b19c1773340b (cherry picked from commit 7162b666318cdd6c75b73fa6a0b06b23559de3e5)
/system/update_engine/payload_consumer/download_action_unittest.cc
|
0affc2c099fac47b999ba39f8f1bacb418e65a97 |
|
11-Feb-2017 |
Sen Jiang <senj@google.com> |
Parse multiple packages from Omaha response. The multi-payload info are stored in OmahaResponse and InstallPlan, but we still can only apply the first payload for now. Bug: 36252799 Test: mma -j Test: update_engine_unittests Change-Id: I5ca63944ae9082670d0e67888409374f140d4245 (cherry picked from commit 2aba8a87d4fac245a2e2d238b3159f8eabce630f)
/system/update_engine/payload_consumer/download_action_unittest.cc
|
2703ef4466066d64d8021904e233b120f38c0272 |
|
16-Mar-2017 |
Sen Jiang <senj@google.com> |
Store raw payload hash blob in install plan. We were using a custom sha256 pair in Omaha response, now that Omaha has a standard hash_sha256 field in package, we should use that instead. The difference is that hash_sha256 is encoded in hex instead of base64, but the android payload property is still using base64, to be backward compatible, we have to keep accepting base64 there, to avoid decoding and then re-encoding to another encoding, we store the decoded raw hash. Also removed the hash() related functions in HashCalculator, since it's rarely used and the caller should encode it in whatever encoding they want. Also make use of RawHashOfBytes to simply code in a few places. Bug: 36252799 Test: update_engine_unittests Change-Id: Iaa02611b4c9cda3ead5de51e777e8caba6d99d93 (cherry picked from commit f14d51b6823522f6b2eb834f9e14d72c8363a3ad)
/system/update_engine/payload_consumer/download_action_unittest.cc
|
f1cf34849efdc0158fb1987ba74a51f25016c5bd |
|
19-Jul-2016 |
Luis Hector Chavez <lhchavez@google.com> |
update_engine: Update libchrome APIs to r405848 The new libchrome has been ported from Chromium and some APIs have changed. Make necessary changes at call sites. Notable changes from libchrome: - base::Bind() now explicitly disallows captures in lambdas (which was never allowed in the style guide), so lambdas should now be written in a way that take the captures as parameters. Bug: 29104761 Test: All tests in update_engine_unittest pass on dragonboard-eng build Change-Id: Iec04c126630fd876114076e3cb10cf917c8817b0
/system/update_engine/payload_consumer/download_action_unittest.cc
|
bffa06080ec8bd5d196cbfadf2023f78b6e89169 |
|
13-Feb-2016 |
Alex Deymo <deymo@google.com> |
Fix *ExtentWriterTest unittest. These test were creating local files in the same directory where the test is running from, which doesn't work on Android. This patch leverages other newer temp file creation utilities that also take care of removing the temp files. Bug: 26955860 TEST=/data/nativetest/update_engine_unittests/update_engine_unittests --gtest_filter=*ExtentWriterTest.* Change-Id: If5cd506ae0a7ca85b6fd5395a0982f00775836c7
/system/update_engine/payload_consumer/download_action_unittest.cc
|
5fe0c4ede81b82ae3425ddbbb698eceef14cbc78 |
|
17-Feb-2016 |
Alex Deymo <deymo@google.com> |
Fix unittest build in x86_64. Some size_t values (generally resulting from X.size() calls) were compared to off_t values (such as utils::FileSize()) which resulted in a compile error on x86_64 targets. This patch fixes those issues with explicit casts in the unittests since the range of the expected values is small enough. Bug: 26955860 TEST=`mma` on edison-eng and brilloemulator_x86_64-eng. Change-Id: I2d09d356e1b97ab6527b17596fe20d425da6d519
/system/update_engine/payload_consumer/download_action_unittest.cc
|
80f70ff45f8ea9a679c0c3ed0dc143dd2fe2b63e |
|
11-Feb-2016 |
Alex Deymo <deymo@google.com> |
Build unittests in Brillo. Many unittests do not pass for simple reasons that will be addressed later. This CL includes all the changes to make the unittests build. In particular, the generated DBus mocks, required to build several unittests are now included here. The dbus-constants.h files were moved to the system_api repo, so they can be removed from here. The unittest build is only enabled for Brillo targets, since non-Brillo targets don't even build DBus. Bug: 26955860 TEST=`mmma` on edison-eng (and aosp_arm-eng). Change-Id: Ib38241f0a6eb99b1d60d72db6bcfd125d38e3fad
/system/update_engine/payload_consumer/download_action_unittest.cc
|
64d9878470aa7b388e971862181daf6260851602 |
|
06-Feb-2016 |
Alex Deymo <deymo@google.com> |
Replace is_full_update boolean with a payload_state enum. The "is_full_update" flag in the InstallPlan is required to decide whether we should run a FilesystemVerification step before start downloading the payload (for delta payloads) or not (for full payloads). This step is done before start downloading the payload and not after downloading the metadata to avoid long delays in the connection which would then drop and require a retry. Since the not so recent inclusion of the source_data_hash field in the delta operations, the source data is verified on each operation, so the install plan field and the pre-download FilesystemVerification is not needed anymore. To help deprecate this process, which is not included in the non-Brillo version, this patch changes the is_full_update field to a payload_state enum with a third "unknown" state that will be changed to delta or full once the payload metadata is parsed. Bug: 25631949 TEST=unittests updated. TEST=Pushed a delta update to edison-eng and a non-Brillo target. Change-Id: I17d8bf58990d8465bb8487adc66601f1c1dfca6d
/system/update_engine/payload_consumer/download_action_unittest.cc
|
1b3556cbe66b3f5be35f6117d4013ddc199b064c |
|
03-Feb-2016 |
Alex Deymo <deymo@google.com> |
Allow null SystemState in the DownloadAction. The SystemState is only defined in the libupdate_engine library, so it may not be defined for other users of libpayload_consumer. This patch allows to pass a nullptr for the SystemState while explicitly passing the other classes defined in libpayload_consumer upon construction. Bug: None TEST=FEATURES=test emerge-link update_engine TEST=`mmma system/update_engine` on aosp_arm-eng and edison-eng Change-Id: I535d0184a85e0a167ac65875f6e7c07832efbf40
/system/update_engine/payload_consumer/download_action_unittest.cc
|
542c19bf271011913a9f352f58e140224c936736 |
|
03-Dec-2015 |
Alex Deymo <deymo@google.com> |
Remove SystemState references from DeltaPerformer. DeltaPerformer is used as part of the DownloadAction and had references to the global SystemState. The common references to BootControlInterface (to query the partitions based on the names from the payload) and the HardwareInterface (for dev-mode bits) are now referenced directly from the DeltaPerformer. The calls to UpdateAttempter and PayloadState were moved to the DownloadActionDelegate since these calls are received by classes outside the payload_consumer. Bug: 25773375 TEST=FEATURES=test emerge-link update_engine Change-Id: Id2e81d5ccf835cad22f03b069c681dcce104c456
/system/update_engine/payload_consumer/download_action_unittest.cc
|
22ad86121ba56c576bfcaa23e085dab881bd4ff5 |
|
20-Nov-2015 |
Alex Deymo <deymo@google.com> |
Delete DownloadActionDelegate::SetDownloadStatus() method. This method is only used by the caller to detect a programming error in the DownloadAction (calling BytesReceived when not downloading) and log a message. This patch removes the method from the delegate interface and makes sure it doesn't issue a call to BytesReceived when not activelly downloading. Bug: 25773375 TEST=FEATURES=test emerge-link update_engine Change-Id: I8ff5c53f1fd40c0777b3f6523703a8bee71c019d
/system/update_engine/payload_consumer/download_action_unittest.cc
|
39910dcd1d68987ccee7c3031dc269233a8490bb |
|
10-Nov-2015 |
Alex Deymo <deymo@google.com> |
Split payload application code into a subdirectory. This patch splits from the main libupdate_engine code the part that is strictly used to download and apply a payload into a new static library, moving the code to subdirectories. The new library is divided in two subdirectories: common/ and payload_consumer/, and should not depend on other update_engine files outside those two subdirectories. The main difference between those two is that the common/ tools are more generic and not tied to the payload consumer process, but otherwise they are both compiled together. There are still dependencies from the new libpayload_consumer library into the main directory files and DBus generated files. Those will be addressed in follow up CLs. Bug: 25197634 Test: FEATURES=test emerge-link update_engine; `mm` on Brillo. Change-Id: Id8d0204ea573627e6e26ca9ea17b9592ca95bc23
/system/update_engine/payload_consumer/download_action_unittest.cc
|