tests: block destination path in rpf9dump write-failure exit-code tests (TEST-RPF9DUMP-WRITE-BLOCKER) #655

Manually merged
github merged 1 commit from gh-pr/655/head into gh-pr/655/base 2026-11-26 09:14:13 +00:00
Owner

@⁠kirigayakazima on GitHub · 2026-11-24 11:03 UTC · original
kirigayakazima:fix/rpf9dump-write-blocker-tests → main · +8 −4 · 1 files · 1 commits · merged 2026-11-24 13:09 UTC

Claimed in the coordination issue as: TEST-RPF9DUMP-WRITE-BLOCKER (#14)

What and why

Fixes 2 tests in tests/test_rpf9dump_exit_codes.py that currently fail on main (21625bca):

  • test_failed_xma_write_exits_nonzero_and_rerun_completes
  • test_failed_texture_write_exits_nonzero_and_withholds_manifest

Commit b05999eb (origin PR 8969) changed Util.WriteAtomic in tools/rpf9dump/Util.cs to stage writes to Util.PartialName(path) (<path>.<pid>.<tid>.<guid>.partial) instead of <path>.partial. Because the destination is no longer blocked by a <target>.partial directory, both tests exited 0 on unmodified main.

Following tests/test_ttpf_export_resume.py:69, block the destination path itself with a directory (where File.Exists is false and Util.MoveReplace fails), verify no leaked *.partial temp files remain, and confirm retry succeeds once the directory blocker is removed.

Tested

On Windows 11 x64 (.NET 8.0.401, Python 3.14.7) at 68fd157f54892629049f205093383cf27df1e077, synthetic archives only (no game data):

  • Before fix on upstream/main (21625bca): python -I tests/test_rpf9dump_exit_codes.py failed 2/8 (the two write-blocker tests above exited 0)
  • dotnet build tools/rpf9dump/rpf9dump.csproj -c Release — 0 warnings, 0 errors
  • RPF9DUMP_DLL=... python -I tests/test_rpf9dump_exit_codes.py — 8 ran, OK
  • python -I tests/test_ci_registration.py — 15 ran, OK
  • python -I tests/test_text_write_line_endings.py — 3 ran, OK
  • python -I tests/test_check_no_game_data.py & python -I scripts/check_no_game_data.py — OK / exit 0
  • python -m compileall -q tests/test_rpf9dump_exit_codes.py — exit 0

GPUs tested: n/a

AI-assisted: yes

Checklist

  • Based on current main (21625bca) and merges cleanly (a conflicting pull request is labeled needs rebase).
  • One topic; follow-up work goes in a new pull request.
  • No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here.
  • A new translator rule is in the contract table of docs/design.md, with how it was confirmed. (n/a — tests only)
**@⁠kirigayakazima** on GitHub · 2026-11-24 11:03 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/655) `kirigayakazima:fix/rpf9dump-write-blocker-tests` → `main` · +8 −4 · 1 files · 1 commits · merged 2026-11-24 13:09 UTC Claimed in the coordination issue as: TEST-RPF9DUMP-WRITE-BLOCKER (https://git.gtahub.st/github/ubiquitarianism--leonida/issues/14) ### What and why Fixes 2 tests in `tests/test_rpf9dump_exit_codes.py` that currently fail on `main` (`21625bca`): - `test_failed_xma_write_exits_nonzero_and_rerun_completes` - `test_failed_texture_write_exits_nonzero_and_withholds_manifest` Commit `b05999eb` (origin PR 8969) changed `Util.WriteAtomic` in `tools/rpf9dump/Util.cs` to stage writes to `Util.PartialName(path)` (`<path>.<pid>.<tid>.<guid>.partial`) instead of `<path>.partial`. Because the destination is no longer blocked by a `<target>.partial` directory, both tests exited `0` on unmodified `main`. Following `tests/test_ttpf_export_resume.py:69`, block the destination path itself with a directory (where `File.Exists` is `false` and `Util.MoveReplace` fails), verify no leaked `*.partial` temp files remain, and confirm retry succeeds once the directory blocker is removed. ### Tested On Windows 11 x64 (`.NET 8.0.401`, `Python 3.14.7`) at `68fd157f54892629049f205093383cf27df1e077`, synthetic archives only (no game data): - Before fix on `upstream/main` (`21625bca`): `python -I tests/test_rpf9dump_exit_codes.py` failed 2/8 (the two write-blocker tests above exited 0) - `dotnet build tools/rpf9dump/rpf9dump.csproj -c Release` — 0 warnings, 0 errors - `RPF9DUMP_DLL=... python -I tests/test_rpf9dump_exit_codes.py` — 8 ran, OK - `python -I tests/test_ci_registration.py` — 15 ran, OK - `python -I tests/test_text_write_line_endings.py` — 3 ran, OK - `python -I tests/test_check_no_game_data.py` & `python -I scripts/check_no_game_data.py` — OK / exit 0 - `python -m compileall -q tests/test_rpf9dump_exit_codes.py` — exit 0 GPUs tested: n/a AI-assisted: yes ### Checklist - [x] Based on current `main` (`21625bca`) and merges cleanly (a conflicting pull request is labeled `needs rebase`). - [x] One topic; follow-up work goes in a new pull request. - [x] No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here. - [ ] A new translator rule is in the contract table of `docs/design.md`, with how it was confirmed. (n/a — tests only)
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 09:14:10 +00:00
github manually merged commit 68fd157f54 into gh-pr/655/base 2026-11-26 09:14:13 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.