Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(264)

Issue 2549363004: Multiprocess test client: Android child process launcher rework. (Closed)

Created:
4 years ago by Jay Civelli
Modified:
3 years, 11 months ago
CC:
Aaron Boodman, abarth-chromium, agrieve+watch_chromium.org, chromium-reviews, darin (slow to review), darin-cc_chromium.org, jam, jbudorick+watch_chromium.org, mikecase+watch_chromium.org, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, vmpstr+watch_chromium.org, yzshen+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Multiprocess test client: Android child process launcher rework. Changing the way test start child processese on Android. Forking natively should not be used on Andoid, instead child processes should be started through the Android framework, which requires going to Java and using Android services. For that we introduce the MultiprocessTestClientLauncher java class which starts a service in a new process. We provide several MultiprocessTestClientService service classes to ensure we can have multiple child processes. File descriptor are passed from the parent to the child process as Parcelable, and we use the GlobalDescriptors class to register them. TEST=Run the mojo_system_unittests BUG=666356 Review-Url: https://codereview.chromium.org/2549363004 Cr-Commit-Position: refs/heads/master@{#441799} Committed: https://chromium.googlesource.com/chromium/src/+/5513e4622febbc838dfebddb51347ab797747836

Patch Set 1 #

Patch Set 2 : Fixed FD passing. #

Patch Set 3 : Fixed random IDs and main function. #

Patch Set 4 : Added missing header file. #

Patch Set 5 : Fix for tests. #

Patch Set 6 : Clean-up #

Patch Set 7 : Fix dependencies. #

Patch Set 8 : Fixed tests #

Total comments: 8

Patch Set 9 : Addressed comments #

Patch Set 10 : Sublime ate my channel_pair change... #

Total comments: 70

Patch Set 11 : Addressed comments #

Patch Set 12 : Bot fixing #

Patch Set 13 : More bot fixing. #

Total comments: 6

Patch Set 14 : Addressed comments + synced #

Total comments: 26

Patch Set 15 : Addressed rsesek@'s comments #

Patch Set 16 : Synced #

Patch Set 17 : Addressed more rsesek@'s comments. #

Patch Set 18 : Removed unused include. #

Total comments: 8

Patch Set 19 : Addressed rsesek@'s comments #

Patch Set 20 : Fixed content_unittests + synced #

Patch Set 21 : content_unittests + sync #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1061 lines, -510 lines) Patch
M android_webview/test/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +0 lines, -1 line 0 comments Download
M base/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +5 lines, -0 lines 0 comments Download
M base/debug/proc_maps_linux_unittest.cc View 1 2 3 4 5 6 7 8 1 chunk +4 lines, -0 lines 0 comments Download
M base/files/file_locking_unittest.cc View 1 2 3 4 5 6 2 chunks +3 lines, -3 lines 0 comments Download
M base/posix/global_descriptors.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +0 lines, -11 lines 0 comments Download
M base/process/process.h View 1 2 3 4 1 chunk +2 lines, -2 lines 0 comments Download
M base/process/process_posix.cc View 1 2 3 4 1 chunk +2 lines, -2 lines 0 comments Download
M base/process/process_util_unittest.cc View 1 2 3 4 3 chunks +6 lines, -15 lines 0 comments Download
M base/process/process_win.cc View 1 2 3 4 1 chunk +2 lines, -2 lines 0 comments Download
M base/test/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 5 chunks +66 lines, -3 lines 0 comments Download
A base/test/android/java/src/org/chromium/base/FileDescriptorInfo.aidl View 1 chunk +7 lines, -0 lines 0 comments Download
A base/test/android/java/src/org/chromium/base/FileDescriptorInfo.java View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +58 lines, -0 lines 0 comments Download
A base/test/android/java/src/org/chromium/base/ITestClient.aidl View 1 2 3 4 5 6 7 8 9 10 1 chunk +45 lines, -0 lines 0 comments Download
A base/test/android/java/src/org/chromium/base/MainReturnCodeResult.aidl View 1 chunk +7 lines, -0 lines 0 comments Download
A base/test/android/java/src/org/chromium/base/MainReturnCodeResult.java View 1 2 3 4 5 6 7 8 9 10 1 chunk +64 lines, -0 lines 0 comments Download
A base/test/android/java/src/org/chromium/base/MultiprocessTestClientLauncher.java View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +293 lines, -0 lines 0 comments Download
A base/test/android/java/src/org/chromium/base/MultiprocessTestClientService.java View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +147 lines, -0 lines 0 comments Download
A base/test/android/java/src/org/chromium/base/MultiprocessTestClientService0.java View 1 chunk +10 lines, -0 lines 0 comments Download
A base/test/android/java/src/org/chromium/base/MultiprocessTestClientService1.java View 1 chunk +10 lines, -0 lines 0 comments Download
A base/test/android/java/src/org/chromium/base/MultiprocessTestClientService2.java View 1 chunk +10 lines, -0 lines 0 comments Download
A base/test/android/java/src/org/chromium/base/MultiprocessTestClientService3.java View 1 chunk +10 lines, -0 lines 0 comments Download
A base/test/android/java/src/org/chromium/base/MultiprocessTestClientService4.java View 1 chunk +10 lines, -0 lines 0 comments Download
A base/test/android/multiprocess_test_client_service.h View 1 chunk +18 lines, -0 lines 0 comments Download
A base/test/android/multiprocess_test_client_service.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +59 lines, -0 lines 0 comments Download
A base/test/android/test_support_jni_registrar.h View 1 2 3 4 5 1 chunk +21 lines, -0 lines 0 comments Download
A base/test/android/test_support_jni_registrar.cc View 1 chunk +24 lines, -0 lines 0 comments Download
A base/test/main_stub.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +12 lines, -0 lines 0 comments Download
M base/test/multiprocess_test.h View 1 2 3 4 3 chunks +16 lines, -19 lines 0 comments Download
M base/test/multiprocess_test.cc View 1 2 3 4 1 chunk +13 lines, -0 lines 0 comments Download
M base/test/multiprocess_test_android.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +56 lines, -420 lines 0 comments Download
M base/test/test_support_android.cc View 1 chunk +0 lines, -3 lines 0 comments Download
M build/android/pylib/gtest/gtest_test_instance.py View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 20 1 chunk +10 lines, -1 line 0 comments Download
M components/test_runner/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +4 lines, -0 lines 0 comments Download
M content/browser/memory/memory_coordinator_impl_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +8 lines, -1 line 0 comments Download
M content/shell/android/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 2 chunks +2 lines, -0 lines 0 comments Download
M ipc/run_all_unittests.cc View 5 6 7 8 1 chunk +0 lines, -3 lines 0 comments Download
M mojo/android/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +2 lines, -1 line 0 comments Download
M mojo/edk/embedder/platform_channel_pair.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -0 lines 0 comments Download
M mojo/edk/embedder/platform_channel_pair_posix.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 5 chunks +26 lines, -1 line 0 comments Download
M mojo/edk/test/multiprocess_test_helper.cc View 1 2 3 4 1 chunk +2 lines, -8 lines 0 comments Download
M mojo/edk/test/run_all_perftests.cc View 5 6 7 8 1 chunk +0 lines, -4 lines 0 comments Download
M mojo/edk/test/run_all_unittests.cc View 3 4 5 6 7 8 1 chunk +0 lines, -4 lines 0 comments Download
M net/android/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +1 line, -0 lines 0 comments Download
M testing/android/native_test/java/AndroidManifest.xml.jinja2 View 1 2 3 4 5 6 7 8 9 10 1 chunk +12 lines, -0 lines 0 comments Download
M testing/android/native_test/native_test_launcher.cc View 1 2 3 4 5 6 7 8 2 chunks +4 lines, -2 lines 0 comments Download
M testing/test.gni View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 3 chunks +9 lines, -4 lines 0 comments Download

Messages

Total messages: 112 (74 generated)
Jay Civelli
4 years ago (2016-12-07 19:31:02 UTC) #7
Jay Civelli
Last failing tests should be fixed. Ready for review.
4 years ago (2016-12-12 20:15:40 UTC) #21
Ken Rockot(use gerrit already)
Looks great, but we'll need to do something different for the child process entry point. ...
4 years ago (2016-12-12 22:23:08 UTC) #25
Jay Civelli
https://codereview.chromium.org/2549363004/diff/140001/base/test/android/java/src/org/chromium/base/MultiprocessTestClientLauncher.java File base/test/android/java/src/org/chromium/base/MultiprocessTestClientLauncher.java (right): https://codereview.chromium.org/2549363004/diff/140001/base/test/android/java/src/org/chromium/base/MultiprocessTestClientLauncher.java#newcode33 base/test/android/java/src/org/chromium/base/MultiprocessTestClientLauncher.java:33: // Not supposed to be instanciated. On 2016/12/12 22:23:08, ...
4 years ago (2016-12-13 18:23:26 UTC) #28
Ken Rockot(use gerrit already)
LGTM. I'll leave it up to a base owner to decide whether this main stub ...
4 years ago (2016-12-13 18:36:17 UTC) #29
nyquist
https://codereview.chromium.org/2549363004/diff/180001/base/test/android/java/src/org/chromium/base/FileDescriptorInfo.java File base/test/android/java/src/org/chromium/base/FileDescriptorInfo.java (right): https://codereview.chromium.org/2549363004/diff/180001/base/test/android/java/src/org/chromium/base/FileDescriptorInfo.java#newcode19 base/test/android/java/src/org/chromium/base/FileDescriptorInfo.java:19: public final int mId; Nit: Could you describe what ...
4 years ago (2016-12-13 20:40:32 UTC) #34
Jay Civelli
https://codereview.chromium.org/2549363004/diff/180001/base/test/android/java/src/org/chromium/base/FileDescriptorInfo.java File base/test/android/java/src/org/chromium/base/FileDescriptorInfo.java (right): https://codereview.chromium.org/2549363004/diff/180001/base/test/android/java/src/org/chromium/base/FileDescriptorInfo.java#newcode19 base/test/android/java/src/org/chromium/base/FileDescriptorInfo.java:19: public final int mId; On 2016/12/13 20:40:30, nyquist wrote: ...
4 years ago (2016-12-14 02:20:12 UTC) #35
nyquist
lgtm https://codereview.chromium.org/2549363004/diff/180001/base/test/android/java/src/org/chromium/base/MultiprocessTestClientLauncher.java File base/test/android/java/src/org/chromium/base/MultiprocessTestClientLauncher.java (right): https://codereview.chromium.org/2549363004/diff/180001/base/test/android/java/src/org/chromium/base/MultiprocessTestClientLauncher.java#newcode29 base/test/android/java/src/org/chromium/base/MultiprocessTestClientLauncher.java:29: private static final String TAG = "MultiprocTCLauncher"; On ...
4 years ago (2016-12-14 23:26:18 UTC) #48
Jay Civelli
https://codereview.chromium.org/2549363004/diff/240001/base/test/android/java/src/org/chromium/base/MultiprocessTestClientLauncher.java File base/test/android/java/src/org/chromium/base/MultiprocessTestClientLauncher.java (right): https://codereview.chromium.org/2549363004/diff/240001/base/test/android/java/src/org/chromium/base/MultiprocessTestClientLauncher.java#newcode143 base/test/android/java/src/org/chromium/base/MultiprocessTestClientLauncher.java:143: public void onServiceDisconnected(ComponentName className) { On 2016/12/14 23:26:18, nyquist ...
4 years ago (2016-12-15 01:28:14 UTC) #49
Jay Civelli
Adding OWNER reviewers: boliu@ could you look at android_webview/test/BUILD.gn thakis@ could you look at base/ ...
4 years ago (2016-12-15 01:36:17 UTC) #51
boliu
https://codereview.chromium.org/2549363004/diff/260001/android_webview/test/BUILD.gn File android_webview/test/BUILD.gn (left): https://codereview.chromium.org/2549363004/diff/260001/android_webview/test/BUILD.gn#oldcode267 android_webview/test/BUILD.gn:267: "//base:base_java_test_support", this change seems totally unrelated to this CL? ...
4 years ago (2016-12-15 01:43:02 UTC) #52
Nico
I won't get to this until Friday.
4 years ago (2016-12-15 01:46:00 UTC) #53
sdefresne
components/test_runner/BUILD.gn LG but can we see a try run on android?
4 years ago (2016-12-15 11:50:50 UTC) #54
Jay Civelli
https://codereview.chromium.org/2549363004/diff/260001/android_webview/test/BUILD.gn File android_webview/test/BUILD.gn (left): https://codereview.chromium.org/2549363004/diff/260001/android_webview/test/BUILD.gn#oldcode267 android_webview/test/BUILD.gn:267: "//base:base_java_test_support", On 2016/12/15 01:43:02, boliu wrote: > this change ...
4 years ago (2016-12-16 16:59:52 UTC) #57
boliu
https://codereview.chromium.org/2549363004/diff/260001/android_webview/test/BUILD.gn File android_webview/test/BUILD.gn (left): https://codereview.chromium.org/2549363004/diff/260001/android_webview/test/BUILD.gn#oldcode267 android_webview/test/BUILD.gn:267: "//base:base_java_test_support", On 2016/12/16 16:59:52, Jay Civelli wrote: > On ...
4 years ago (2016-12-16 17:13:41 UTC) #58
Jay Civelli
Adding dcheng@ for base OWNER review (base/test has already been OWNER reviewed by nyquist@)
4 years ago (2016-12-20 18:50:03 UTC) #62
Jay Civelli
On 2016/12/15 11:50:50, sdefresne wrote: > components/test_runner/BUILD.gn LG but can we see a try run ...
4 years ago (2016-12-20 18:50:57 UTC) #63
Dirk Pranke
testing/test.gni lgtm . let me know if there's anything else you wanted me to review.
4 years ago (2016-12-20 20:26:23 UTC) #64
Robert Sesek
dcheng@ pointed me at this. A few comments below. https://codereview.chromium.org/2549363004/diff/260001/base/posix/global_descriptors.h File base/posix/global_descriptors.h (right): https://codereview.chromium.org/2549363004/diff/260001/base/posix/global_descriptors.h#newcode76 base/posix/global_descriptors.h:76: ...
4 years ago (2016-12-20 20:44:35 UTC) #66
Jay Civelli
https://codereview.chromium.org/2549363004/diff/260001/base/posix/global_descriptors.h File base/posix/global_descriptors.h (right): https://codereview.chromium.org/2549363004/diff/260001/base/posix/global_descriptors.h#newcode76 base/posix/global_descriptors.h:76: // Generates a random key and uses it to ...
4 years ago (2016-12-20 23:07:27 UTC) #67
Robert Sesek
https://codereview.chromium.org/2549363004/diff/260001/base/posix/global_descriptors.h File base/posix/global_descriptors.h (right): https://codereview.chromium.org/2549363004/diff/260001/base/posix/global_descriptors.h#newcode76 base/posix/global_descriptors.h:76: // Generates a random key and uses it to ...
4 years ago (2016-12-21 19:26:07 UTC) #68
Jay Civelli
https://codereview.chromium.org/2549363004/diff/260001/base/posix/global_descriptors.h File base/posix/global_descriptors.h (right): https://codereview.chromium.org/2549363004/diff/260001/base/posix/global_descriptors.h#newcode76 base/posix/global_descriptors.h:76: // Generates a random key and uses it to ...
4 years ago (2016-12-21 22:26:24 UTC) #69
Robert Sesek
LGTM w/ a few nits https://codereview.chromium.org/2549363004/diff/340001/base/test/android/java/src/org/chromium/base/MultiprocessTestClientService.java File base/test/android/java/src/org/chromium/base/MultiprocessTestClientService.java (right): https://codereview.chromium.org/2549363004/diff/340001/base/test/android/java/src/org/chromium/base/MultiprocessTestClientService.java#newcode84 base/test/android/java/src/org/chromium/base/MultiprocessTestClientService.java:84: return true; Any reason ...
3 years, 12 months ago (2016-12-22 23:21:54 UTC) #74
Jay Civelli
https://codereview.chromium.org/2549363004/diff/340001/base/test/android/java/src/org/chromium/base/MultiprocessTestClientService.java File base/test/android/java/src/org/chromium/base/MultiprocessTestClientService.java (right): https://codereview.chromium.org/2549363004/diff/340001/base/test/android/java/src/org/chromium/base/MultiprocessTestClientService.java#newcode84 base/test/android/java/src/org/chromium/base/MultiprocessTestClientService.java:84: return true; On 2016/12/22 23:21:53, Robert Sesek wrote: > ...
3 years, 12 months ago (2016-12-22 23:44:41 UTC) #75
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2549363004/360001
3 years, 12 months ago (2016-12-22 23:45:22 UTC) #78
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/331989)
3 years, 12 months ago (2016-12-22 23:54:44 UTC) #80
dcheng
On 2016/12/22 23:54:44, commit-bot: I haz the power wrote: > Try jobs failed on following ...
3 years, 12 months ago (2016-12-22 23:55:56 UTC) #81
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2549363004/360001
3 years, 12 months ago (2016-12-22 23:58:21 UTC) #83
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/332005)
3 years, 12 months ago (2016-12-23 00:06:33 UTC) #85
Jay Civelli
Adding eroman@ for /net OWNERS review.
3 years, 12 months ago (2016-12-23 00:08:15 UTC) #87
eroman
net LGTM
3 years, 12 months ago (2016-12-23 00:21:48 UTC) #88
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2549363004/360001
3 years, 12 months ago (2016-12-23 00:32:44 UTC) #90
commit-bot: I haz the power
Try jobs failed on following builders: android_n5x_swarming_rel on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_n5x_swarming_rel/builds/91293)
3 years, 12 months ago (2016-12-23 02:55:39 UTC) #92
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2549363004/380001
3 years, 11 months ago (2017-01-04 23:39:35 UTC) #103
commit-bot: I haz the power
Try jobs failed on following builders: android_n5x_swarming_rel on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_n5x_swarming_rel/builds/93974)
3 years, 11 months ago (2017-01-05 00:57:00 UTC) #105
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2549363004/400001
3 years, 11 months ago (2017-01-05 18:05:17 UTC) #108
commit-bot: I haz the power
Committed patchset #21 (id:400001) as https://chromium.googlesource.com/chromium/src/+/5513e4622febbc838dfebddb51347ab797747836
3 years, 11 months ago (2017-01-06 01:42:22 UTC) #111
Jay Civelli
3 years, 11 months ago (2017-01-06 02:15:43 UTC) #112
Message was sent while issue was closed.
A revert of this CL (patchset #21 id:400001) has been created in
https://codereview.chromium.org/2613183002/ by jcivelli@chromium.org.

The reason for reverting is: Breaks build on Android Cronet ARM64 Builder (dbg).

Powered by Google App Engine
This is Rietveld 408576698