Implement minimal set of Mojo platform IPC primitives for Fuchsia

Desktop / Chromium - Wez [chromium.org] - 10 August 2017 12:35 EDT

Previously we were building Mojo IPC against Fuchsia's POSIX emulation layer, in which key APIs (e.g. sendmsg/resvmsg) are not-implemented.

To implement Mojo IPC natively for Fuchsia this CL:- Switches Mojo HandlePassingInformation to map to the Fuchsia-specific base::HandlesToTransferVector (see base/launch_process.h).
- Implements the embedder PlatformChannel[Handle|Pair] classes.
- Implements the Mojo system Channel class.
- Updates the Mojo system core APIs to be aware of Fuchsia handles.
- Updates the MultiprocessTestHelper to be aware of Fuchsia.

The newly-passing tests are removed from the Fuchsia test filters.

Some functionality is notably missing:
- We do not yet support passing of POSIX file-descriptors.
- Stubs out NamedPlatformHandle APIs with NOTREACHED().- We do not yet cope with SHOULD_WAIT on write attempts, because the OS doesn't ever actually return that yet (see https://fuchsia.atlassian.net/browse/MG-894).

Bug: 740791, 749792 Change-Id: If5d8f7d7962e89f8cb2008aa55deac276b309a00 Reviewed-on: https://chromium-review.googlesource.com/604008 Commit-Queue: Wez

9736ba7 Implement minimal set of Mojo platform IPC primitives for Fuchsia.
mojo/edk/embedder/BUILD.gn | 36 ++-
mojo/edk/embedder/embedder_unittest.cc | 6 +
.../named_platform_handle_utils_fuchsia.cc | 28 ++
mojo/edk/embedder/platform_channel_pair.cc | 5 +
mojo/edk/embedder/platform_channel_pair.h | 2 +
mojo/edk/embedder/platform_channel_pair_fuchsia.cc | 82 ++++++
mojo/edk/embedder/platform_handle.cc | 12 +-
mojo/edk/embedder/platform_handle.h | 24 +-
mojo/edk/embedder/platform_handle_utils_fuchsia.cc | 23 ++
mojo/edk/embedder/platform_shared_buffer.cc | 16 +-
mojo/edk/system/BUILD.gn | 41 +--
mojo/edk/system/channel_fuchsia.cc | 322 +++++++++++++++++++++
mojo/edk/system/core.cc | 12 +-
mojo/edk/system/message_unittest.cc | 21 +-
mojo/edk/system/node_controller.cc | 6 +-
mojo/edk/system/node_controller.h | 3 +-
mojo/edk/system/platform_wrapper_unittest.cc | 3 +
mojo/edk/test/BUILD.gn | 7 +-
mojo/edk/test/multiprocess_test_helper.cc | 18 +-
mojo/edk/test/test_utils_fuchsia.cc | 56 ++++
.../runner/host/service_process_launcher.cc | 5 +
testing/buildbot/chromium.fyi.json | 3 +
testing/buildbot/filters/fuchsia.ipc_tests.filter | 10 +-
.../filters/fuchsia.mojo_common_unittests.filter | 5 +
.../filters/fuchsia.mojo_system_unittests.filter | 26 +-
25 files changed, 697 insertions(+), 75 deletions(-)

Upstream: git.chromium.org


  • Share