victory-hle: make the link-failure save test filesystem-independent #105

Manually merged
github merged 3 commits from github-bot/gh-105 into gh-pr/105/base 2026-12-01 14:40:58 +00:00 AGit
Owner

@⁠TheRifai on GitHub · 2026-12-01 13:57 UTC · original
TheRifai:flaky-save-test → main · +27 −22 · 1 files · 3 commits · merged 2026-12-01 14:37 UTC

What

The save-game test for a kept blob that cannot be hard-linked needed an NTFS temp folder with its 1024-link limit (docs/TASKS.md “Failing and flaky tests”). A test-only hook now makes hard_link appear to fail, so the same fallback is exercised on any filesystem; the test also checks the copied blob's bytes. No production path changes — the hook is #[cfg(test)].

The reference

No console counterpart: this fixes a test's dependence on a host filesystem feature.

Evidence

  • cargo xwin check -p victory-hle --target x86_64-pc-windows-msvc --features diagnostics --locked compiles.
  • cargo xwin test -p victory-hle --target x86_64-pc-windows-msvc --features diagnostics --locked a_kept_blob_that_cannot_be_linked_is_copied under Proton-GE11-16 on this Linux filesystem: 1 passed, 171 filtered.

Checklist (docs/AGENTS.md)

  • One topic; docs/TASKS.md not edited (rule 29/31)
  • No fallback added to production code; the hook is test-only (rule 33)
  • No constants, switches, queues, unsafe or translator output changed (rules 2/9b/35/36/27)
  • Comments say what is true now (rule 3)
  • Nothing from the title, no non-free data pointers (hard constraints)
**@⁠TheRifai** on GitHub · 2026-12-01 13:57 UTC · [original](https://github.com/vktory6/VKtory/pull/105) `TheRifai:flaky-save-test` → `main` · +27 −22 · 1 files · 3 commits · merged 2026-12-01 14:37 UTC ## What The save-game test for a kept blob that cannot be hard-linked needed an NTFS temp folder with its 1024-link limit (docs/TASKS.md “Failing and flaky tests”). A test-only hook now makes `hard_link` appear to fail, so the same fallback is exercised on any filesystem; the test also checks the copied blob's bytes. No production path changes — the hook is `#[cfg(test)]`. ## The reference No console counterpart: this fixes a test's dependence on a host filesystem feature. ## Evidence - `cargo xwin check -p victory-hle --target x86_64-pc-windows-msvc --features diagnostics --locked` compiles. - `cargo xwin test -p victory-hle --target x86_64-pc-windows-msvc --features diagnostics --locked a_kept_blob_that_cannot_be_linked_is_copied` under Proton-GE11-16 on this Linux filesystem: 1 passed, 171 filtered. ## Checklist (docs/AGENTS.md) - [x] One topic; `docs/TASKS.md` not edited (rule 29/31) - [x] No fallback added to production code; the hook is test-only (rule 33) - [x] No constants, switches, queues, `unsafe` or translator output changed (rules 2/9b/35/36/27) - [x] Comments say what is true now (rule 3) - [x] Nothing from the title, no non-free data pointers (hard constraints)
The test needed 1024 hard links on NTFS to make a kept blob's link fail. Add a
test-only hook that makes the link attempt fail instead, and assert the copy
fallback produces the exact bytes. The test now passes under Proton on a Linux
filesystem (docs/TASKS.md 'Failing and flaky tests').
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-01 13:57:42 +00:00
github-bot changed target branch from main to gh-pr/105/base 2026-12-01 14:40:56 +00:00
github manually merged commit efc29e2479 into gh-pr/105/base 2026-12-01 14:40:58 +00:00
Author
Owner

@⁠vktory6 on GitHub · 2026-12-01 14:37 UTC · original

Merged as a978616, thanks! Two changes on my side before merging: the injected failure now goes through the same or_else as a real one (a separate if branch was a second copy path, rule 33), and the hook is per thread, since tests run in parallel and a global flag could change another test's path. The task is updated: github.com/vktory6/VKtory@3ec9e3d

**@⁠vktory6** on GitHub · 2026-12-01 14:37 UTC · [original](https://github.com/vktory6/VKtory/pull/105#issuecomment-7314562674) Merged as a978616, thanks! Two changes on my side before merging: the injected failure now goes through the same `or_else` as a real one (a separate `if` branch was a second copy path, rule 33), and the hook is per thread, since tests run in parallel and a global flag could change another test's path. The task is updated: https://github.com/vktory6/VKtory/commit/3ec9e3d
This discussion has been locked. Commenting is limited to contributors.
No description provided.