Tests: allow prebuilt HLE probe DLL via VICTORY_HLE_PROBE_DLL #1631

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

@⁠fuzeofficlal on GitHub · 2026-11-24 20:06 UTC · original
fuzeofficlal:feat/test-hle-probe-env-and-gnu-delayload-989 → main · +44 −2 · 1 files · 1 commits · open

Closes #989.

Summary

  • Factor VICTORY_HLE_PROBE_DLL path resolution into probe_dll_override(Option<&OsStr>) in crates/victory-loader/tests/load_probe.rs so build_probe() uses a prebuilt probe DLL directly when set, falling back to building tests/fixtures/hle-probe via Cargo.

Testing

  • Added in-process unit test probe_dll_override_validates_file_paths covering unset, empty, valid file, missing file, and directory override inputs.
  • cargo test -p victory-loader --locked, cargo clippy, and cargo xtask policy.
**@⁠fuzeofficlal** on GitHub · 2026-11-24 20:06 UTC · [original](https://github.com/Marvisak/VIctory/pull/1631) `fuzeofficlal:feat/test-hle-probe-env-and-gnu-delayload-989` → `main` · +44 −2 · 1 files · 1 commits · open Closes #989. ### Summary - Factor `VICTORY_HLE_PROBE_DLL` path resolution into `probe_dll_override(Option<&OsStr>)` in `crates/victory-loader/tests/load_probe.rs` so `build_probe()` uses a prebuilt probe DLL directly when set, falling back to building `tests/fixtures/hle-probe` via Cargo. ### Testing - Added in-process unit test `probe_dll_override_validates_file_paths` covering unset, empty, valid file, missing file, and directory override inputs. - `cargo test -p victory-loader --locked`, `cargo clippy`, and `cargo xtask policy`.
Let build_probe() accept an existing file path from VICTORY_HLE_PROBE_DLL before falling back to invoking Cargo, and cover the override path helper with a direct unit test.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:38:57 +00:00
Author
Owner

@⁠acetonahard-code on GitHub · 2026-11-24 22:13 UTC · original

Tested on Windows 11 with the repo toolchain, merged into current main (70564ae):

cargo test -p victory-loader passed failed ignored
main 25 0 0
main + this PR 26 0 0
main, --all-features 26 0 -
main + this PR, --all-features 27 0 -
  • The new test passes.
  • cargo clippy --all-targets -- -D warnings, with and without --all-features: clean.

I didn't test with game data.


Tested locally with an AI-assisted script (Claude Code); I checked the results before posting.

**@⁠acetonahard-code** on GitHub · 2026-11-24 22:13 UTC · [original](https://github.com/Marvisak/VIctory/pull/1631#issuecomment-7145966697) Tested on Windows 11 with the repo toolchain, merged into current `main` (70564ae): | `cargo test -p victory-loader` | passed | failed | ignored | |---|---|---|---| | `main` | 25 | 0 | 0 | | `main` + this PR | 26 | 0 | 0 | | `main`, `--all-features` | 26 | 0 | - | | `main` + this PR, `--all-features` | 27 | 0 | - | - The new test passes. - `cargo clippy --all-targets -- -D warnings`, with and without `--all-features`: clean. I didn't test with game data. --- <sub>Tested locally with an AI-assisted script (Claude Code); I checked the results before posting.</sub>
Author
Owner

@⁠Marvisak on GitHub · 2026-11-25 03:32 UTC · original · edited 2026-11-26 01:19 UTC

Automated triage for the maintainers.

Merge candidate (a recommendation to look, not an approval). The new head is the same test-only change rebased onto current main: build_probe() in crates/victory-loader/tests/load_probe.rs uses a prebuilt fixture DLL from VICTORY_HLE_PROBE_DLL when it is set and non-empty, as #989 asks, and otherwise builds the fixture with cargo as before. probe_dll_override refuses a missing file or a directory, and is tested in-process with tempfile, already a dev-dependency of the crate. No build.rs or process changes remain, and the Wine run in this thread shows the override working.

The branch merges cleanly. CI: check passing.


Generated by Claude Code

**@⁠Marvisak** on GitHub · 2026-11-25 03:32 UTC · [original](https://github.com/Marvisak/VIctory/pull/1631#issuecomment-7152005613) · edited 2026-11-26 01:19 UTC <!-- victory-triage v1 head=ee229b3b7818ccbe68876ea0ff24545a0c673c4d verdict=merge-candidate at=2026-11-26T01:19:13Z --> Automated triage for the maintainers. **Merge candidate** (a recommendation to look, not an approval). The new head is the same test-only change rebased onto current `main`: `build_probe()` in `crates/victory-loader/tests/load_probe.rs` uses a prebuilt fixture DLL from `VICTORY_HLE_PROBE_DLL` when it is set and non-empty, as #989 asks, and otherwise builds the fixture with cargo as before. `probe_dll_override` refuses a missing file or a directory, and is tested in-process with `tempfile`, already a dev-dependency of the crate. No `build.rs` or process changes remain, and the Wine run in this thread shows the override working. The branch merges cleanly. CI: `check` passing. --- _Generated by [Claude Code](https://claude.ai/code)_
Author
Owner

@⁠fuzeofficlal on GitHub · 2026-11-25 04:42 UTC · original

Rebased onto 940d32f (5294314c) and dropped both the tests/fixtures/hle-probe/build.rs change and the child-process re-execution in load_probe.rs. The branch now touches only crates/victory-loader/tests/load_probe.rs, factoring VICTORY_HLE_PROBE_DLL resolution into probe_dll_override(Option<&OsStr>) and testing it directly in-process.

**@⁠fuzeofficlal** on GitHub · 2026-11-25 04:42 UTC · [original](https://github.com/Marvisak/VIctory/pull/1631#issuecomment-7153094961) Rebased onto `940d32f` (`5294314c`) and dropped both the `tests/fixtures/hle-probe/build.rs` change and the child-process re-execution in `load_probe.rs`. The branch now touches only `crates/victory-loader/tests/load_probe.rs`, factoring `VICTORY_HLE_PROBE_DLL` resolution into `probe_dll_override(Option<&OsStr>)` and testing it directly in-process.
Author
Owner

@⁠astrosteveo on GitHub · 2026-11-25 05:44 UTC · original

A run on the kind of host this helps (Arch Linux, Wine 11.22, no Rust toolchain inside Wine), 5294314 merged onto main 940d32f:

cargo test -p victory-loader --test load_probe under Wine loads_binds_and_calls_probe
MSVC test build, variable unset fails: it can't run cargo there
MSVC test build, VICTORY_HLE_PROBE_DLL set to an MSVC-built hle_probe.dll passes, and so do the other two tests
x86_64-pc-windows-gnu test build, the same DLL aborts: "current thread handle already set during thread spawn"

So with the variable the test runs under Wine, and it found the DLL from a Z:\ path. I built the DLL with cargo xwin build --manifest-path tests/fixtures/hle-probe/Cargo.toml --target x86_64-pc-windows-msvc. The fixture does not build for x86_64-pc-windows-gnu here, so there was no GNU DLL to try. I have not looked into the abort; it only happens with the GNU test executable.


Co-Authored-By: Claude Opus 5.5 <[email protected]>

**@⁠astrosteveo** on GitHub · 2026-11-25 05:44 UTC · [original](https://github.com/Marvisak/VIctory/pull/1631#issuecomment-7154086259) A run on the kind of host this helps (Arch Linux, Wine 11.22, no Rust toolchain inside Wine), `5294314` merged onto `main` `940d32f`: | `cargo test -p victory-loader --test load_probe` under Wine | `loads_binds_and_calls_probe` | |---|---| | MSVC test build, variable unset | fails: it can't run cargo there | | MSVC test build, `VICTORY_HLE_PROBE_DLL` set to an MSVC-built `hle_probe.dll` | passes, and so do the other two tests | | `x86_64-pc-windows-gnu` test build, the same DLL | aborts: "current thread handle already set during thread spawn" | So with the variable the test runs under Wine, and it found the DLL from a `Z:\` path. I built the DLL with `cargo xwin build --manifest-path tests/fixtures/hle-probe/Cargo.toml --target x86_64-pc-windows-msvc`. The fixture does not build for `x86_64-pc-windows-gnu` here, so there was no GNU DLL to try. I have not looked into the abort; it only happens with the GNU test executable. --- <sub>Co-Authored-By: Claude Opus 5.5 &lt;[email protected]&gt;</sub>
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/1631/head:github-bot/gh-1631'
git switch 'github-bot/gh-1631'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-1631'
git switch 'github-bot/gh-1631'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-1631'
git switch 'github-bot/gh-1631'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-1631'
git switch 'main'
git merge --squash 'github-bot/gh-1631'
git switch 'main'
git merge --ff-only 'github-bot/gh-1631'
git switch 'main'
git merge 'github-bot/gh-1631'
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/Marvisak--VIctory!1631
No description provided.