History log of /system/update_engine/payload_consumer/postinstall_runner_action_unittest.cc
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
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/postinstall_runner_action_unittest.cc
d853730826e02647dee6ac818ceef73a4d0e57f0 10-Jun-2016 Alex Deymo <deymo@google.com> Add a few more unittest for parsing global_progress.

Postinstall program can occasionally return garbage instead of a
fraction. Add two more test cases.

Bug: None
TEST=unittests still pass.

Change-Id: Ia444acada78eaa124c618b68d3f0880b2348c8f6
/system/update_engine/payload_consumer/postinstall_runner_action_unittest.cc
fb905d9b8d49f8fe41297c7aba2dd0942f1be311 04-Jun-2016 Alex Deymo <deymo@google.com> Implement powerwash on Android.

Powerwash, the name for the equivalent of a factory reset or /data wipe,
can be triggered in Android by writing the desired command to the
recovery command file and rebooting into recovery.

This patch moves the powerwash scheduling/canceling logic to the
HardwareInterface and implements it on Android.

Bug: 28700985
TEST=Called update_engine_client passing POWERWASH=1, BCB is stored up
to offset 832.

Change-Id: If737fd4b9b3e2ed9bce709b3b59f22e9f0a3dc9a
/system/update_engine/payload_consumer/postinstall_runner_action_unittest.cc
371615b025bdd8106faf65c1ba7439a1236f21bc 14-Apr-2016 Sen Jiang <senj@google.com> Remove utils::MakeTempDirectory().

In favor of base::ScopedTempDir, except for PostinstallRunnerAction,
where the temp directory needs to be removed for every partition.

ScopedDirRemover is also removed because it's no longer used.

Test: ./update_engine_unittests
Test: cros_workon_make update_engine --test
Bug: 26955860

Change-Id: I954e6e892aff0cf9f8434a77408dc3c9eb64c1b5
/system/update_engine/payload_consumer/postinstall_runner_action_unittest.cc
fa458ece418924a0e3dd4d6400a884e3c628c100 11-Apr-2016 Alex Deymo <deymo@google.com> Remove postinstall unittests root check.

Not all the postinstall tests need to be runned as root. Remove the
global check.

Bug: None
TEST=FEATURES=test emerge-link update_engine

Change-Id: I269e413a26ec84022448e64b34a5ee795b5a6e31
/system/update_engine/payload_consumer/postinstall_runner_action_unittest.cc
0d29854cf5bb05a22cf161b50052539aa420a36e 31-Mar-2016 Alex Deymo <deymo@google.com> Parse postinstall program progress updates.

In Android postinstall is expected to take a long time in common cases.
This patch allows the postinstall program to report back to the updater
a progress indication, which will then be forwarded to all the clients
listening. These progress updates are part of the FINALIZING status.

Bug: 27880754
TEST=Added unittests. Deployed an update to an edison-eng and post-install reported progress back with the postinstall_example.

Change-Id: I35f96b92f090219c54cca48d8ab07c54cf8b4ab1
/system/update_engine/payload_consumer/postinstall_runner_action_unittest.cc
260f03bc4d3a3de436e056c686c814444358823a 21-Mar-2016 Sen Jiang <senj@google.com> Fix unittest key path in Brillo.

The unittests weren't able to find the keys if it's not run from the
update_engine_unittests directory.

Test: /data/nativetest/update_engine_unittests/update_engine_unittests
Bug: 26955860

Change-Id: I4c189cca2714986d3d2b2669b54a5dff9a488964
/system/update_engine/payload_consumer/postinstall_runner_action_unittest.cc
d15c546ed794293d0a63770467a0f3c4c84c6214 10-Mar-2016 Alex Deymo <deymo@google.com> Implement susped, resume and cancel for the Postinstall action.

This patch sends SIGSTOP/SIGCONT to the running postinstall program to
suspend/resume the child process, and SIGKILL when cancelling it.

Bug: 27272144
TEST=Added unittest to check the signal being sent.

Change-Id: Iebe9bd34448ad1d0a5340c82e1fd839ff8c69dd2
/system/update_engine/payload_consumer/postinstall_runner_action_unittest.cc
cbc2274c4160805bf726df872390112654816ca7 05-Mar-2016 Alex Deymo <deymo@google.com> Rework postinstall unittests to pass on Android.

Postinstall unittests were creating and mounting an image on each test
run. This patch adds several test scripts to one of the pre-generated
images and uses that image during postinstall testing instead.

To workaround problems with mount/umount of loop devices on Android,
this patch rewrites the `losetup` logic to make the appropriate
syscalls and create the loop device with mknod if it doesn't exists.

The tests require some extra SELinux policies to run in enforcing mode.

Bug: 26955860
TEST=Ran all Postinstall unittests.

Change-Id: I47a56b80b97596bc65ffe30cbc8118f05faff0ae
/system/update_engine/payload_consumer/postinstall_runner_action_unittest.cc
390efedcb7e17587da765b6d682077cb7fa46ee1 18-Feb-2016 Alex Deymo <deymo@google.com> Parse postinstall parameters from the payload metadata.

Payload v2 includes a description of the post-install command it should
run, while in payload v1 we use the default values. This patch mounts
the partition on the new top-level directory called /postinstall that
should already be created.

Bug: 27177071
TEST=FEATURES=test emerge-link update_engine

Change-Id: Iaedf3b01e5e1ad57c68bd316b4b6e79cbab35bb6
/system/update_engine/payload_consumer/postinstall_runner_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/postinstall_runner_action_unittest.cc
b15a0b8eaf18c9e9341706df9f4ab59ce595a67c 26-Nov-2015 Alex Deymo <deymo@google.com> Remove SystemState from post-install step.

The post-install action only requires to mark the new slot as ready,
for which it was including a reference to the whole SystemState. This
patch removes said dependency replacing it for just the
BootControlInterface.

Bug: 25773375
TEST=FEATURES=test emerge-link update_engine; mma

Change-Id: I814d47c138c7565e9a80f316f25e124adb0d9c4e
/system/update_engine/payload_consumer/postinstall_runner_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/postinstall_runner_action_unittest.cc