Tests: add synthetic Xbox runtime conformance under Wine #505

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

@⁠pedrofort on GitHub · 2026-11-24 04:17 UTC · original
pedrofort:runtime-conformance → main · +942 −0 · 2 files · 1 commits · open

Objective

Add a reproducible synthetic runtime conformance harness for VIctory's Windows loader under Wine, initially validated on Apple Silicon.

Coverage

  • PE mapping and relocation

  • Xbox HLE initialization and uninitialization

  • Series X and Series S configurations

  • AVX2 and FMA arithmetic

  • Multithreading and synchronization

  • TLS callbacks and static thread-local storage

  • Virtual memory allocation

  • Virtual G: drive file access

  • Imported and dynamically loaded title DLLs

  • Missing import reporting and zero-return stubs

  • Map-only execution and alternate exit codes

Validation

Apple M5, macOS 27.2.1, Rosetta, Sikarugir Wine 10.0 and LLVM/LLD 23.1.6.

Check | Result -- | -- Fixture compilation | 12/12 Direct execution controls | 9/9 VIctory loader checks | 16/16 Total | 37/37 Failed | 0 Blocked | 0 Asset policy | PASS

The harness was rerun successfully after packaging it for this PR.

Scope

No runtime implementation changes. All fixtures are generated from original synthetic source outside the repository.

These results demonstrate the tested CPU and loader functionality under Wine on Apple Silicon, not commercial title compatibility or integrated graphics support.

Independent Linux/Wine validation is welcome.

No game files or proprietary assets were used.

AI-assisted implementation, with execution and validation performed locally on Apple Silicon.

**@⁠pedrofort** on GitHub · 2026-11-24 04:17 UTC · [original](https://github.com/Marvisak/VIctory/pull/505) `pedrofort:runtime-conformance` → `main` · +942 −0 · 2 files · 1 commits · open <h2><span>Objective</span></h2><p><span>Add a reproducible synthetic runtime conformance harness for VIctory's Windows loader under Wine, initially validated on Apple Silicon.</span></p><h2><span>Coverage</span></h2><ul><li><p><span>PE mapping and relocation</span></p></li><li><p><span>Xbox HLE initialization and uninitialization</span></p></li><li><p><span>Series X and Series S configurations</span></p></li><li><p><span>AVX2 and FMA arithmetic</span></p></li><li><p><span>Multithreading and synchronization</span></p></li><li><p><span>TLS callbacks and static thread-local storage</span></p></li><li><p><span>Virtual memory allocation</span></p></li><li><p><span>Virtual G: drive file access</span></p></li><li><p><span>Imported and dynamically loaded title DLLs</span></p></li><li><p><span>Missing import reporting and zero-return stubs</span></p></li><li><p><span>Map-only execution and alternate exit codes</span></p></li></ul><h2><span>Validation</span></h2><p><span>Apple M5, macOS 27.2.1, Rosetta, Sikarugir Wine 10.0 and LLVM/LLD 23.1.6.</span></p> Check | Result -- | -- Fixture compilation | 12/12 Direct execution controls | 9/9 VIctory loader checks | 16/16 Total | 37/37 Failed | 0 Blocked | 0 Asset policy | PASS <p><span>The harness was rerun successfully after packaging it for this PR.</span></p><h2><span>Scope</span></h2><p><span>No runtime implementation changes. All fixtures are generated from original synthetic source outside the repository.</span></p><p><span>These results demonstrate the tested CPU and loader functionality under Wine on Apple Silicon, not commercial title compatibility or integrated graphics support.</span></p><p><span>Independent Linux/Wine validation is welcome.</span></p><p><span>No game files or proprietary assets were used.</span></p><p><span>AI-assisted implementation, with execution and validation performed locally on Apple Silicon.</span></p>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:06:28 +00:00
Author
Owner

@⁠MichaelSmithAI on GitHub · 2026-11-24 10:19 UTC · original

Independent x86-64 Linux replay passed all 37 checks with Wine 11.22: 12 fixture builds, 9 direct execution controls, and 16 VIctory loader checks. All 37 ran, including thread-local storage, threading and the Series S HLE case.

We used the unmodified harness files from this PR with a Win64 GNU/LLVM build of VIctory main ffe310e. A fresh Wine prefix initially timed out during initialization. Disabling the optional mscoree and mshtml components alongside winemenubuilder let initialization finish and the harness run to completion. This was a synthetic CPU and loader run.

AI-assisted setup and verification.

**@⁠MichaelSmithAI** on GitHub · 2026-11-24 10:19 UTC · [original](https://github.com/Marvisak/VIctory/pull/505#issuecomment-7128620540) Independent x86-64 Linux replay passed all 37 checks with Wine 11.22: 12 fixture builds, 9 direct execution controls, and 16 VIctory loader checks. All 37 ran, including thread-local storage, threading and the Series S HLE case. We used the unmodified harness files from this PR with a Win64 GNU/LLVM build of VIctory main `ffe310e`. A fresh Wine prefix initially timed out during initialization. Disabling the optional `mscoree` and `mshtml` components alongside `winemenubuilder` let initialization finish and the harness run to completion. This was a synthetic CPU and loader run. AI-assisted setup and verification.
Author
Owner

@⁠Marvisak on GitHub · 2026-11-25 01:28 UTC · original

Automated triage for the maintainers.

Needs work. This needs the maintainer's decision.

tests/runtime/run.sh is a bash wrapper around about 880 lines of embedded Python. It creates a Wine prefix, runs clang, lld-link and llvm-dlltool, and starts wine and victory.exe as subprocesses, with macOS-specific DYLD_* setup. A harness that spawns external tools needs the maintainer's sign-off. It also adds a second test toolchain (Python, LLVM, Wine) next to the Rust one, and CI does not run it.

Concrete points:

  • main already covers synthetic loader and HLE loading in Rust: crates/victory-loader/tests/load_probe.rs builds tests/fixtures/hle-probe and runs it in CI. Cases this harness adds that are missing there could go into that fixture or test instead. These cases are relocation, TLS callbacks, the G: drive, missing-import stubs and Series S.
  • Running under Wine is being discussed separately in #1218 (xtask wine-test). A Wine-specific harness belongs with that decision.
  • The README's validation section (Apple M5, macOS version, Wine build) is a run report. It doesn't belong in the repo docs.

A smaller PR that adds the missing cases to the existing Rust fixture test would be easier to review.

CI: no check runs on the head commit.


Generated by Claude Code

**@⁠Marvisak** on GitHub · 2026-11-25 01:28 UTC · [original](https://github.com/Marvisak/VIctory/pull/505#issuecomment-7149577640) <!-- victory-triage v1 head=d4c8abf932a1a5b62b75b4eeb5c2fb39c55f13aa verdict=needs-work at=2026-11-25T01:27:59Z --> Automated triage for the maintainers. **Needs work.** This needs the maintainer's decision. `tests/runtime/run.sh` is a bash wrapper around about 880 lines of embedded Python. It creates a Wine prefix, runs `clang`, `lld-link` and `llvm-dlltool`, and starts `wine` and `victory.exe` as subprocesses, with macOS-specific `DYLD_*` setup. A harness that spawns external tools needs the maintainer's sign-off. It also adds a second test toolchain (Python, LLVM, Wine) next to the Rust one, and CI does not run it. Concrete points: - `main` already covers synthetic loader and HLE loading in Rust: `crates/victory-loader/tests/load_probe.rs` builds `tests/fixtures/hle-probe` and runs it in CI. Cases this harness adds that are missing there could go into that fixture or test instead. These cases are relocation, TLS callbacks, the G: drive, missing-import stubs and Series S. - Running under Wine is being discussed separately in #1218 (`xtask wine-test`). A Wine-specific harness belongs with that decision. - The README's validation section (Apple M5, macOS version, Wine build) is a run report. It doesn't belong in the repo docs. A smaller PR that adds the missing cases to the existing Rust fixture test would be easier to review. CI: no check runs on the head commit. --- _Generated by [Claude Code](https://claude.ai/code)_
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/505/head:github-bot/gh-505'
git switch 'github-bot/gh-505'

Merge

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