mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 21:40:52 +01:00
[PR #685] [MERGED] tests: two read-only-file cases skip under root (TEST-ROOT-READONLY) #727
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#727
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
📋 Pull Request Information
Original PR: https://github.com/ubiquitarianism/leonida/pull/685
Author: @hugo0024
Created: 11/24/2026
Status: ✅ Merged
Merged: 11/24/2026
Merged by: @ubiquitarianism
Base:
main← Head:test-root-readonly📝 Commits (1)
4e4c2b1tests: two read-only-file cases skip under root (TEST-ROOT-READONLY)📊 Changes
2 files changed (+4 additions, -0 deletions)
View changed files
📝
tests/test_awc_manifest.py(+2 -0)📝
tests/test_navmesh_nodes.py(+2 -0)📄 Description
Claimed in the coordination issue as: TEST-ROOT-READONLY
What and why
Two test cases make a file read-only (
0o444) and expect the write to be refused:tests/test_awc_manifest.py:ManifestTest.test_read_only_manifest_is_refused_without_staging_a_filetests/test_navmesh_nodes.py:ArchiveTest.test_cli_refuses_an_unwritable_out_before_the_archives_are_readRoot ignores the file mode, so the write succeeds and both files are red whenever the tests run as root, the default user in most containers. The tools are right; the tests cannot set up their precondition.
Both cases now skip under POSIX root, with the check and the reason
tests/test_image_query_probe.pyandtests/test_mode_round_probe.pyalready use (root bypasses read-only file mode). Windows and a non-root POSIX user still run them.In a full run of the standard-library loop as root, these were the only two cases that failed for this reason.
Tested
Ubuntu 24.04, Python 3.13.18, on
mainat21625bc.python -I tests/test_awc_manifest.pypython -I tests/test_navmesh_nodes.pyrunuser -u nobody), each of the two cases was also run by name with-vand passes.python -m compileall -q make_game.py tools testspasses, and so doespython -I scripts/check_no_game_data.pyon the two files.stdlib-tests-linuxjob, as root, after the change: 478 files, 2 failing (tests/test_tool_stdout_encoding.pyandtests/test_ttpf_assets.py). Both fail the same way with this change reverted, and neither reads the files changed here.GPUs tested: n/a
AI-assisted: yes
Checklist
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).docs/design.md, with how it was confirmed. (n/a: no translator change)🤖 Generated with Claude Code
https://claude.ai/code/session_01Lts24qp68LkwdoVemtts4A
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.