[Fuchsia] Run fuchsia-gn-sdk from chromium [crashpad/crashpad : main]

0 views
Skip to first unread message

Zijie He (Gerrit)

unread,
May 31, 2024, 1:50:45 PMMay 31
to Mark Mentovai, Justin Cohen, Ben Pastene, Crashpad LUCI CQ, crashp...@chromium.org
Attention needed from Mark Mentovai

Zijie He added 1 comment

Patchset-level comments
File-level comment, Patchset 6 (Latest):
Zijie He . resolved

Please take a look, thank you.

Open in Gerrit

Related details

Attention is currently required from:
  • Mark Mentovai
Submit Requirements:
  • requirement is not satisfiedCode-Review
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: crashpad/crashpad
Gerrit-Branch: main
Gerrit-Change-Id: I21383e02f9fff3db9405c0dbe42051122a325003
Gerrit-Change-Number: 5585353
Gerrit-PatchSet: 6
Gerrit-Owner: Zijie He <zij...@google.com>
Gerrit-Reviewer: Mark Mentovai <ma...@chromium.org>
Gerrit-Reviewer: Zijie He <zij...@google.com>
Gerrit-CC: Ben Pastene <bpas...@chromium.org>
Gerrit-CC: Justin Cohen <justi...@chromium.org>
Gerrit-Attention: Mark Mentovai <ma...@chromium.org>
Gerrit-Comment-Date: Fri, 31 May 2024 17:50:30 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
unsatisfied_requirement
open
diffy

Zijie He (Gerrit)

unread,
May 31, 2024, 1:51:39 PMMay 31
to Mark Mentovai, Justin Cohen, Ben Pastene, Crashpad LUCI CQ, crashp...@chromium.org
Attention needed from Mark Mentovai

Zijie He added 1 comment

File build/BUILDCONFIG.gn
Line 77, Patchset 6 (Latest): import("//third_party/fuchsia-gn-sdk/src/gn_configs.gni")
Zijie He . resolved

The fix is not very ideal, but at least it works. The problem here is that crashpad highly relies on the mini_chromium, but later one has no access to most of the shared components in chromium.

Open in Gerrit

Related details

Attention is currently required from:
  • Mark Mentovai
Submit Requirements:
  • requirement is not satisfiedCode-Review
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: crashpad/crashpad
Gerrit-Branch: main
Gerrit-Change-Id: I21383e02f9fff3db9405c0dbe42051122a325003
Gerrit-Change-Number: 5585353
Gerrit-PatchSet: 6
Gerrit-Owner: Zijie He <zij...@google.com>
Gerrit-Reviewer: Mark Mentovai <ma...@chromium.org>
Gerrit-Reviewer: Zijie He <zij...@google.com>
Gerrit-CC: Ben Pastene <bpas...@chromium.org>
Gerrit-CC: Justin Cohen <justi...@chromium.org>
Gerrit-Attention: Mark Mentovai <ma...@chromium.org>
Gerrit-Comment-Date: Fri, 31 May 2024 17:51:35 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
unsatisfied_requirement
open
diffy

Mark Mentovai (Gerrit)

unread,
May 31, 2024, 2:27:15 PMMay 31
to Zijie He, Justin Cohen, Ben Pastene, Crashpad LUCI CQ, crashp...@chromium.org
Attention needed from Zijie He

Mark Mentovai added 7 comments

File .gitignore
Line 33, Patchset 6 (Latest):/third_party/fuchsia-gn-sdk
Mark Mentovai . unresolved

If you do an ASCII sort, `-` is before `/`.

Line 47, Patchset 6 (Latest):/build/fuchsia
Mark Mentovai . unresolved

Keep sorted.

File DEPS
Line 268, Patchset 6 (Latest): 'rm',
Mark Mentovai . unresolved

How’s this work on Windows?

You might want a `condition` at least.

File build/crashpad_buildconfig.gni
Line 87, Patchset 6 (Latest): is_fuchsia = crashpad_is_fuchsia
Mark Mentovai . unresolved

Worth a comment saying why you need this, because we don’t normally define things like this out of the `crashpad_` namespace.

File build/fuchsia_envs.py
Line 28, Patchset 6 (Latest):def Main():
Mark Mentovai . unresolved

Just `main`, lowercase m.

Line 28, Patchset 6 (Latest):def Main():
Mark Mentovai . unresolved

Accept an `args` parameter, which you’d pass in from the bottom of this script as `sys.argv[1:]`. Use that on line 46.

Line 46, Patchset 6 (Latest): with subprocess.Popen(sys.argv[1:]) as proc:
Mark Mentovai . unresolved

Why not just `return subprocess.call(…)`?

Open in Gerrit

Related details

Attention is currently required from:
  • Zijie He
Submit Requirements:
  • requirement is not satisfiedCode-Review
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: crashpad/crashpad
Gerrit-Branch: main
Gerrit-Change-Id: I21383e02f9fff3db9405c0dbe42051122a325003
Gerrit-Change-Number: 5585353
Gerrit-PatchSet: 6
Gerrit-Owner: Zijie He <zij...@google.com>
Gerrit-Reviewer: Mark Mentovai <ma...@chromium.org>
Gerrit-Reviewer: Zijie He <zij...@google.com>
Gerrit-CC: Ben Pastene <bpas...@chromium.org>
Gerrit-CC: Justin Cohen <justi...@chromium.org>
Gerrit-Attention: Zijie He <zij...@google.com>
Gerrit-Comment-Date: Fri, 31 May 2024 18:27:11 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
unsatisfied_requirement
open
diffy

Zijie He (Gerrit)

unread,
Jun 3, 2024, 7:10:21 PMJun 3
to Mark Mentovai, Justin Cohen, Ben Pastene, Crashpad LUCI CQ, crashp...@chromium.org
Attention needed from Mark Mentovai

Zijie He added 7 comments

File .gitignore
Line 33, Patchset 6:/third_party/fuchsia-gn-sdk
Mark Mentovai . resolved

If you do an ASCII sort, `-` is before `/`.

Zijie He

Done

Line 47, Patchset 6:/build/fuchsia
Mark Mentovai . resolved

Keep sorted.

Zijie He

Done

File DEPS
Line 268, Patchset 6: 'rm',
Mark Mentovai . resolved

How’s this work on Windows?

You might want a `condition` at least.

Zijie He

Ooops, I didn't know windows was supported.

File build/crashpad_buildconfig.gni
Line 87, Patchset 6: is_fuchsia = crashpad_is_fuchsia
Mark Mentovai . resolved

Worth a comment saying why you need this, because we don’t normally define things like this out of the `crashpad_` namespace.

Zijie He

Done

File build/fuchsia_envs.py
Line 28, Patchset 6:def Main():
Mark Mentovai . resolved

Accept an `args` parameter, which you’d pass in from the bottom of this script as `sys.argv[1:]`. Use that on line 46.

Zijie He

Done

Line 28, Patchset 6:def Main():
Mark Mentovai . resolved

Just `main`, lowercase m.

Zijie He

Done

Line 46, Patchset 6: with subprocess.Popen(sys.argv[1:]) as proc:
Mark Mentovai . unresolved

Why not just `return subprocess.call(…)`?

Zijie He

So if this process is killed (Process.kill in dart [1], likely also other similar commands), the processes it spawns won't receive the sigterm and may break their functionalities. So the proc.terminate() explicitly sends the sigterm to the spawned processes.

I think it may be OK in crashpad, but this file is almost copied from other repos like dart [2]. I simply kept them consistent.

[1]: https://api.flutter.dev/flutter/dart-io/Process/kill.html
[2]: https://source.corp.google.com/h/dart/sdk/+/main:build/fuchsia/with_envs.py;bpv=1;bpt=0

Open in Gerrit

Related details

Attention is currently required from:
  • Mark Mentovai
Submit Requirements:
  • requirement is not satisfiedCode-Review
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: crashpad/crashpad
Gerrit-Branch: main
Gerrit-Change-Id: I21383e02f9fff3db9405c0dbe42051122a325003
Gerrit-Change-Number: 5585353
Gerrit-PatchSet: 7
Gerrit-Owner: Zijie He <zij...@google.com>
Gerrit-Reviewer: Mark Mentovai <ma...@chromium.org>
Gerrit-Reviewer: Zijie He <zij...@google.com>
Gerrit-CC: Ben Pastene <bpas...@chromium.org>
Gerrit-CC: Justin Cohen <justi...@chromium.org>
Gerrit-Attention: Mark Mentovai <ma...@chromium.org>
Gerrit-Comment-Date: Mon, 03 Jun 2024 23:10:17 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Mark Mentovai <ma...@chromium.org>
unsatisfied_requirement
open
diffy

Mark Mentovai (Gerrit)

unread,
Jun 4, 2024, 9:11:03 AMJun 4
to Zijie He, Justin Cohen, Ben Pastene, Crashpad LUCI CQ, crashp...@chromium.org
Attention needed from Zijie He

Mark Mentovai added 1 comment

File build/fuchsia_envs.py
Line 46, Patchset 6: with subprocess.Popen(sys.argv[1:]) as proc:
Mark Mentovai . unresolved

Why not just `return subprocess.call(…)`?

Zijie He

So if this process is killed (Process.kill in dart [1], likely also other similar commands), the processes it spawns won't receive the sigterm and may break their functionalities. So the proc.terminate() explicitly sends the sigterm to the spawned processes.

I think it may be OK in crashpad, but this file is almost copied from other repos like dart [2]. I simply kept them consistent.

[1]: https://api.flutter.dev/flutter/dart-io/Process/kill.html
[2]: https://source.corp.google.com/h/dart/sdk/+/main:build/fuchsia/with_envs.py;bpv=1;bpt=0

Mark Mentovai

So if this process is killed (Process.kill in dart [1], likely also other similar commands), the processes it spawns won't receive the sigterm and may break their functionalities. So the proc.terminate() explicitly sends the sigterm to the spawned processes.

I don’t think that’s relevant here, and I’d prefer the simpler form.

Open in Gerrit

Related details

Attention is currently required from:
  • Zijie He
Submit Requirements:
  • requirement is not satisfiedCode-Review
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: crashpad/crashpad
Gerrit-Branch: main
Gerrit-Change-Id: I21383e02f9fff3db9405c0dbe42051122a325003
Gerrit-Change-Number: 5585353
Gerrit-PatchSet: 7
Gerrit-Owner: Zijie He <zij...@google.com>
Gerrit-Reviewer: Mark Mentovai <ma...@chromium.org>
Gerrit-Reviewer: Zijie He <zij...@google.com>
Gerrit-CC: Ben Pastene <bpas...@chromium.org>
Gerrit-CC: Justin Cohen <justi...@chromium.org>
Gerrit-Attention: Zijie He <zij...@google.com>
Gerrit-Comment-Date: Tue, 04 Jun 2024 13:10:54 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Zijie He <zij...@google.com>
Comment-In-Reply-To: Mark Mentovai <ma...@chromium.org>
unsatisfied_requirement
open
diffy

Zijie He (Gerrit)

unread,
Jun 5, 2024, 2:23:13 PMJun 5
to Mark Mentovai, Justin Cohen, Ben Pastene, Crashpad LUCI CQ, crashp...@chromium.org
Attention needed from Mark Mentovai

Zijie He voted and added 1 comment

Votes added by Zijie He

Commit-Queue+1

1 comment

File build/fuchsia_envs.py
Line 46, Patchset 6: with subprocess.Popen(sys.argv[1:]) as proc:
Mark Mentovai . resolved

Why not just `return subprocess.call(…)`?

Zijie He

So if this process is killed (Process.kill in dart [1], likely also other similar commands), the processes it spawns won't receive the sigterm and may break their functionalities. So the proc.terminate() explicitly sends the sigterm to the spawned processes.

I think it may be OK in crashpad, but this file is almost copied from other repos like dart [2]. I simply kept them consistent.

[1]: https://api.flutter.dev/flutter/dart-io/Process/kill.html
[2]: https://source.corp.google.com/h/dart/sdk/+/main:build/fuchsia/with_envs.py;bpv=1;bpt=0

Mark Mentovai

So if this process is killed (Process.kill in dart [1], likely also other similar commands), the processes it spawns won't receive the sigterm and may break their functionalities. So the proc.terminate() explicitly sends the sigterm to the spawned processes.

I don’t think that’s relevant here, and I’d prefer the simpler form.

Zijie He

Done

Open in Gerrit

Related details

Attention is currently required from:
  • Mark Mentovai
Submit Requirements:
  • requirement is not satisfiedCode-Review
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: crashpad/crashpad
Gerrit-Branch: main
Gerrit-Change-Id: I21383e02f9fff3db9405c0dbe42051122a325003
Gerrit-Change-Number: 5585353
Gerrit-PatchSet: 9
Gerrit-Owner: Zijie He <zij...@google.com>
Gerrit-Reviewer: Mark Mentovai <ma...@chromium.org>
Gerrit-Reviewer: Zijie He <zij...@google.com>
Gerrit-CC: Ben Pastene <bpas...@chromium.org>
Gerrit-CC: Justin Cohen <justi...@chromium.org>
Gerrit-Attention: Mark Mentovai <ma...@chromium.org>
Gerrit-Comment-Date: Wed, 05 Jun 2024 18:23:08 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
unsatisfied_requirement
open
diffy

Mark Mentovai (Gerrit)

unread,
Jun 5, 2024, 4:10:10 PMJun 5
to Zijie He, Justin Cohen, Ben Pastene, Crashpad LUCI CQ, crashp...@chromium.org
Attention needed from Zijie He

Mark Mentovai voted and added 3 comments

Votes added by Mark Mentovai

Code-Review+1

3 comments

Patchset-level comments
File-level comment, Patchset 9 (Latest):
Mark Mentovai . resolved

LGTM otherwise

File build/fuchsia_envs.py
Line 21, Patchset 9 (Latest):from typing import List
Mark Mentovai . unresolved

We don’t really do this here.

Line 34, Patchset 9 (Latest): os.path.join(os.path.dirname(__file__), '../'))
Mark Mentovai . unresolved

Is the trailing slash necessary? `os.pardir` if not.

Open in Gerrit

Related details

Attention is currently required from:
  • Zijie He
Submit Requirements:
  • requirement satisfiedCode-Review
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: crashpad/crashpad
Gerrit-Branch: main
Gerrit-Change-Id: I21383e02f9fff3db9405c0dbe42051122a325003
Gerrit-Change-Number: 5585353
Gerrit-PatchSet: 9
Gerrit-Owner: Zijie He <zij...@google.com>
Gerrit-Reviewer: Mark Mentovai <ma...@chromium.org>
Gerrit-Reviewer: Zijie He <zij...@google.com>
Gerrit-CC: Ben Pastene <bpas...@chromium.org>
Gerrit-CC: Justin Cohen <justi...@chromium.org>
Gerrit-Attention: Zijie He <zij...@google.com>
Gerrit-Comment-Date: Wed, 05 Jun 2024 20:10:06 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
open
diffy

Zijie He (Gerrit)

unread,
Jun 5, 2024, 6:37:57 PMJun 5
to Mark Mentovai, Justin Cohen, Ben Pastene, Crashpad LUCI CQ, crashp...@chromium.org

Zijie He added 2 comments

File build/fuchsia_envs.py
Line 21, Patchset 9:from typing import List
Mark Mentovai . resolved

We don’t really do this here.

Zijie He

Oh, I see.

Line 34, Patchset 9: os.path.join(os.path.dirname(__file__), '../'))
Mark Mentovai . resolved

Is the trailing slash necessary? `os.pardir` if not.

Zijie He

Not really I think.

Open in Gerrit

Related details

Attention set is empty
Submit Requirements:
  • requirement satisfiedCode-Review
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: crashpad/crashpad
Gerrit-Branch: main
Gerrit-Change-Id: I21383e02f9fff3db9405c0dbe42051122a325003
Gerrit-Change-Number: 5585353
Gerrit-PatchSet: 10
Gerrit-Owner: Zijie He <zij...@google.com>
Gerrit-Reviewer: Mark Mentovai <ma...@chromium.org>
Gerrit-Reviewer: Zijie He <zij...@google.com>
Gerrit-CC: Ben Pastene <bpas...@chromium.org>
Gerrit-CC: Justin Cohen <justi...@chromium.org>
Gerrit-Comment-Date: Wed, 05 Jun 2024 22:37:54 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Mark Mentovai <ma...@chromium.org>
satisfied_requirement
open
diffy

Zijie He (Gerrit)

unread,
Jun 5, 2024, 7:09:56 PMJun 5
to Mark Mentovai, Justin Cohen, Ben Pastene, Crashpad LUCI CQ, crashp...@chromium.org

Zijie He voted and added 1 comment

Votes added by Zijie He

Commit-Queue+2

1 comment

Patchset-level comments
File-level comment, Patchset 10 (Latest):
Zijie He . resolved

Thank you Mark.

Open in Gerrit

Related details

Attention set is empty
Submit Requirements:
  • requirement satisfiedCode-Review
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: crashpad/crashpad
Gerrit-Branch: main
Gerrit-Change-Id: I21383e02f9fff3db9405c0dbe42051122a325003
Gerrit-Change-Number: 5585353
Gerrit-PatchSet: 10
Gerrit-Owner: Zijie He <zij...@google.com>
Gerrit-Reviewer: Mark Mentovai <ma...@chromium.org>
Gerrit-Reviewer: Zijie He <zij...@google.com>
Gerrit-CC: Ben Pastene <bpas...@chromium.org>
Gerrit-CC: Justin Cohen <justi...@chromium.org>
Gerrit-Comment-Date: Wed, 05 Jun 2024 23:09:52 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
open
diffy

Crashpad LUCI CQ (Gerrit)

unread,
Jun 5, 2024, 7:10:06 PMJun 5
to Zijie He, Mark Mentovai, Justin Cohen, Ben Pastene, crashp...@chromium.org

Crashpad LUCI CQ submitted the change with unreviewed changes

Unreviewed changes

9 is the latest approved patch-set.
The change was submitted with unreviewed changes in the following files:

```
The name of the file: build/fuchsia_envs.py
Insertions: 2, Deletions: 3.

@@ -18,10 +18,9 @@
import platform
import subprocess
import sys
-from typing import List


-def main(args: List[str]):
+def main(args):
"""
Executes the test-scripts with required environment variables. It acts like
/usr/bin/env, but provides some extra functionality to dynamically set up
@@ -31,7 +30,7 @@
args: the command line arguments without the script name itself.
"""
os.environ['SRC_ROOT'] = os.path.abspath(
- os.path.join(os.path.dirname(__file__), '../'))
+ os.path.join(os.path.dirname(__file__), '..'))

assert platform.system() == 'Linux', 'Unsupported OS ' + platform.system()
os.environ['FUCHSIA_SDK_ROOT'] = os.path.join(
```

Change information

Commit message:
[Fuchsia] Run fuchsia-gn-sdk from chromium

The latest build rules have the ffuchsia-api-level.
Need https://crrev.com/c/5586319.
Bug: fuchsia:42085580, fuchsia:327691011
Change-Id: I21383e02f9fff3db9405c0dbe42051122a325003
Commit-Queue: Zijie He <zij...@google.com>
Reviewed-by: Mark Mentovai <ma...@chromium.org>
Files:
  • M .gitignore
  • M DEPS
  • M build/BUILDCONFIG.gn
  • A build/config/fuchsia/gn_configs.gni
  • M build/crashpad_buildconfig.gni
  • D build/fuchsia/gen_build_defs.py
  • A build/fuchsia_envs.py
Change size: L
Delta: 7 files changed, 155 insertions(+), 355 deletions(-)
Branch: refs/heads/main
Submit Requirements:
  • requirement satisfiedCode-Review: +1 by Mark Mentovai
Open in Gerrit
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: merged
Gerrit-Project: crashpad/crashpad
Gerrit-Branch: main
Gerrit-Change-Id: I21383e02f9fff3db9405c0dbe42051122a325003
Gerrit-Change-Number: 5585353
Gerrit-PatchSet: 11
Gerrit-Owner: Zijie He <zij...@google.com>
Gerrit-Reviewer: Crashpad LUCI CQ <crashpa...@luci-project-accounts.iam.gserviceaccount.com>
Gerrit-Reviewer: Mark Mentovai <ma...@chromium.org>
Gerrit-Reviewer: Zijie He <zij...@google.com>
Gerrit-CC: Ben Pastene <bpas...@chromium.org>
Gerrit-CC: Justin Cohen <justi...@chromium.org>
open
diffy
satisfied_requirement
Reply all
Reply to author
Forward
0 new messages