Tests: cover mapped module table, lock-free lookup, and HLE handles #1483

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

@⁠amazedturnip on GitHub · 2026-11-24 16:48 UTC · original
amazedturnip:xcl/tests-modules-table-registration-lookup-and-hle--011856 → main · +158 −0 · 1 files · 1 commits · open

Add integration tests in crates/xcl/tests/modules_table.rs covering crates/xcl/src/modules.rs (mapped module registration/unregistration, lock-free image_base_for_addr lookup, set_main/main_module, HLE pseudo-handles, and describe_address for mapped and host modules). Previously only 2 inline unit tests covered module_offset and arbitrary stack words.

What is in it

  • crates/xcl/tests/modules_table.rs: add 5 integration tests covering MappedModule::contains, register_mapped/unregister_mapped, lock-free image_base_for_addr, find_mapped_by_{name,base,addr}, set_main/main_module, hle_handle/find_hle_handle/hle_name_by_handle, and describe_address for mapped and host modules

Tested

  • Hardware / OS / Rust: AMD Ryzen 7 9800X3D 8-Core Processor, Windows 11 Pro 10.0.26100 (Build 26100), rustc 1.94.1 (e408947bf 2026-03-25), stable-x86_64-pc-windows-msvc, debug build
  • AMD (AMD Radeon(TM) Graphics (driver 32.0.21043.19003, DXC 1.9.2609, native wave64), XCL_ADAPTER=radeon): cargo test --workspace -- --test-threads=2 — 775 passed, 0 failed, 41 ignored (SKIPPED GPU tests: none)
  • Verification / negative control: new test suite — verified 3x deterministic

Not tested

  • Retail Xbox Series X|S title (not available on this host)
  • NVIDIA wave32 GPU (not run in this pass; verified on AMD Radeon native wave64)

AI use

  • Antigravity CLI (Gemini 4 Hydrogen (Medium)) assisted with diagnosis, implementation, tests, review, and description; all tests executed locally on AMD Radeon (native wave64).
**@⁠amazedturnip** on GitHub · 2026-11-24 16:48 UTC · [original](https://github.com/xcl-dev/xcl/pull/1483) `amazedturnip:xcl/tests-modules-table-registration-lookup-and-hle--011856` → `main` · +158 −0 · 1 files · 1 commits · open Add integration tests in `crates/xcl/tests/modules_table.rs` covering `crates/xcl/src/modules.rs` (mapped module registration/unregistration, lock-free `image_base_for_addr` lookup, `set_main`/`main_module`, HLE pseudo-handles, and `describe_address` for mapped and host modules). Previously only 2 inline unit tests covered `module_offset` and arbitrary stack words. **What is in it** - `crates/xcl/tests/modules_table.rs`: add 5 integration tests covering `MappedModule::contains`, `register_mapped`/`unregister_mapped`, lock-free `image_base_for_addr`, `find_mapped_by_{name,base,addr}`, `set_main`/`main_module`, `hle_handle`/`find_hle_handle`/`hle_name_by_handle`, and `describe_address` for mapped and host modules **Tested** - Hardware / OS / Rust: AMD Ryzen 7 9800X3D 8-Core Processor, Windows 11 Pro 10.0.26100 (Build 26100), rustc 1.94.1 (e408947bf 2026-03-25), stable-x86_64-pc-windows-msvc, debug build - AMD (`AMD Radeon(TM) Graphics (driver 32.0.21043.19003, DXC 1.9.2609, native wave64)`, `XCL_ADAPTER=radeon`): `cargo test --workspace -- --test-threads=2` — 775 passed, 0 failed, 41 ignored (SKIPPED GPU tests: none) - Verification / negative control: new test suite — verified 3x deterministic **Not tested** - Retail Xbox Series X|S title (not available on this host) - NVIDIA wave32 GPU (not run in this pass; verified on AMD Radeon native wave64) **AI use** - Antigravity CLI (Gemini 4 Hydrogen (Medium)) assisted with diagnosis, implementation, tests, review, and description; all tests executed locally on AMD Radeon (native wave64).
Add integration tests in crates/xcl/tests/modules_table.rs exercising crates/xcl/src/modules.rs: MappedModule::contains bounds, register_mapped/unregister_mapped, lock-free image_base_for_addr, find_mapped_by_{name,base,addr}, set_main/main_module, hle_handle/find_hle_handle/hle_name_by_handle, and describe_address on mapped and host modules.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:55:18 +00:00
Author
Owner

@⁠dcastell1 on GitHub · 2026-11-24 16:55 UTC · original

Verified on Windows 11 10.0.26300, NVIDIA GeForce RTX 5090 (driver 621.24), Rust 1.100.0 MSVC 14.44.35207, debug build, on main@b7aa9f3 (baseline 770 passed, 0 failed, 41 ignored on this box):

patch -p1 < this PR            # clean, no fuzz
cargo test --workspace -- --test-threads=4
775 passed; 0 failed; 41 ignored   (exit 0)

Five more passing tests than the baseline: the mapped module table and its lock-free lookup ship real coverage and it runs green.

Tree restored afterwards (full diff against a clean checkout), hardware adapter, no Wine, no game data. AI-assisted (opencode): applied the patch to a built tree, ran the suite, reverted it.

**@⁠dcastell1** on GitHub · 2026-11-24 16:55 UTC · [original](https://github.com/xcl-dev/xcl/pull/1483#issuecomment-7138416340) Verified on Windows 11 10.0.26300, NVIDIA GeForce RTX 5090 (driver 621.24), Rust 1.100.0 MSVC 14.44.35207, debug build, on `main@b7aa9f3` (baseline **770 passed, 0 failed, 41 ignored** on this box): ``` patch -p1 < this PR # clean, no fuzz cargo test --workspace -- --test-threads=4 775 passed; 0 failed; 41 ignored (exit 0) ``` Five more passing tests than the baseline: the mapped module table and its lock-free lookup ship real coverage and it runs green. Tree restored afterwards (full diff against a clean checkout), hardware adapter, no Wine, no game data. AI-assisted (opencode): applied the patch to a built tree, ran the suite, reverted it.
Author
Owner

@⁠futurepro62 on GitHub · 2026-11-24 17:18 UTC · original

An AMD run to go with the RTX 5090 report above. Tested exact head 84e7d21 (on its base b7aa9f3).

Tested

  • AMD Radeon iGPU of a Ryzen 7 9800X3D (RDNA2, native wave64), XCL_ADAPTER=radeon cargo test --workspace -- --test-threads=4: 775 passed, 0 failed, 41 ignored, nothing skipped.
  • Same head on an RTX 5070 Ti (driver 616.64), XCL_REQUIRE_GPU=mesh: 775 passed, 0 failed (the usual two wave64-only skips).

AI use

  • Claude Code (Claude Opus 5.5) ran the tests and wrote this comment. I checked it before posting.
**@⁠futurepro62** on GitHub · 2026-11-24 17:18 UTC · [original](https://github.com/xcl-dev/xcl/pull/1483#issuecomment-7138993322) An AMD run to go with the RTX 5090 report above. Tested exact head `84e7d21` (on its base `b7aa9f3`). **Tested** - AMD Radeon iGPU of a Ryzen 7 9800X3D (RDNA2, native wave64), `XCL_ADAPTER=radeon cargo test --workspace -- --test-threads=4`: **775 passed, 0 failed, 41 ignored**, nothing skipped. - Same head on an RTX 5070 Ti (driver 616.64), `XCL_REQUIRE_GPU=mesh`: 775 passed, 0 failed (the usual two wave64-only skips). **AI use** - Claude Code (Claude Opus 5.5) ran the tests and wrote this comment. I checked it before posting.
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-24 18:53 UTC · original

Verification on RTX 3060 Ti (Windows 11), branch merged with current main:

  • cargo test -p xcl --lib: all passed, 0 failed, ~21 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling; clean on single-threaded rerun — same flake seen on unmodified main.)

Thanks!

**@⁠DavidM1911** on GitHub · 2026-11-24 18:53 UTC · [original](https://github.com/xcl-dev/xcl/pull/1483#issuecomment-7141295002) Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, ~21 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling; clean on single-threaded rerun — same flake seen on unmodified `main`.) Thanks!
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/1483/head:github-bot/gh-1483'
git switch 'github-bot/gh-1483'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-1483'
git switch 'github-bot/gh-1483'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-1483'
git switch 'github-bot/gh-1483'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-1483'
git switch 'main'
git merge --squash 'github-bot/gh-1483'
git switch 'main'
git merge --ff-only 'github-bot/gh-1483'
git switch 'main'
git merge 'github-bot/gh-1483'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.