XGameSave: test the copy fallback without an NTFS volume #2674
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory!2674
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2674"
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?
@SinisterRob on GitHub · 2026-11-25 17:56 UTC · original
hle/portable-save-copy-test→main· +27 −15 · 1 files · 1 commits · closed without mergingThe kept-blob regression currently makes 1,024 hard links and expects the last one to fail. Under Wine on ext4 the filesystem accepts it, so the test fails before checking the save.
Pass a link function into the version writer. Production supplies the filesystem hard-link call. The regression supplies a link operation that returns
TooManyLinksfor the kept blob, then checks the committed version still contains that blob's original bytes alongside the updated blob.Tested on Wine 11.22 on ext4. The original test failed because the extra link succeeded. The revised test passes, along with the save interruption and recovery tests. Separate Winsock test behavior on Wine is tracked in #2249. No game data. AI-assisted.
@oni-swr on GitHub · 2026-11-25 18:23 UTC · original
Independent verification of #2674 (XGameSave: copy-fallback test without an NTFS volume)
PR head
d81fbb241f723152e1303c1467a6c72184f6a26c, merges cleanly ontoorigin/main13f91caee25f2fdf2c062be5f7a27f058e51cbca.Environment: Windows 11 Pro 10.0.26200, rustc 1.98.1, CPU only,
-j 4 --locked.Tests/clippy vs baseline.
origin/main:cargo test -p victory-hle --lib --locked= 146 passed, 0 failed. With #2674: 146 passed, 0 failed (the test is rewritten, not added).cargo clippy -p victory-hle --all-targets --locked: 0 warnings on both.Diff review. Production behaviour is unchanged:
commitnow callscommit_with_linkwithstd::fs::hard_link, and the closure replaces the direct call. The test injectsErrorKind::TooManyLinksfor exactly the kept blob, asserts the source and destination paths it receives, then checks the new version's contents and that the old blob is gone. It no longer needs an NTFS temp folder or 1023 extra links, and it is no longercfg(windows).Negative control (scratch, not committed). Changing the production line to
link(from, &path)?(no copy fallback) makes the test fail:called Result::unwrap() on an Err value: Kind(TooManyLinks). With the fallback restored it passes.Findings: no bugs. Nit: the test no longer runs the real
hard_linkpath (it only checks thatcommitforwards it), and the old assertion that the other links to the old blob stay intact went away with the link flood; fine for a unit test, but nothing now checks that a real over-limithard_linkreportsTooManyLinkson NTFS.Limits: no non-NTFS volume was available, so a real FAT/exFAT path was not run; the injected error stands in for it. No game files.
AI-assisted: independent verification by Claude Code / Claude Sonnet 5.5, run on behalf of oni-swr. Claims for #1633.
@kotekompotek on GitHub · 2026-11-25 18:35 UTC · original
Injecting the link operation is the right fix - the test now exercises the fallback deterministically instead of depending on NTFS's 1024-link ceiling, and it works on filesystems without a hard-link limit (ext4/Wine). Dropping the cfg(windows) gate is a bonus. Verified: production still passes std::fs::hard_link, and the test asserts the kept blob's bytes survive via the copy path.
@fuzeofficlal on GitHub · 2026-11-25 19:15 UTC · original
Independent Windows 11 verification and review of
d81fbb2(on13f91ca):Verification (
rustc 1.98.1MSVC)cargo clippy --locked -p victory-hle --all-targets -- -D warningsand--features diagnostics: 0 warnings.cargo test --locked -p victory-hle --lib -- xgamesave: 11 passed, 0 failed (includinga_kept_blob_past_the_link_limit_is_copied).cargo test --locked -p victory-hle: 146 passed (lib), plusfidelityfx(1) andno_dll_planting(1) clean.Review Notes
commitontocommit_with_link(..., std::fs::hard_link)preserves the exact atomicv{n}.new -> sync_all -> MANIFEST -> renameproduction path while lettinga_kept_blob_past_the_link_limit_is_copieddeterministically triggerErrorKind::TooManyLinkswithout relying on NTFS's 1024 hard-link limit. Clean and ready to merge.@Kajanos on GitHub · 2026-11-25 20:43 UTC · original
Linux / Wine run (no NTFS), head
d81fbb241fmerged ontomain13f91caee2.Setup: Linux (Gentoo) / wine-proton 11.0.3 / vkd3d-proton 3.1, RTX 5080, NVIDIA 620.73.04; cross-built with cargo-xwin for
x86_64-pc-windows-msvc, rustc 1.98.1. The Wine temp folder is on ext4.main,xgamesave::tests::a_kept_blob_past_the_link_limit_is_copiedfails here withthe temp folder must be on NTFS, which allows 1024 links to a file.cargo xwin test -p victory-hle: 145 passed, 1 failed. The one failure,net::tests::only_loopback_is_reachable(ws2_32.dll lacks WSAConnectByList), is a Wine gap that also fails onmain.Not run: Windows/NTFS (others above have covered it), clippy.
AI-assisted (Claude Code)
@Marvisak on GitHub · 2026-11-25 23:24 UTC · original
Automated triage for the maintainers.
This splits
commitincrates/victory-hle/src/modules/xgamesave.rsinto a thin wrapper overcommit_with_link, which takes the link function; production still passesstd::fs::hard_link, so the save path is unchanged. The testa_kept_blob_past_the_link_limit_is_copiednow injectsTooManyLinksfor the kept blob instead of creating 1,023 real links, so it no longer depends on NTFS and drops itscfg(windows)gate while still checking that the copy fallback keeps the blob's bytes. It merges cleanly alongside #2675, which edits the same file. CI (check) passes.This is a recommendation for a maintainer to look, not an approval.
Generated by Claude Code
Pull request closed