Port API test runner to python3
Created attachment 437104 [details] Patch
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?
(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.
Comment on attachment 437104 [details] Patch Thanks :)
Thanks! But I need r+, not cq+ :)
Comment on attachment 437104 [details] Patch OK I'm awake now, you got it!
Comment on attachment 437104 [details] Patch Clearing flags on attachment: 437104 Committed r281919 (241228@main): <https://commits.webkit.org/241228@main>
All reviewed patches have been landed. Closing bug.
<rdar://problem/82669592>
Committed r281942 (241251@main): <https://commits.webkit.org/241251@main>
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'