Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-109276: libregrtest: WASM use filename for JSON#109340

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
vstinner merged 1 commit intopython:mainfromvstinner:regrtest_json_file3
Sep 12, 2023

Conversation

vstinner
Copy link
Member

@vstinnervstinner commentedSep 12, 2023
edited by bedevere-appbot
Loading

On Emscripten and WASI platforms, or if --python command line option is used, libregrtest now uses a filename for the JSON file.

Emscripten and WASI buildbot workers run the main test process with a different Python (Linux) which spawns Emscripten/WASI processes using the command specified in --python command line option. Passing a file descriptor from the parent process to the child process doesn't work in this case.

  • Add RunTests.json_file_use_filename() method.
  • Add a test in test_regrtest on the --python command line option.
  • test_regrtest: add parallel=False parameter.

On Emscripten and WASI platforms, or if --python command line optionis used, libregrtest now uses a filename for the JSON file.Emscripten and WASI buildbot workers run the main test process with adifferent Python (Linux) which spawns Emscripten/WASI processes usingthe command specified in --python command line option. Passing a filedescriptor from the parent process to the child process doesn't workin this case.* Add JsonFile and JsonFileType classes* Add RunTests.json_file_use_filename() method.* Add a test in test_regrtest on the --python command line option.* test_regrtest: add parallel=False parameter.* Split long RunWorkers._runtest() function into sub-functions.
@vstinnervstinner merged commit75cdd9a intopython:mainSep 12, 2023
@vstinnervstinner deleted the regrtest_json_file3 branchSeptember 12, 2023 22:41
@vstinner
Copy link
MemberAuthor

First, I wrote PR#109326 to debug the issue and understand what's going on. Then I wrote this clean PR.

Well. Sadly, this PR doesn't work as expected because I misunderstood how Emscripten/WASI buildbot workers run tests.

On these buildbots, a first Linux x86-64 Python binary is used to runpython -m test. This one lists tests and then spawns test worker processes.

These test worker processes use the Emscripten/WASI runtime! So the parent and child processes don't run the same "platform"!

Before, the result was serialized as JSON at the end of stdout. But it causes issues, so Ienhanced libregrtest to write the JSON into a separated file descriptor (change made 2 days ago).

First probem: apparently, currently, it's not possible to pass a file descriptor from the Linux x86-64 Python to the Emscripten/WASI Python: it fails withOSError: [Errno 8] Bad file descriptor.

So I wrote this PR to use anamed filename for the JSON file.Second problem: the Emscripten/WASI Python runtime doesn't have a full access to the filesystem, and paths are mapped differently.

vstinner added a commit to vstinner/cpython that referenced this pull requestSep 13, 2023
On Emscripten and WASI platforms, or if --python command line optionis used, libregrtest now uses a filename for the JSON file.Emscripten and WASI buildbot workers run the main test process with adifferent Python (Linux) which spawns Emscripten/WASI processes usingthe command specified in --python command line option. Passing a filedescriptor from the parent process to the child process doesn't workin this case.* Add JsonFile and JsonFileType classes* Add RunTests.json_file_use_filename() method.* Add a test in test_regrtest on the --python command line option.* test_regrtest: add parallel=False parameter.* Split long RunWorkers._runtest() function into sub-functions.
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

1 participant
@vstinner

[8]ページ先頭

©2009-2025 Movatter.jp