History log of /system/update_engine/common/subprocess_unittest.cc
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
a78ddf883fe270dfd44ca030dd79eebf4ce22179 30-Mar-2017 Jay Civelli <jcivelli@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: I4dbaea4a2a19031375a8bf2415645a4f226dab57
/system/update_engine/common/subprocess_unittest.cc
ffb30ed63b5a186d4ed62c335d16b3b9467785ee 26-Jul-2017 Luis Hector Chavez <lhchavez@google.com> Revert "update_engine: Update libchrome APIS to r456626."

This reverts commit 663ff4b30b9f629a130ef6d357d462b897d4071e.

Reason for revert: Broke the mac_sdk
Exempt-From-Owner-Approval: Fixing mac_sdk

Change-Id: I8184ec58e74d62dca0deafb39340d4bd36bf40e0
/system/update_engine/common/subprocess_unittest.cc
663ff4b30b9f629a130ef6d357d462b897d4071e 30-Mar-2017 Jay Civelli <jcivelli@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.

Change-Id: I8c3cea4510774c813a5d8fb10240918b5736884e
/system/update_engine/common/subprocess_unittest.cc
70a21191b545c7c9cc3416c17b3e794c77b2e475 11-Jan-2017 Ben Chan <benchan@chromium.org> update_engine: clean up sleep process in SubprocessTest.CancelTest

SubprocessTest.CancelTest terminates a 'sh' process, which is put into
sleep by executing `sleep 60`. Upon receiving SIGTERM, the 'sleep'
process isn't reaped and thus becomes orphaned. As a remedy, this CL
modifies the shell command to trap SIGTERM and kill the 'sleep' process
upon receiving SIGTERM.

BUG=chromium:678643
TEST=Verified that no orphaned 'sleep' process is left after running
SubprocessTest.CancelTest.

Reviewed-on: https://chromium-review.googlesource.com/427059
Commit-Ready: Ben Chan <benchan@chromium.org>
Tested-by: Ben Chan <benchan@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>

(cherry picked from commit efb56850475b27ab9197c6010a3f3910b078cdc2)

Change-Id: I7a94b317b524c6de81e94a1f01c29aeb9b3de85c
/system/update_engine/common/subprocess_unittest.cc
5c6bb1d8f89b87e782e26fe74789b6f510704394 27-Jul-2016 Chih-Hung Hsieh <chh@google.com> Fix clang-tidy performance warnings in update_engine.

* Use const reference type for parameters, local variables,
and for-loop index variables to avoid unnecessary copy.
* Convert some for-loops to for-rang loops.

Bug: 30407689
Bug: 30413223
Bug: 30413862
Change-Id: I78996b3f799639fc57ced45e110807625be7dcce
Test: build with WITH_TIDY=1
/system/update_engine/common/subprocess_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/common/subprocess_unittest.cc
279d57295a39add08d719db4cebe950d56c35164 08-Apr-2016 Alex Deymo <deymo@google.com> Fix PipeClosedWhenNotRedirectedTest.

When checking for a file descriptor open on the child, we now execute a
simple test program that just runs fstat on that file descriptor. This
is more reliable than calling sh on different platforms.

Bug: 26955860
TEST=Ran unittests on edison-eng and Chromium OS.

Change-Id: I5d5d87095564159df1a75e78b0aed29c16bc7eb8
/system/update_engine/common/subprocess_unittest.cc
109c28d570e1259c3d58e711826f8f22afc9e2f4 06-Apr-2016 Alex Deymo <deymo@google.com> Revert "Make transition to "postinstall" domain explicit."

This reverts commit 20e3960e245f6dfa57fa5c9124b0fd33e679f723.

Bug: 28008031

Change-Id: If5fcb949dee91779bea465793ec2b333d27a704e
/system/update_engine/common/subprocess_unittest.cc
20e3960e245f6dfa57fa5c9124b0fd33e679f723 05-Apr-2016 Alex Deymo <deymo@google.com> Make transition to "postinstall" domain explicit.

When running the postinstall program, we were relying on the automatic
transition between update_engine domain and postinstall, which required
postinstall_file to be an entrypoint for such domain. This patch makes
the transition explicit by calling setexeccon(3).

Bug: 28008031
TEST=make dist; Deployed an update to edison-eng: postinstall runs as "postinstall" domain.

Change-Id: I27d404886841e0bd39589f0274eaaf98929eeac9
/system/update_engine/common/subprocess_unittest.cc
e384bb2e403b0f0f666e89d5f6acfaec41120cc5 30-Mar-2016 Alex Deymo <deymo@google.com> Subprocess: Close all unused file descriptors.

This patch extends Subprocess::ExecFlags() method with a list of
file descriptors that should be kept open on the child process and
mapped to a pipe() in the parent. The remaining file descriptors
will be closed.

Bug: 27880754
TEST=Added unittests for this functionality.

Change-Id: Id96fb6a72f7805a0bfacfbc85422dc7d44750d93
/system/update_engine/common/subprocess_unittest.cc
279bbab3740df13c306c1a9e03f3d3beed9aef0f 13-Feb-2016 Alex Deymo <deymo@google.com> Fix Subprocess unittests.

TEST=/data/nativetest/update_engine_unittests/update_engine_unittests --gtest_filter=SubprocessTest.*

Change-Id: Ib4ed3768f81f1c1f476eb832df3b5e1aa80c8814
/system/update_engine/common/subprocess_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/common/subprocess_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/common/subprocess_unittest.cc