Tests: cover mapped module table, lock-free lookup, and HLE handles #1473
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1483"
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?
Imported from ivall/xcl. Originally posted by amazedturnip on 2026-11-24T16:48:50Z.
Add integration tests in
crates/xcl/tests/modules_table.rscoveringcrates/xcl/src/modules.rs(mapped module registration/unregistration, lock-freeimage_base_for_addrlookup,set_main/main_module, HLE pseudo-handles, anddescribe_addressfor mapped and host modules). Previously only 2 inline unit tests coveredmodule_offsetand arbitrary stack words.What is in it
crates/xcl/tests/modules_table.rs: add 5 integration tests coveringMappedModule::contains,register_mapped/unregister_mapped, lock-freeimage_base_for_addr,find_mapped_by_{name,base,addr},set_main/main_module,hle_handle/find_hle_handle/hle_name_by_handle, anddescribe_addressfor mapped and host modulesTested
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)Not tested
AI use
Imported from ivall/xcl. Originally posted by dcastell1 on 2026-11-24T16:55:27Z.
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):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.
Imported from ivall/xcl. Originally posted by futurepro62 on 2026-11-24T17:18:18Z.
An AMD run to go with the RTX 5090 report above. Tested exact head
84e7d21(on its baseb7aa9f3).Tested
XCL_ADAPTER=radeon cargo test --workspace -- --test-threads=4: 775 passed, 0 failed, 41 ignored, nothing skipped.XCL_REQUIRE_GPU=mesh: 775 passed, 0 failed (the usual two wave64-only skips).AI use
Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-24T18:53:25Z.
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 unmodifiedmain.)Thanks!
Imported from ivall/xcl. Originally posted by github-actions[bot] on 2026-11-28T08:00:41Z.
Nothing has happened on this PR for 3 days, so it is marked
staleand will be closed in 4 days. A push or a comment takes the mark off: rebase it ontomainif it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.Imported from ivall/xcl. Originally posted by amazedturnip on 2026-11-28T20:36:41Z.
Still merges cleanly onto main (
765b2c5b) with passing checks; pins mapped module table registration, lock-free lookup, and HLE handle contracts — waiting on maintainer / post-goal review.Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T05:54:38Z.
Triage (#1607) – head
84e7d21No open or merged PR adds the same tests; the unit tests in crates/xcl/src/modules.rs on main cover the RangeTable itself, this file covers the public register/lookup/unregister, main-module and HLE-handle API from outside the crate.
No problems found in the diff: the global-state tests are serialized by GLOBAL_LOCK, and
set_main_and_main_module_track_latest_mainrelies on no other test in this binary setting the main module, which holds for this file.Recommendation: keep open.
AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.