test(libc): give each app archive test its own root directory #9741
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/9741"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by prosperkartik on 2026-10-22T11:25:04Z.
What
AppArchiveFixture::EnterFreshRootnamed the test root from onesteady_clockreading and accepted a directory that already existed. Under Rosetta 2, processes started together can read the same value, so parallelguest_app_archive_*runs shared a root and overwrote each other'sapp0.zar, aborting withapp0.zar is not a readable ZArchive. Theguest_kernel_app_archive_*tests use the same fixture. The root is now claimed withstd::filesystem::create_directory, which returns false for an existing directory, and renamed from a new reading until the claim succeeds. Test-only change.Tested
Mac mini, Apple M4, 16 GB, macOS 26.5.1 (25F80), x86_64 under Rosetta 2, Apple clang 21.0.0.
maindoes not build on macOS, so for the runtime checks the change was applied on top of #8658 (1688e5abb):guest_app_archive_tests presentandguest_app_archive_tests damagedlaunched together, 300 pairs: 113 pairs fail without the change, 0 with it.ctest -R app_archive -j7 --repeat until-fail:5(the 4guest_app_archive_*and 3guest_kernel_app_archive_*tests): passes.steady_clock::now()at startup, launched in pairs 300 times, printed the same value in 18 pairs under Rosetta 2 and in 0 pairs built as arm64.python3 tools/check_conventions.py --base origin/main: all checks pass.In the M1 run reported in #8658,
guest_kernel_app_archive_plainfailed in the full run and passed alone. It uses the same fixture, so it may be this collision; not verified on that machine.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)Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-22T11:59:27Z.
Review: CHANGES_REQUESTED
The fixture change is narrowly scoped and the author reports a strong 300-pair red/green reproduction. The branch is 4 commits behind current
main. If it proceeds later, refresh and rerun the app-archive tests and overlap check on the updated head. Product Linux/Windows jobs are skipped on this PR.I’ve noticed that holding this PR because of #5239 isn’t necessary. It’s fine for PRs to keep coming in; they’ll be handled in due course. Please disregard my earlier request to hold or defer it.
Imported from boykopovar/AnyPS5. Originally posted by prosperkartik on 2026-10-22T14:44:16Z.
@MarcZX10, thanks. Rebased on
mainb7d1d47a5; the head is now745c17331(1 file, +5/-2, unchanged).Rerun on the updated head, Apple M4, macOS 26.5.1, x86_64 under Rosetta 2.
maindoes not build on macOS, so the change was applied on top of #8658's current headf3bc0258ffor the runtime checks:guest_app_archive_tests presentanddamagedlaunched together, 300 pairs: 104 fail without the change, 0 with it.ctest -R app_archive -j7 --repeat until-fail:5(the 4guest_app_archive_*and 3guest_kernel_app_archive_*tests): 7/7 pass.python3 tools/check_conventions.py --base origin/main: all checks pass.python3 tools/pr_overlap.py --branch fix/app-archive-fresh-root: no overlap with open pull requests.Linux and Windows are not run locally. @iamthehimansh reports the same collision under load on an M2 Pro in #8658.
AI-assisted: yes
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-22T15:02:55Z.
Review: APPROVED
The requested refresh and rerun are complete. The PR is based directly on current
main(b7d1d47a), and the reported Rosetta 2 rerun shows the collision reproduction fails in 104/300 paired baseline runs and 0/300 runs with this change; all seven app-archive CTest cases pass under--repeat until-fail:5. The author also reports no overlap with open PRs. This is a narrowly scoped test-fixture fix: atomically claiming the timestamp-derived directory and retrying on collision addresses the demonstrated race.My local
python tools/check_conventions.py --base upstream/main --head upstream/pr/9741andgit diff --check upstream/main...upstream/pr/9741pass. I could not independently run the CTest suite here because this checkout has no configured build and only about 649 MB free. The hosted product build jobs did not run on this PR. I also did not dispatch a full workflow because the repository requires a collaborator with push access to do that, and the permission endpoint reports this account lacks push access.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-22T17:05:53Z.
Review: COMMENTED
I confirmed the approved fixture change is still exact head
745c173319438bae1d5d9877e93e0e3e91eb32e1, based on current mainb7d1d47a5f; merge-tree and diff-check against today’s11f976b27c16ed91633f00039dba5dfd97dd7cc1are clean. The author’s 104/300 baseline collision versus 0/300 fixed runs and repeated seven-test result substantiate the race fix. No further code issue found. Please refresh the base before merge, then rerun the app-archive tests and overlap check on that final head.