Tests: cover CLWB, MONITORX, MWAITX, and faulting CLZERO in eh #1829
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
goal:world-load
good first issue
help wanted
invalid
keep-open
off-goal
question
stale
test-only
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/xcl-dev--xcl!1829
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1829"
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?
@n-romanovich on GitHub · 2026-11-24 21:32 UTC · original
n-romanovich:tests/eh-console-insns→main· +97 −0 · 1 files · 1 commits · openTest-only PR covering untested
emulate_console_onlypaths incrates/xcl/src/eh.rs.What is in it
crates/xcl/src/eh.rs(#[cfg(test)] mod tests):MappedCodeRAII helper for mapped test code pages.clwb_patches_instruction_bytes_to_nop_and_advances_rip: verifiesCLWB [rax](66 0F AE 30) onPAGE_EXECUTE_READpatches the 4 instruction bytes to0x90, advancesRipby 4, and restoresPAGE_EXECUTE_READ.monitorx_mwaitx_step_and_ud2_or_unknown_return_zero: verifiesMONITORX/MWAITXadvanceRipby 3, whileUD2and non-console illegal opcodes return0without advancingRip.clzero_on_unwritable_memory_does_not_advance_rip: verifiesCLZEROtargetingPAGE_READONLYmemory returns0and leavesRipunchanged.Tested
Hardware: Windows 11 x64, NVIDIA GeForce RTX 5060 Ti.
cargo test -p xcl --lib eh::tests -- --test-threads=4:9 passed; 0 failed; 0 ignoredcargo test --workspace -- --test-threads=4:894 passed; 0 failed; 42 ignoredSKIPPED:gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask(no wave64),gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware(no wave64),shaders::tests::pso_measurement_compiles_an_exact_synthetic_record(Windows Developer Mode is required),heap_window_out_of_memory_falls_back_to_the_switch_form(no heap windows)Regression run
Main (
4178e888c0b5be50a2887eda45cdb832763b68a4):PR (
61400714562d119b2aa727996ef9f95bfc0aa34a):Not tested
AI use
Claude Sonnet 5.5): wrote the unit tests, ran the workspace test suite andsmoke.ps1, and verified the diff with an independent auditor subagent.@futurepro62 on GitHub · 2026-11-24 22:40 UTC · original · edited 2026-11-24 22:48 UTC
Full-suite run, since this PR has no test report yet. Tested exact head
6140071(on its base4178e88).Tested
cargo build --workspace, thenXCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4 --skip heap_window_out_of_memory_falls_back_to_the_switch_form --skip gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::integer_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::f64_programs_on_the_gpu: 893 passed, 0 failed, 42 ignored. SKIPPED (no wave64):gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware.clwb_patches_instruction_bytes_to_nop_and_advances_rip,monitorx_mwaitx_step_and_ud2_or_unknown_return_zero,clzero_on_unwritable_memory_does_not_advance_rip.XCL_ADAPTER=radeon),cargo test --workspace -- --test-threads=4: 894 passed, 0 failed, 42 ignored. SKIPPED:heap_window_out_of_memory_falls_back_to_the_switch_form(no heap windows).--skipleaves out five tests where this PR's base has them. They fail on main689f2dbtoo, not because of this PR: underXCL_REQUIRE_GPU=mesh,runner::skip_testturns their skips into failures. These areheap_window_out_of_memory_falls_back_to_the_switch_form(#1651) and the fourgpu::recomp::lower_dxil::tests::*_programs_on_the_gputests (follow-up on #1651). The AMD run does not setXCL_REQUIRE_GPU.Not tested
AI use
@DavidM1911 on GitHub · 2026-11-25 00:50 UTC · original
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, ~23 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.)Thanks!
@JJAutoCompare on GitHub · 2026-11-25 01:14 UTC · original
Empirical test report for PR #1829 at commit
61400714562d119b2aa727996ef9f95bfc0aa34a(origin/main=5796cc467d80e3dac5d7d231ec34f1b0bebce169;git merge-tree --write-tree origin/main HEADexited0, clean merge into treec79068f343819014189c07b879b120ad961e370f).Diff scope verified: test-only addition in
crates/xcl/src/eh.rs(+97 lines in#[cfg(test)] mod tests).Tested
32.0.101.9175,XCL_ADAPTER=A770), AMD Ryzen 7 3800X 8-Core Processor (6 cores / 12 logical processors exposed in VM; Zen 2 natively supportsCLWB/MONITORX/MWAITX/CLZERO, though the PR's tests exerciseemulate_console_only(&mut ctx)directly on mapped test pages), Microsoft Windows 11 Enterprise Evaluation10.0.26200(Build26200),rustc 1.100.0 (0ef1bc386 2026-11-09)/cargo 1.100.0, debug (test/dev) profile, DXC1.9.2609.5 (01b62ad47)(dxil 1.9.2609.5).cargo test --workspace --no-run: passed (exit 0)cargo build --workspace: passed (exit 0)ehunit tests:cargo test -p xcl --lib eh::tests -- --show-output: 9 passed, 0 failed, 0 ignored (858 filtered out; 0.04s), including all 3 new PR #1829 tests:eh::tests::clwb_patches_instruction_bytes_to_nop_and_advances_rip—okeh::tests::monitorx_mwaitx_step_and_ud2_or_unknown_return_zero—okeh::tests::clzero_on_unwritable_memory_does_not_advance_rip—okcargo test --workspace -- --test-threads=4 --show-output: stopped afterxcl --lib(828 passed, 17 failed, 22 ignored; 4SKIPPEDlines inxcl --lib).cargo test --workspace --no-fail-fast -- --test-threads=4 --show-output: across all 20 test binaries (including doc-tests), 876 passed, 18 failed, 42 ignored (0 measured, 0 filtered out).crates/xcl/src/eh.rs:CreateComputePipelineState: The parameter is incorrect. (0x80070057)inxcl --lib:gpu::dxil::ops_tests::{doubles_match_cpu, groupshared_barrier_and_atomics_run},gpu::recomp::tests::{gpu_clamp_and_omod_per_instruction, gpu_f64_class_compare, gpu_f64_compares_with_nan, gpu_f64_literal_high_word, gpu_f64_math_random, gpu_f64_roots, gpu_f64_rounding_and_conversions, gpu_float_compares_random, gpu_frexp_f64_exp_and_mant, gpu_ldexp_f64, gpu_rndne_f64}.xcl --lib:gpu::recomp::tests::{gpu_nonfused_mad_and_mac_prevent_fma_contraction, gpu_ps_image_sample_offset_implicit_lod_between_mips, gpu_valu_16_and_64_bit, gpu_wave64_ps_whole_wave_reductions}.tests/e2e.rs:test_title_runs_and_game_folder_is_untouched(49/50 checks passed; failed onD3D12.X: dynamic depth bias via RSSetDepthBiasX (#94)).bcpack_parity,console_dlls_e2e,console_shaders,disasm_e2e,gpu_compute_e2e,gpu_pso_e2e,heap_probe,low_va,pls_quota,predication_e2e,rpf_e2e,shaders_e2e,sparse_reinit,texture_states,xg_oracle,xclbin,xcl-testtitlebin,xcldoc-tests) passed with 0 failures.SKIPPEDGPU/D3D12 tests on this adapter (7 total — not counted as coverage):SKIPPED gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask: no wave64SKIPPED gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware: no wave64SKIPPED shaders::tests::pso_measurement_compiles_an_exact_synthetic_record: cannot disable the driver cache (Windows Developer Mode is required): The application requested an operation that depends on an SDK component that is missing or mismatched. (0x887A002D)SKIPPED placed_title_textures_share_vram_and_preserve_pixels: tiled tier < 2SKIPPED test_title_draws_with_a_root_signature_under_the_debug_layer: no d3d12SDKLayers.dllSKIPPED heap_window_out_of_memory_falls_back_to_the_switch_form: no heap windowsSKIPPED uploads_start_from_each_subresources_state: no D3D12 debug layer (The application requested an operation that depends on an SDK component that is missing or mismatched. (0x887A002D))Not tested
CLWB/MONITORX/MWAITX/CLZEROthat raise hardware#UDinto the VEH handler)scripts/smoke.ps1(diff is test-only incrates/xcl/src/eh.rs)AI use
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.