WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
229782
[GTK][WPE] Port API test runner to python3
https://bugs.webkit.org/show_bug.cgi?id=229782
Summary
[GTK][WPE] Port API test runner to python3
Carlos Alberto Lopez Perez
Reported
2021-09-01 17:21:30 PDT
Port API test runner to python3
Attachments
Patch
(10.59 KB, patch)
2021-09-01 19:06 PDT
,
Carlos Alberto Lopez Perez
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Carlos Alberto Lopez Perez
Comment 1
2021-09-01 19:06:15 PDT
Created
attachment 437104
[details]
Patch
Philippe Normand
Comment 2
2021-09-02 01:24:38 PDT
Comment on
attachment 437104
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=437104&action=review
> Tools/glib/glib_test_runner.py:252 > + p = subprocess.Popen(command, stderr=subprocess.PIPE, env=env, pass_fds=[pipe_w])
Why pass_fds here?
Carlos Alberto Lopez Perez
Comment 3
2021-09-02 03:55:50 PDT
(In reply to Philippe Normand from
comment #2
)
> Comment on
attachment 437104
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=437104&action=review
> > > Tools/glib/glib_test_runner.py:252 > > + p = subprocess.Popen(command, stderr=subprocess.PIPE, env=env, pass_fds=[pipe_w]) > > Why pass_fds here?
Because the program called need to write on that "pipe_w" FD. The runner uses a pipe to communicate with it, see
https://trac.webkit.org/browser/webkit/trunk/Tools/glib/glib_test_runner.py?rev=281888#L239
Then the runner reads (binary) data from the pipe with the function GLibTestRunner._read_from_pipe() and converts that data to strings, unsigned or doubles with the Message() class. With python3 if you don't explicitly pass the list of FDs that should be kept available to the subprocess invocation then the subprocess won't have access to those FDs. This was the part that gave me more trouble when porting this.
Philippe Normand
Comment 4
2021-09-02 04:07:48 PDT
Comment on
attachment 437104
[details]
Patch Thanks :)
Carlos Alberto Lopez Perez
Comment 5
2021-09-02 04:28:07 PDT
Thanks! But I need r+, not cq+ :)
Philippe Normand
Comment 6
2021-09-02 04:34:32 PDT
Comment on
attachment 437104
[details]
Patch OK I'm awake now, you got it!
Carlos Alberto Lopez Perez
Comment 7
2021-09-02 04:45:47 PDT
Comment on
attachment 437104
[details]
Patch Clearing flags on attachment: 437104 Committed
r281919
(
241228@main
): <
https://commits.webkit.org/241228@main
>
Carlos Alberto Lopez Perez
Comment 8
2021-09-02 04:45:52 PDT
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 9
2021-09-02 04:47:23 PDT
<
rdar://problem/82669592
>
Carlos Alberto Lopez Perez
Comment 10
2021-09-02 11:41:34 PDT
Committed
r281942
(
241251@main
): <
https://commits.webkit.org/241251@main
>
Aakash Jain
Comment 11
2021-09-02 15:16:55 PDT
This seems to have broken gtk api tests. e.g.:
https://ews-build.webkit.org/#/builders/34/builds/42638/steps/13/logs/stdio
ModuleNotFoundError: No module named 'gi'
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug