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

Closed
opened 2026-11-26 20:18:44 +01:00 by 4ld0 · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/655
Author: @kirigayakazima
Created: 11/24/2026
Status: ✅ Merged
Merged: 11/24/2026
Merged by: @ubiquitarianism

Base: main ← Head: fix/rpf9dump-write-blocker-tests


📝 Commits (1)

  • 68fd157 tests: block destination path in rpf9dump write-failure exit-code tests (TEST-RPF9DUMP-WRITE-BLOCKER)

📊 Changes

1 file changed (+8 additions, -4 deletions)

View changed files

📝 tests/test_rpf9dump_exit_codes.py (+8 -4)

📄 Description

Claimed in the coordination issue as: TEST-RPF9DUMP-WRITE-BLOCKER (https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7129571335)

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)

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ubiquitarianism/leonida/pull/655 **Author:** [@kirigayakazima](https://github.com/kirigayakazima) **Created:** 11/24/2026 **Status:** ✅ Merged **Merged:** 11/24/2026 **Merged by:** [@ubiquitarianism](https://github.com/ubiquitarianism) **Base:** `main` ← **Head:** `fix/rpf9dump-write-blocker-tests` --- ### 📝 Commits (1) - [`68fd157`](https://github.com/ubiquitarianism/leonida/commit/68fd157f54892629049f205093383cf27df1e077) tests: block destination path in rpf9dump write-failure exit-code tests (TEST-RPF9DUMP-WRITE-BLOCKER) ### 📊 Changes **1 file changed** (+8 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `tests/test_rpf9dump_exit_codes.py` (+8 -4) </details> ### 📄 Description Claimed in the coordination issue as: TEST-RPF9DUMP-WRITE-BLOCKER (https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7129571335) ### 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) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
4ld0 2026-11-26 20:18:44 +01:00
Sign in to join this conversation.
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
starred/leonida#696
No description provided.