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

Issue 2692273008: Hacky slashy (Closed)

Created:
3 years, 10 months ago by scottmg
Modified:
3 years, 7 months ago
CC:
cbentzel+watch_chromium.org, cc-bugs_chromium.org, chromium-apps-reviews_chromium.org, chromium-reviews, chromoting-reviews_chromium.org, darin-cc_chromium.org, dominicc+watchlist_chromium.org, extensions-reviews_chromium.org, jam, jochen+watch_chromium.org, mlamouri+watch-content_chromium.org, net-reviews_chromium.org, Peter Beverloo, tdresser+watch_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Hacky slashy XXX Prototype only - Unzip Fuchsia "core sdk" into third_party/fuchsia-sdk - Copy runtime_lib to clang dir via: $ mkdir third_party/llvm-build/Release+Asserts/lib/clang/5.0.0/lib/fuchsia $ cp third_party/fuchsia-sdk/toolchain_libs/clang/5.0.0/lib/fuchsia/libclang_rt.builtins-x86_64.a third_party/llvm-build/Release+Asserts/lib/clang/5.0.0/lib/fuchsia/libclang_rt.builtins-x86_64.a Then, generate and build as usual: $ gn gen out/fuch --args='target_os="fuchsia" is_debug=true symbol_level=2' --check $ ninja -C out/fuch base_unittests The build generates a wrapper the bundles required binaries and test data into an image and then launches QEMU, sending the output to stdio and then quitting QEMU. $ out/fuch/bin/run_base_unittests

Patch Set 1 #

Patch Set 2 : . #

Patch Set 3 : wip #

Total comments: 5

Patch Set 4 : posixy #

Patch Set 5 : as far as failed link #

Patch Set 6 : base_unittests links #

Patch Set 7 : remove gn asserts #

Patch Set 8 : base_unittests runs and fails horribly #

Patch Set 9 : tidy up required gn flags, use sdk #

Total comments: 7

Patch Set 10 : fixes #

Total comments: 1

Patch Set 11 : start on beginning of runtime deps gen #

Patch Set 12 : much simpler libxml #

Patch Set 13 : more work on test runner #

Patch Set 14 : mostly working test runner #

Total comments: 3

Patch Set 15 : . #

Total comments: 4

Patch Set 16 : make autorun work #

Patch Set 17 : support gtest_filter on run_ script, possible impl of GetProcessExecutablePath #

Patch Set 18 : update and rebase #

Patch Set 19 : . #

Patch Set 20 : update test filter #

Patch Set 21 : update for new sdk rev temporarily pulling files from fuchsia tree #

Patch Set 22 : rebase-4-28 #

Patch Set 23 : updates for files now-included in sdk #

Patch Set 24 : some multiprocess work #

Patch Set 25 : respect wait timeout #

Patch Set 26 : better process handles/fds setup #

Patch Set 27 : make runner script do symbolize #

Patch Set 28 : fix environment inheritance/replacment #

Patch Set 29 : rebase on config CL, and minor fixes #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1034 lines, -46 lines) Patch
M BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 3 chunks +8 lines, -8 lines 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 21 22 23 24 25 26 27 28 5 chunks +44 lines, -3 lines 0 comments Download
M base/base_paths_posix.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 3 chunks +7 lines, -0 lines 0 comments Download
M base/debug/activity_tracker.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +1 line, -1 line 0 comments Download
M base/debug/activity_tracker.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +1 line, -1 line 0 comments Download
M base/debug/debugger_posix.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +7 lines, -0 lines 0 comments Download
A base/debug/stack_trace_fuchsia.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +29 lines, -0 lines 0 comments Download
M base/debug/stack_trace_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +1 line, -1 line 0 comments Download
M base/files/file_enumerator_posix.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +2 lines, -1 line 0 comments Download
M base/files/file_util_posix.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 2 chunks +4 lines, -1 line 0 comments Download
M base/message_loop/message_loop.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 3 chunks +4 lines, -4 lines 0 comments Download
M base/message_loop/message_loop_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 2 chunks +2 lines, -2 lines 0 comments Download
M base/process/kill.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +1 line, -1 line 0 comments Download
A base/process/kill_fuchsia.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +58 lines, -0 lines 0 comments Download
M base/process/launch.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 2 chunks +11 lines, -0 lines 0 comments Download
A base/process/launch_fuchsia.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 1 chunk +116 lines, -0 lines 0 comments Download
M base/process/launch_posix.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +3 lines, -0 lines 0 comments Download
M base/process/memory.cc View 1 2 3 4 5 2 chunks +2 lines, -2 lines 0 comments Download
A base/process/process_fuchsia.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 1 chunk +151 lines, -0 lines 0 comments Download
M base/process/process_handle.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 2 chunks +9 lines, -0 lines 0 comments Download
A base/process/process_handle_fuchsia.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +25 lines, -0 lines 0 comments Download
M base/process/process_info_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +1 line, -1 line 0 comments Download
A base/process/process_iterator_fuchsia.cc View 1 2 3 4 5 1 chunk +27 lines, -0 lines 0 comments Download
M base/process/process_metrics.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 3 chunks +5 lines, -3 lines 0 comments Download
A base/process/process_metrics_fuchsia.cc View 1 2 3 4 5 1 chunk +27 lines, -0 lines 0 comments Download
M base/process/process_metrics_posix.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +3 lines, -0 lines 0 comments Download
M base/process/process_util_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +2 lines, -0 lines 0 comments Download
A base/sys_info_fuchsia.cc View 1 2 3 4 5 1 chunk +14 lines, -0 lines 0 comments Download
M base/task_scheduler/task_scheduler_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 1 chunk +1 line, -1 line 0 comments Download
M base/task_scheduler/task_scheduler_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 1 chunk +1 line, -1 line 0 comments Download
M base/test/launcher/test_launcher.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 6 chunks +21 lines, -4 lines 0 comments Download
M base/test/launcher/unit_test_launcher.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +1 line, -1 line 0 comments Download
A base/threading/platform_thread_fuchsia.cc View 1 2 3 4 5 1 chunk +51 lines, -0 lines 0 comments Download
M base/threading/platform_thread_posix.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +1 line, -1 line 0 comments Download
M base/threading/thread.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 1 chunk +1 line, -1 line 0 comments Download
M base/trace_event/malloc_dump_provider.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 1 chunk +2 lines, -0 lines 0 comments Download
M base/trace_event/memory_allocator_dump_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 1 chunk +3 lines, -2 lines 0 comments Download
M base/trace_event/process_memory_dump.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 2 chunks +5 lines, -0 lines 0 comments Download
M base/trace_event/trace_log.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 1 chunk +1 line, -1 line 0 comments Download
M build/config/compiler/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 2 chunks +3 lines, -1 line 0 comments Download
A build/config/fuchsia/rules.gni View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +76 lines, -0 lines 0 comments Download
A build/fuchsia/create_test_runner_script.py View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +112 lines, -0 lines 0 comments Download
A build/fuchsia/test_runner.py View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 1 chunk +161 lines, -0 lines 0 comments Download
M net/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 2 chunks +3 lines, -3 lines 0 comments Download
M testing/test.gni View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 3 chunks +25 lines, -0 lines 0 comments Download
M third_party/libxml/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 1 chunk +1 line, -1 line 0 comments Download

Depends on Patchset:

Messages

Total messages: 44 (28 generated)
cpu_(ooo_6.6-7.5)
I expected to look worse :) I think we have libxml, let me check.
3 years, 10 months ago (2017-02-16 20:54:36 UTC) #5
jochen (gone - plz use gerrit)
On 2017/02/16 at 20:54:36, cpu wrote: > I expected to look worse :) > > ...
3 years, 10 months ago (2017-02-16 20:58:59 UTC) #6
scottmg
On 2017/02/16 20:58:59, jochen wrote: > On 2017/02/16 at 20:54:36, cpu wrote: > > I ...
3 years, 10 months ago (2017-02-16 21:19:55 UTC) #7
jamesr
https://codereview.chromium.org/2692273008/diff/110001/base/command_line.h File base/command_line.h (right): https://codereview.chromium.org/2692273008/diff/110001/base/command_line.h#newcode37 base/command_line.h:37: #elif defined(OS_POSIX) || defined(OS_FUCHSIA) I think OS_POSIX should be ...
3 years, 10 months ago (2017-02-17 00:44:10 UTC) #17
jamesr
https://codereview.chromium.org/2692273008/diff/110001/BUILD.gn File BUILD.gn (right): https://codereview.chromium.org/2692273008/diff/110001/BUILD.gn#newcode41 BUILD.gn:41: is_fuchsia = current_os == "fuchsia" ideally this would be ...
3 years, 10 months ago (2017-02-17 00:47:36 UTC) #18
scottmg
https://codereview.chromium.org/2692273008/diff/110001/base/command_line.h File base/command_line.h (right): https://codereview.chromium.org/2692273008/diff/110001/base/command_line.h#newcode37 base/command_line.h:37: #elif defined(OS_POSIX) || defined(OS_FUCHSIA) On 2017/02/17 00:44:10, jamesr wrote: ...
3 years, 10 months ago (2017-02-17 00:48:11 UTC) #19
scottmg
https://codereview.chromium.org/2692273008/diff/110001/BUILD.gn File BUILD.gn (right): https://codereview.chromium.org/2692273008/diff/110001/BUILD.gn#newcode41 BUILD.gn:41: is_fuchsia = current_os == "fuchsia" On 2017/02/17 00:47:35, jamesr ...
3 years, 10 months ago (2017-02-17 00:50:45 UTC) #20
jamesr
On 2017/02/17 at 00:48:11, scottmg wrote: > https://codereview.chromium.org/2692273008/diff/110001/base/command_line.h > File base/command_line.h (right): > > https://codereview.chromium.org/2692273008/diff/110001/base/command_line.h#newcode37 ...
3 years, 10 months ago (2017-02-17 01:41:36 UTC) #21
scottmg
On 2017/02/17 01:41:36, jamesr wrote: > On 2017/02/17 at 00:48:11, scottmg wrote: > > https://codereview.chromium.org/2692273008/diff/110001/base/command_line.h ...
3 years, 10 months ago (2017-02-17 02:20:33 UTC) #22
jamesr
https://codereview.chromium.org/2692273008/diff/230001/build/config/fuchsia/BUILD.gn File build/config/fuchsia/BUILD.gn (right): https://codereview.chromium.org/2692273008/diff/230001/build/config/fuchsia/BUILD.gn#newcode35 build/config/fuchsia/BUILD.gn:35: "-lmxio", could these just go in 'libs' ? https://codereview.chromium.org/2692273008/diff/230001/build/toolchain/toolchain.gni ...
3 years, 10 months ago (2017-02-18 00:18:40 UTC) #24
scottmg
got rid of //fuchsia/BUILD.gn too. https://codereview.chromium.org/2692273008/diff/230001/build/config/fuchsia/BUILD.gn File build/config/fuchsia/BUILD.gn (right): https://codereview.chromium.org/2692273008/diff/230001/build/config/fuchsia/BUILD.gn#newcode35 build/config/fuchsia/BUILD.gn:35: "-lmxio", On 2017/02/18 00:18:40, ...
3 years, 10 months ago (2017-02-18 00:25:20 UTC) #25
jamesr
https://codereview.chromium.org/2692273008/diff/250001/build/config/compiler/BUILD.gn File build/config/compiler/BUILD.gn (right): https://codereview.chromium.org/2692273008/diff/250001/build/config/compiler/BUILD.gn#newcode334 build/config/compiler/BUILD.gn:334: ldflags += [ "-Wl,--as-needed" ] recording for posterity: you ...
3 years, 10 months ago (2017-02-18 00:55:28 UTC) #27
cpu_(ooo_6.6-7.5)
https://codereview.chromium.org/2692273008/diff/330001/base/process/process_handle_fuchsia.cc File base/process/process_handle_fuchsia.cc (right): https://codereview.chromium.org/2692273008/diff/330001/base/process/process_handle_fuchsia.cc#newcode11 base/process/process_handle_fuchsia.cc:11: // TODO(scottmg): Port. we don't have this. A possible ...
3 years, 10 months ago (2017-02-20 23:22:15 UTC) #32
scottmg
https://codereview.chromium.org/2692273008/diff/330001/base/process/process_handle_fuchsia.cc File base/process/process_handle_fuchsia.cc (right): https://codereview.chromium.org/2692273008/diff/330001/base/process/process_handle_fuchsia.cc#newcode11 base/process/process_handle_fuchsia.cc:11: // TODO(scottmg): Port. On 2017/02/20 23:22:15, cpu wrote: > ...
3 years, 10 months ago (2017-02-21 00:30:16 UTC) #36
Roland McGrath
https://codereview.chromium.org/2692273008/diff/350001/base/sys_info_fuchsia.cc File base/sys_info_fuchsia.cc (right): https://codereview.chromium.org/2692273008/diff/350001/base/sys_info_fuchsia.cc#newcode11 base/sys_info_fuchsia.cc:11: return 0; We're adding an interface for this, but ...
3 years, 10 months ago (2017-02-21 21:11:16 UTC) #38
cpu_(ooo_6.6-7.5)
3 years, 10 months ago (2017-02-25 23:44:10 UTC) #39
https://codereview.chromium.org/2692273008/diff/330001/base/process/process_h...
File base/process/process_handle_fuchsia.cc (right):

https://codereview.chromium.org/2692273008/diff/330001/base/process/process_h...
base/process/process_handle_fuchsia.cc:11: // TODO(scottmg): Port.
On 2017/02/21 00:30:16, scottmg wrote:
> On 2017/02/20 23:22:15, cpu wrote:
> > we don't have this. A possible approximation is the parent job object koid
> > obtained via  |related_koid|
> > 
> >
>
https://fuchsia.googlesource.com/magenta/+/master/docs/syscalls/object_get_in...
> 
> Is a koid a suitable pid? i.e. the definition of ProcessId and ProcessHandle
>
https://cs.chromium.org/chromium/src/base/process/process_handle.h?rcl=e80226...
> should both be mx_koid_t on Fuchsia?

tl;dr: Yes

If you have a powerful enough handle to the parent of something you can use the
handle + child koid to obtain a handle to the child.

However koids are globaly unique, so the koid is indeed a "better" pid in the
sense of pointing to the right guy and they can actually be used if you have a
handle to the parent job. Same with tids, they are just the thread object koids.

Powered by Google App Engine
This is Rietveld 408576698