Repository navigation
test(libSceSystemService): accept the write watch diagnostic before the LoadExec child's line - #11258
Conversation
MarcZX10
left a comment
There was a problem hiding this comment.
The reported WSL2 reproduction explains the failure and the test still checks the child line and guest stream.
|
|
||
| bool HostOutputIs(const std::string& text, const std::string& line) { | ||
| std::size_t begin = 0; | ||
| while (begin < text.size() && text[begin] == '[') { |
There was a problem hiding this comment.
One non-blocking test-hardening point: this skips every leading line beginning with [ rather than only the runtime's [memory] write watch unavailable: diagnostic. For example, [unexpected]\nstarted list\n is accepted as the exact expected output. Could this match the known startup-diagnostic prefix (or otherwise constrain accepted diagnostics) so unrelated child stderr cannot be hidden?
…he LoadExec child's line guest_system_load_exec_standard_error compared the host standard error of the re-executed child with "started <mode>\n" exactly. On a Linux kernel without asynchronous userfaultfd write protection (before 6.7, such as WSL2's 6.6) libc prints "[memory] write watch unavailable: ..." to the host standard error at start-up, so the comparison failed and the test aborted on every run. That one diagnostic line is now skipped when it comes first; the rest of the host stream must still be the child's line exactly, and the guest pipe must still be empty. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01En5cnt6RwCiNXDJwm9t8Tf
813dd0f to
fff18d2
Compare
|
@MarcZX10 Thanks, fixed in fff18d2. The check now skips only a first line that begins with Re-run on WSL2 Ubuntu 24.04 (kernel 6.6, GCC 13.3, Release) at fff18d2: AI-assisted: yes (Claude Code); results above were run on this machine. |
MarcZX10
left a comment
There was a problem hiding this comment.
Re-reviewed exact head fff18d2f3b12e1654d266bb84f2b8337b5fea0b8. The test now skips only the leading host diagnostic with the emitted [memory] write watch unavailable: prefix; it requires a newline and still compares all remaining host output exactly, while requiring an empty guest stream. This addresses the earlier concern that arbitrary leading output could pass. The author reports the focused Linux test passes 3/3 on the new head and still fails if either host-stderr duplication is removed; Windows related tests and conventions also pass. I did not rerun those local tests. Hosted policy/convention checks pass; product jobs are path-skipped. No blocking issue remains.
What
guest_system_load_exec_standard_errorfails on every run on Linux hosts whose kernel lacks asynchronous userfaultfd write protection (before 6.7, e.g. WSL2's 6.6 or Debian 12's 6.1). It aborts without a message (Subprocess aborted), and several open PRs list it as failing onmainin their containers (#10479, #10755, #10767, #11167).The test requires the re-executed child's host standard error to be exactly
started <mode>\n. On such a kernel the runtime first prints its start-up diagnostic[memory] write watch unavailable: asynchronous userfaultfd write protection failed (Invalid argument); guest memory is compared instead(GuestWriteWatch.cpp) to the same stream, so the exact comparison fails. strace of the child shows the diagnostic, thenstarted list\n, then exit 0. WithAPS5_NO_WRITE_WATCH=1the unchanged test passes.The check now skips that one line,
[memory] write watch unavailable: ...(matched by its exact prefix), when it comes first. The rest of the host stream must still be exactlystarted <mode>\n, and the guest stream must still be empty. Any other leading line still fails. This is a test-only change with no runtime code.Tested
BUILD_TESTING=ON,main90f918f (re-run at fff18d2 with the narrower match: 3/3 pass):main: the test aborts on every run.--repeat until-fail:3).dup2calls that give the host standard error back to descriptor 2 removed (Export.cppStartHostExecutable,LoadExec.cppReplace), the updated test still fails, so it still catches the bug it guards.ctest: 23 failures onmainand 23 with this change. This test drops out of the list. The rest are the same lavapipeagc_*andpr_overlap_encodingfailures in both runs, plusguest_memory's mapping-cost timing ratio, which failed once under-j 4and passes alone 3/3.guest_system*,loadexec*andlnc_util*(22 tests) pass.python tools/check_conventions.py --base upstream/mainpasses.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)🤖 Generated with Claude Code
https://claude.ai/code/session_01En5cnt6RwCiNXDJwm9t8Tf