Tests: the five that read the test binary as a PE image are ignored off Windows #4932

Open
github-bot wants to merge 1 commit from github-bot/gh-4931 into main AGit
Owner

@⁠illuminatedfellow on GitHub · 2026-12-01 14:32 UTC · original
illuminatedfellow:linux-tests-skip-pe-self-read → main · +5 −0 · 2 files · 1 commits · open

On Linux (see docs/linux-proton.md), cargo test -p victory-pe -p victory-loader was never green: five tests use the test executable itself as their sample MSVC-linked PE32+ image, and there the test binary is an ELF file, so all five failed with Unknown file magic.

  • victory-pe: parses_own_test_binary, rva_to_file_offset_maps_entry_point, rva_to_file_offset_rejects_offsets_past_4_gib, rejects_iat_outside_image
  • victory-loader: title_patches_check_before_they_write

They are now ignored outside Windows, with the reason attached (#[cfg_attr(not(windows), ignore = "...")]). On Windows nothing changes: they still run.

On Linux: victory-pe 32 passed, 4 ignored; victory-loader 11 passed, 1 ignored (they were 4 and 1 failed). Test attributes only, no code change.

**@⁠illuminatedfellow** on GitHub · 2026-12-01 14:32 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4931) `illuminatedfellow:linux-tests-skip-pe-self-read` → `main` · +5 −0 · 2 files · 1 commits · open On Linux (see `docs/linux-proton.md`), `cargo test -p victory-pe -p victory-loader` was never green: five tests use the test executable itself as their sample MSVC-linked PE32+ image, and there the test binary is an ELF file, so all five failed with `Unknown file magic`. - `victory-pe`: `parses_own_test_binary`, `rva_to_file_offset_maps_entry_point`, `rva_to_file_offset_rejects_offsets_past_4_gib`, `rejects_iat_outside_image` - `victory-loader`: `title_patches_check_before_they_write` They are now ignored outside Windows, with the reason attached (`#[cfg_attr(not(windows), ignore = "...")]`). On Windows nothing changes: they still run. On Linux: `victory-pe` 32 passed, 4 ignored; `victory-loader` 11 passed, 1 ignored (they were 4 and 1 failed). Test attributes only, no code change.
victory-pe's parses_own_test_binary, rva_to_file_offset_maps_entry_point,
rva_to_file_offset_rejects_offsets_past_4_gib and rejects_iat_outside_image,
and victory-loader's title_patches_check_before_they_write, use the test
executable itself as their sample MSVC-linked PE32+ image. On Linux (see
docs/linux-proton.md) the test binary is an ELF file, so all five failed with
"Unknown file magic" and `cargo test -p victory-pe -p victory-loader` was
never green there. They are now ignored outside Windows, with the reason
attached; on Windows nothing changes.

On Linux: victory-pe 32 passed, 4 ignored; victory-loader 11 passed,
1 ignored (were 4 and 1 failed).
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-01 14:33:39 +00:00
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/4932/head:github-bot/gh-4931'
git switch 'github-bot/gh-4931'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-4931'
git switch 'github-bot/gh-4931'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-4931'
git switch 'github-bot/gh-4931'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-4931'
git switch 'main'
git merge --squash 'github-bot/gh-4931'
git switch 'main'
git merge --ff-only 'github-bot/gh-4931'
git switch 'main'
git merge 'github-bot/gh-4931'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No reviewers
No milestone
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
github/trustno1-coder--VIctory-NVIDIA!4932
No description provided.