A9: audit tests/ and CI #369

Open
opened 2026-11-28 04:28:48 +00:00 by snoozedDev · 8 comments
snoozedDev commented 2026-11-28 04:28:48 +00:00 (Migrated from github.com)
Contributor

Imported from brcly/TuxBox. Originally posted by snoozedDev on 2026-11-28T04:28:48Z.


Taking audit A9 (tests/ and CI) from ROADMAP.md, following "How an audit runs".

  • Tests that need no GPU but aren't in CI: the Python tests that skip without TUXBOX_XSHADER and DXC, and the Windows provider unit tests (tuxbox-d3d12, tuxbox-xmem, tuxbox-xgameruntime) that CI typechecks or does not build at all.
  • Slow or duplicate tests, and tests that can't fail.
  • What CI covers against what CONTRIBUTING and tuxbox.py check --no-gpu say it covers, including Python versions and platforms (Python 3.10 is #366).

The findings list comes here first, under the roadmap's headings, with no changes. Then small PRs, one kind of change each.

This contribution was written by an AI agent (Claude Opus 5.5) operating under my supervision. I am accountable for it and will respond to review.

<!-- greyfinch-sync:brcly/TuxBox:issue:6659174863 --> Imported from [brcly/TuxBox](https://github.com/brcly/TuxBox/issues/369). Originally posted by [snoozedDev](https://github.com/snoozedDev) on 2026-11-28T04:28:48Z. --- Taking audit A9 (`tests/` and CI) from [ROADMAP.md](https://github.com/brcly/TuxBox/blob/main/docs/ROADMAP.md#part-2-the-audit), following "How an audit runs". - **Tests that need no GPU but aren't in CI:** the Python tests that skip without `TUXBOX_XSHADER` and `DXC`, and the Windows provider unit tests (`tuxbox-d3d12`, `tuxbox-xmem`, `tuxbox-xgameruntime`) that CI typechecks or does not build at all. - **Slow or duplicate tests**, and tests that can't fail. - **What CI covers against what CONTRIBUTING and `tuxbox.py check --no-gpu` say it covers**, including Python versions and platforms (Python 3.10 is #366). The findings list comes here first, under the roadmap's headings, with no changes. Then small PRs, one kind of change each. This contribution was written by an AI agent (Claude Opus 5.5) operating under my supervision. I am accountable for it and will respond to review.
snoozedDev commented 2026-11-28 04:28:50 +00:00 (Migrated from github.com)
Author
Contributor

Imported from brcly/TuxBox. Originally posted by snoozedDev on 2026-11-28T04:28:50Z.


These are the findings for A9. Nothing is changed yet, per the roadmap. Measured on main at 7bafe6b, CPU only, on Linux.

What runs

  • CI runs the Python suite on 3.12 without TUXBOX_XSHADER or DXC: 521 tests, 21 skipped. python -m unittest discover -s tests -v gives the reasons.
  • The 21 by module: test_half_rounding 9, test_float_to_integer 7, and one each in test_fp16_overflow, test_fract_f32, test_rpi_rounding, test_large_dispatch and test_dxc_worker (the last also needs a C++ compiler). They are the tests that check the translator's numeric results through DXC: float-to-integer saturation and rounding, half rounding, fract, fp16 overflow, the large-dispatch group base, and the DXC worker.
  • With TUXBOX_XSHADER set to the debug xshader that the Rust job's cargo test already builds, and DXC set to Microsoft's Linux release linux_dxc_2026_09_28 (dxcompiler 1.9.2609.5): 521 tests OK, 0 skipped. The seven modules take 2.9 s; the whole suite 7.6 s.
  • The Windows provider unit tests never run in CI. Built with cargo xwin test --no-run --target x86_64-pc-windows-msvc -p tuxbox-d3d12 -p tuxbox-xmem -p tuxbox-xgameruntime and run under plain Wine with a scratch prefix: d3d12 214 passed and 10 failed, xmem 13/13, xgameruntime 2/2. The 10 are the memory_wait gpu_* tests. Plain Wine lists the GPU, but D3D12XboxCreateDevice returns E_INVALIDARG, so they panic instead of skipping. I haven't checked how they behave on a GitHub Windows runner, which has no hardware adapter.

Findings per heading

  • Tests
    1. The 21 tests above need no GPU and pass, but CI skips them. They cover the part of the code under the most churn.
    2. The provider unit tests (229 that don't need a device) are only typechecked (tuxbox-d3d12) or not built at all (tuxbox-xmem, tuxbox-xgameruntime). All of them that don't need a device also passed at 11 earlier commits back to 2026-11-27, so I can't point to a regression CI would have caught.
    3. Python on Windows isn't tested, and the suite broke there three times, fixed by three people: #3, #109, #331.
    4. Python 3.10, which CONTRIBUTING promises, isn't tested. On 3.10 the suite gave 2 errors from hashlib.file_digest; #366 fixes it. A 3.10 CI run would keep it fixed.
    5. Tests that can't fail: an AST scan of tests/test_*.py found 17 of the 521 test methods with no assert of their own. All 17 check through a helper (check_conversion, check_inline_results, self.fail passed as a callback), so none of them is a real finding.
  • Speed and memory
    6. The Rust job's cache doesn't hold the build. Swatinem/rust-cache saves target/ and tools/shader-compiler/target/, but .cargo/config.toml sets target-dir = "build/cargo". The cache restores ("full match: true" in run 46105691898), yet every step compiles its dependencies again, the windows crates included. The Rust job took 64 s and the Python job 16 s. I haven't measured how much a working cache would save.
    7. No test is slow. The whole suite takes 5.3 s without the tools and 7.6 s with them.
  • Two answers to one problem
    8. tuxbox.py check --no-gpu and CI run nearly the same list, written twice (project_tuxbox/check.py and ci.yml). They differ: check also typechecks tuxbox-bvh for Windows and builds a release xshader for the Python tests, and CI does neither.
  • Documentation
    9. CONTRIBUTING's "Code checks" block matches ci.yml. It doesn't say that CI skips the DXC tests, or that check --no-gpu runs more than CI does, and the docstring of project_tuxbox/check.py says its first group "is what CI runs".
  • Dead code, title-specific code, vendor checks, rules: nothing found in tests/ or the workflow. I didn't look for duplicate tests beyond the assertion scan.

Proposed PRs, one kind each, safest first

  1. ci: run the DXC-dependent Python tests: download Microsoft's Linux DXC release, pinned by URL and SHA-256, and run the Python suite in the Rust job with the debug xshader, so the 21 tests run. The existing 3.12 job stays as it is, so the no-tools path stays tested. Measured cost: about 3 s, plus the download.
  2. ci: cache the directory cargo builds into: point rust-cache at build/cargo.
  3. ci: typecheck tuxbox-bvh for Windows, as check --no-gpu does.

For you to decide

  • A Windows job for the provider unit tests and the Python suite? It would cover findings 2 and 3, but I haven't checked how the gpu_* tests behave on a runner with no adapter.
  • A Python 3.10 job once #366 is in?

I'll start with PR 1 unless you'd rather I didn't.

This contribution was written by an AI agent (Claude Opus 5.5) operating under my supervision. I am accountable for it and will respond to review.

<!-- greyfinch-sync:brcly/TuxBox:comment:7234065542 --> Imported from [brcly/TuxBox](https://github.com/brcly/TuxBox/issues/369#issuecomment-7234065542). Originally posted by [snoozedDev](https://github.com/snoozedDev) on 2026-11-28T04:28:50Z. --- These are the findings for A9. Nothing is changed yet, per the roadmap. Measured on `main` at `7bafe6b`, CPU only, on Linux. **What runs** - CI runs the Python suite on 3.12 without `TUXBOX_XSHADER` or `DXC`: 521 tests, 21 skipped. `python -m unittest discover -s tests -v` gives the reasons. - The 21 by module: `test_half_rounding` 9, `test_float_to_integer` 7, and one each in `test_fp16_overflow`, `test_fract_f32`, `test_rpi_rounding`, `test_large_dispatch` and `test_dxc_worker` (the last also needs a C++ compiler). They are the tests that check the translator's numeric results through DXC: float-to-integer saturation and rounding, half rounding, fract, fp16 overflow, the large-dispatch group base, and the DXC worker. - With `TUXBOX_XSHADER` set to the debug `xshader` that the Rust job's `cargo test` already builds, and `DXC` set to Microsoft's Linux release `linux_dxc_2026_09_28` (dxcompiler 1.9.2609.5): 521 tests OK, 0 skipped. The seven modules take 2.9 s; the whole suite 7.6 s. - The Windows provider unit tests never run in CI. Built with `cargo xwin test --no-run --target x86_64-pc-windows-msvc -p tuxbox-d3d12 -p tuxbox-xmem -p tuxbox-xgameruntime` and run under plain Wine with a scratch prefix: d3d12 214 passed and 10 failed, xmem 13/13, xgameruntime 2/2. The 10 are the `memory_wait` `gpu_*` tests. Plain Wine lists the GPU, but `D3D12XboxCreateDevice` returns `E_INVALIDARG`, so they panic instead of skipping. I haven't checked how they behave on a GitHub Windows runner, which has no hardware adapter. **Findings per heading** - **Tests** 1. The 21 tests above need no GPU and pass, but CI skips them. They cover the part of the code under the most churn. 2. The provider unit tests (229 that don't need a device) are only typechecked (`tuxbox-d3d12`) or not built at all (`tuxbox-xmem`, `tuxbox-xgameruntime`). All of them that don't need a device also passed at 11 earlier commits back to 2026-11-27, so I can't point to a regression CI would have caught. 3. Python on Windows isn't tested, and the suite broke there three times, fixed by three people: #3, #109, #331. 4. Python 3.10, which CONTRIBUTING promises, isn't tested. On 3.10 the suite gave 2 errors from `hashlib.file_digest`; #366 fixes it. A 3.10 CI run would keep it fixed. 5. Tests that can't fail: an AST scan of `tests/test_*.py` found 17 of the 521 test methods with no assert of their own. All 17 check through a helper (`check_conversion`, `check_inline_results`, `self.fail` passed as a callback), so none of them is a real finding. - **Speed and memory** 6. The Rust job's cache doesn't hold the build. `Swatinem/rust-cache` saves `target/` and `tools/shader-compiler/target/`, but `.cargo/config.toml` sets `target-dir = "build/cargo"`. The cache restores ("full match: true" in [run 46105691898](https://github.com/brcly/TuxBox/actions/runs/46105691898)), yet every step compiles its dependencies again, the `windows` crates included. The Rust job took 64 s and the Python job 16 s. I haven't measured how much a working cache would save. 7. No test is slow. The whole suite takes 5.3 s without the tools and 7.6 s with them. - **Two answers to one problem** 8. `tuxbox.py check --no-gpu` and CI run nearly the same list, written twice (`project_tuxbox/check.py` and `ci.yml`). They differ: `check` also typechecks `tuxbox-bvh` for Windows and builds a release `xshader` for the Python tests, and CI does neither. - **Documentation** 9. CONTRIBUTING's "Code checks" block matches `ci.yml`. It doesn't say that CI skips the DXC tests, or that `check --no-gpu` runs more than CI does, and the docstring of `project_tuxbox/check.py` says its first group "is what CI runs". - **Dead code, title-specific code, vendor checks, rules:** nothing found in `tests/` or the workflow. I didn't look for duplicate tests beyond the assertion scan. **Proposed PRs, one kind each, safest first** 1. `ci: run the DXC-dependent Python tests`: download Microsoft's Linux DXC release, pinned by URL and SHA-256, and run the Python suite in the Rust job with the debug `xshader`, so the 21 tests run. The existing 3.12 job stays as it is, so the no-tools path stays tested. Measured cost: about 3 s, plus the download. 2. `ci: cache the directory cargo builds into`: point `rust-cache` at `build/cargo`. 3. `ci: typecheck tuxbox-bvh for Windows`, as `check --no-gpu` does. **For you to decide** - A Windows job for the provider unit tests and the Python suite? It would cover findings 2 and 3, but I haven't checked how the `gpu_*` tests behave on a runner with no adapter. - A Python 3.10 job once #366 is in? I'll start with PR 1 unless you'd rather I didn't. This contribution was written by an AI agent (Claude Opus 5.5) operating under my supervision. I am accountable for it and will respond to review.
brcly commented 2026-11-30 11:37:56 +00:00 (Migrated from github.com)
Author
Contributor

Imported from brcly/TuxBox. Originally posted by brcly on 2026-11-30T11:37:56Z.


@snoozedDev, sorry these sat without an answer. Please go ahead with the cleanup PRs. CI has changed since you measured, though (as of e5d2e913), so please re-check those findings first:

  • CI now also runs cargo fmt --check, rustdoc with warnings denied, and Miri on the providers' unit tests for x86_64-pc-windows-msvc (acphal, xapu, gameinput, xg, xcrdapi, xgameruntime, xmem, d3d12). So those Windows unit tests now run in CI under Miri, rather than only being typechecked. Tests Miri can't run carry an ignore reason.
  • Python 3.10 and 3.12 both run now (#366).
  • The "Translator through DXC" job builds xshader, downloads DXC 1.9.2609, and runs the whole Python suite with TUXBOX_XSHADER and DXC set. So the 21 numeric tests that skip in the plain Python job do run there.

What's left from your list is mostly the slow, duplicate and can't-fail tests, and the gap between what CONTRIBUTING says CI covers and what it does.

<!-- greyfinch-sync:brcly/TuxBox:comment:7277301584 --> Imported from [brcly/TuxBox](https://github.com/brcly/TuxBox/issues/369#issuecomment-7277301584). Originally posted by [brcly](https://github.com/brcly) on 2026-11-30T11:37:56Z. --- @snoozedDev, sorry these sat without an answer. Please go ahead with the cleanup PRs. CI has changed since you measured, though (as of e5d2e913), so please re-check those findings first: - CI now also runs `cargo fmt --check`, rustdoc with warnings denied, and **Miri on the providers' unit tests** for x86_64-pc-windows-msvc (acphal, xapu, gameinput, xg, xcrdapi, xgameruntime, xmem, d3d12). So those Windows unit tests now *run* in CI under Miri, rather than only being typechecked. Tests Miri can't run carry an `ignore` reason. - Python 3.10 and 3.12 both run now (#366). - The "Translator through DXC" job builds `xshader`, downloads DXC 1.9.2609, and runs the whole Python suite with `TUXBOX_XSHADER` and `DXC` set. So the 21 numeric tests that skip in the plain Python job do run there. What's left from your list is mostly the slow, duplicate and can't-fail tests, and the gap between what CONTRIBUTING says CI covers and what it does.
snoozedDev commented 2026-11-30 12:13:21 +00:00 (Migrated from github.com)
Author
Contributor

Imported from brcly/TuxBox. Originally posted by snoozedDev on 2026-11-30T12:13:21Z.


Thanks. I re-checked against main at 829b5355, with CI times from run 46408754090 (of 3926959e, two commits earlier). PR 1 and PR 3 from my list are done: the translator job runs the DXC tests, and cargo check --workspace covers tuxbox-bvh. Here's what changed or is still open.

Slow tests. The suite is now 763 tests. It takes 56 s locally (60 s with xshader and DXC), and in CI 103 s on 3.12, 167 s on 3.10 and 136 s in the translator job, so it runs three times per push. About 49 s of the local run is the five test_native_rdna2_* modules (35 tests). The slowest single test, test_native_rdna2_approx's test_model_reproduces_the_exact_forms, takes 15 s. cProfile puts almost all of that in Fraction arithmetic in tools/native_rdna2/ieee_float.py (rounded, encode, decode, with Fraction(2) ** n inside loops), over 556,000 approx() calls. Miri's 7.7 min still sets the length of a CI run, so a faster model would mostly shorten check --no-gpu and local runs.

No-GPU tests that no CI job runs. In the translator job, 12 skip:

  • 8 need Pillow (test_scarlett_frames 7, test_scarlett_first_visual_failure 1). Pillow isn't in requirements.txt. With it installed, all 8 pass locally.
  • 2 GameInputLayoutTests need clang-cl and the Windows headers that cargo xwin stages.
  • 1 test_stage_baseline test needs the Vulkan headers.
  • test_xcrdapi_abi needs a built xcrdapi.dll.

The CI log uses -q, so it doesn't name the skipped tests. I worked out the middle two by comparing skip counts with a local run where they pass.

Can't-fail tests. Same result as before: 16 of 763 tests have no assert of their own, and all 16 check through helpers that assert (check_conversion, check_programs, check_inline_results, check_register_results).

Duplicate tests. I didn't look for any.

Cache. The Rust and Miri jobs still cache target/, while builds go to build/cargo. The translator job's . -> build/cargo is right. The cost is small now: each run re-checks windows and the proc-macro crates. In the Miri job, compiling dependencies takes about 15 s.

CONTRIBUTING vs CI. "Code checks" leaves out rustdoc, the translator job and the 3.10/3.12 matrix. Three other places also say less than CI does, or claim check --no-gpu matches it: the PR template's "CI runs…" line, check.py's docstring, and the --no-gpu help. check --no-gpu runs neither Miri nor rustdoc. The docs PR that references this issue fixes all four, with no change in behaviour.

Next, one kind each, if you want them:

  1. ci: install Pillow in the translator job, so those 8 tests run. Optionally also libvulkan-dev for the timing-layer test.
  2. Speed up the float model in ieee_float.py with integer arithmetic where it builds powers of two, keeping its results exact. The tests that compare it with the recorded words would catch any change. This is Jeffrey C's recent code, so I'd hold off unless you want it.
  3. ci: cache the directory cargo builds into (Rust and Miri jobs). It's a small saving.

This contribution was written by an AI agent (Claude Opus 5.5) operating under my supervision. I am accountable for it and will respond to review.

<!-- greyfinch-sync:brcly/TuxBox:comment:7278128705 --> Imported from [brcly/TuxBox](https://github.com/brcly/TuxBox/issues/369#issuecomment-7278128705). Originally posted by [snoozedDev](https://github.com/snoozedDev) on 2026-11-30T12:13:21Z. --- Thanks. I re-checked against `main` at `829b5355`, with CI times from run [46408754090](https://github.com/brcly/TuxBox/actions/runs/46408754090) (of `3926959e`, two commits earlier). PR 1 and PR 3 from my list are done: the translator job runs the DXC tests, and `cargo check --workspace` covers `tuxbox-bvh`. Here's what changed or is still open. **Slow tests.** The suite is now 763 tests. It takes 56 s locally (60 s with `xshader` and DXC), and in CI 103 s on 3.12, 167 s on 3.10 and 136 s in the translator job, so it runs three times per push. About 49 s of the local run is the five `test_native_rdna2_*` modules (35 tests). The slowest single test, `test_native_rdna2_approx`'s `test_model_reproduces_the_exact_forms`, takes 15 s. cProfile puts almost all of that in `Fraction` arithmetic in `tools/native_rdna2/ieee_float.py` (`rounded`, `encode`, `decode`, with `Fraction(2) ** n` inside loops), over 556,000 `approx()` calls. Miri's 7.7 min still sets the length of a CI run, so a faster model would mostly shorten `check --no-gpu` and local runs. **No-GPU tests that no CI job runs.** In the translator job, 12 skip: - 8 need Pillow (`test_scarlett_frames` 7, `test_scarlett_first_visual_failure` 1). Pillow isn't in `requirements.txt`. With it installed, all 8 pass locally. - 2 `GameInputLayoutTests` need `clang-cl` and the Windows headers that `cargo xwin` stages. - 1 `test_stage_baseline` test needs the Vulkan headers. - `test_xcrdapi_abi` needs a built `xcrdapi.dll`. The CI log uses `-q`, so it doesn't name the skipped tests. I worked out the middle two by comparing skip counts with a local run where they pass. **Can't-fail tests.** Same result as before: 16 of 763 tests have no assert of their own, and all 16 check through helpers that assert (`check_conversion`, `check_programs`, `check_inline_results`, `check_register_results`). **Duplicate tests.** I didn't look for any. **Cache.** The Rust and Miri jobs still cache `target/`, while builds go to `build/cargo`. The translator job's `. -> build/cargo` is right. The cost is small now: each run re-checks `windows` and the proc-macro crates. In the Miri job, compiling dependencies takes about 15 s. **CONTRIBUTING vs CI.** "Code checks" leaves out rustdoc, the translator job and the 3.10/3.12 matrix. Three other places also say less than CI does, or claim `check --no-gpu` matches it: the PR template's "CI runs…" line, `check.py`'s docstring, and the `--no-gpu` help. `check --no-gpu` runs neither Miri nor rustdoc. The docs PR that references this issue fixes all four, with no change in behaviour. **Next, one kind each, if you want them:** 1. `ci: install Pillow in the translator job`, so those 8 tests run. Optionally also `libvulkan-dev` for the timing-layer test. 2. Speed up the float model in `ieee_float.py` with integer arithmetic where it builds powers of two, keeping its results exact. The tests that compare it with the recorded words would catch any change. This is Jeffrey C's recent code, so I'd hold off unless you want it. 3. `ci: cache the directory cargo builds into` (Rust and Miri jobs). It's a small saving. This contribution was written by an AI agent (Claude Opus 5.5) operating under my supervision. I am accountable for it and will respond to review.
snoozedDev commented 2026-11-30 20:12:55 +00:00 (Migrated from github.com)
Author
Contributor

Imported from brcly/TuxBox. Originally posted by snoozedDev on 2026-11-30T20:12:55Z.


Next cleanup from this list: the Miri job's time, which sets the length of a CI run (7 min 12 s on 58738995; the other jobs take 1.6 to 2.5 min).

In that run's log the d3d12 tests take 347.86 s of the job. Locally at d00006b2, with CI's flags and --report-time, six tests take 228 s of the 286 s of test time:

test s
heap_page_cache sweep_reaches_expired_key_behind_live_entries 48.7
recorded_writes what_has_run_or_is_gone_is_dropped 42.7
memory_wait named_ranges_survive_an_unknown_write_and_merging 40.2
heap_page_cache full_cache_replaces_same_key_without_duplicate_queue_entries 38.0
heap_page_cache failed_imports_are_not_cached_and_live_entries_are_bounded 37.8
placement::pending the_index_finds_exactly_the_overlapping_ranges 20.3

They loop to production sizes: the page cache's LIMIT, MAX_NAMED, 10,000 lists, 500 probes. With smaller counts under Miri only (LIMIT 256, MAX_NAMED 64, 2,000 lists, 50 probes), all 328 tests pass and the d3d12 run goes from 327 s to 114 s here. Normal builds and test runs keep today's values. Running each test in its own process on four cores (cargo miri nextest run -j4) only got to 231 s.

Two of the four changes put if cfg!(miri) { .. } else { .. } on a constant in heap_page_cache.rs and memory_wait.rs. If you'd rather not have that in provider code, I can mark the six ignore = "takes too long under Miri" like the five you already skip. I'll open the PR with the smaller counts unless you say otherwise.

This contribution was written by an AI agent (Claude Opus 5.5) operating under my supervision. I am accountable for it and will respond to review.

<!-- greyfinch-sync:brcly/TuxBox:comment:7290578130 --> Imported from [brcly/TuxBox](https://github.com/brcly/TuxBox/issues/369#issuecomment-7290578130). Originally posted by [snoozedDev](https://github.com/snoozedDev) on 2026-11-30T20:12:55Z. --- Next cleanup from this list: the Miri job's time, which sets the length of a CI run (7 min 12 s on 58738995; the other jobs take 1.6 to 2.5 min). In that run's log the d3d12 tests take 347.86 s of the job. Locally at d00006b2, with CI's flags and `--report-time`, six tests take 228 s of the 286 s of test time: | test | s | |---|---| | `heap_page_cache` `sweep_reaches_expired_key_behind_live_entries` | 48.7 | | `recorded_writes` `what_has_run_or_is_gone_is_dropped` | 42.7 | | `memory_wait` `named_ranges_survive_an_unknown_write_and_merging` | 40.2 | | `heap_page_cache` `full_cache_replaces_same_key_without_duplicate_queue_entries` | 38.0 | | `heap_page_cache` `failed_imports_are_not_cached_and_live_entries_are_bounded` | 37.8 | | `placement::pending` `the_index_finds_exactly_the_overlapping_ranges` | 20.3 | They loop to production sizes: the page cache's `LIMIT`, `MAX_NAMED`, 10,000 lists, 500 probes. With smaller counts under Miri only (`LIMIT` 256, `MAX_NAMED` 64, 2,000 lists, 50 probes), all 328 tests pass and the d3d12 run goes from 327 s to 114 s here. Normal builds and test runs keep today's values. Running each test in its own process on four cores (`cargo miri nextest run -j4`) only got to 231 s. Two of the four changes put `if cfg!(miri) { .. } else { .. }` on a constant in `heap_page_cache.rs` and `memory_wait.rs`. If you'd rather not have that in provider code, I can mark the six `ignore = "takes too long under Miri"` like the five you already skip. I'll open the PR with the smaller counts unless you say otherwise. This contribution was written by an AI agent (Claude Opus 5.5) operating under my supervision. I am accountable for it and will respond to review.
brcly commented 2026-12-01 15:14:27 +00:00 (Migrated from github.com)
Author
Contributor

Imported from brcly/TuxBox. Originally posted by brcly on 2026-12-01T15:14:27Z.


@snoozedDev sorry for the delay. Yes, please go ahead with the Miri time: six tests taking 228 s of 286 s is the right target. Shrinking their sizes under cfg(miri) (as #599 did) keeps what they test. Note that main now runs Miri on more d3d12 tests than when you measured (today's PRs added a few, with ignore reasons where Miri can't run a Windows call), so please re-time on current main first.

<!-- greyfinch-sync:brcly/TuxBox:comment:7315579942 --> Imported from [brcly/TuxBox](https://github.com/brcly/TuxBox/issues/369#issuecomment-7315579942). Originally posted by [brcly](https://github.com/brcly) on 2026-12-01T15:14:27Z. --- @snoozedDev sorry for the delay. Yes, please go ahead with the Miri time: six tests taking 228 s of 286 s is the right target. Shrinking their sizes under `cfg(miri)` (as #599 did) keeps what they test. Note that main now runs Miri on more d3d12 tests than when you measured (today's PRs added a few, with `ignore` reasons where Miri can't run a Windows call), so please re-time on current main first.
snoozedDev commented 2026-12-02 19:25:23 +00:00 (Migrated from github.com)
Author
Contributor

Imported from brcly/TuxBox. Originally posted by snoozedDev on 2026-12-02T19:25:23Z.


One more test fix in tuxbox-xmem, sent as its own PR right after this comment.

Under GE-Proton11-14's Wine, the xmem unit tests fail about half the time with default test threads: 14 of 30 runs at c1139ab2, with the test binary run from where cargo puts it. chunked_private_span_shares_allocation_and_scans_across_uncommitted_gap reserves a 16-page aperture wherever the OS puts it and expects one private span. Spans are cut at 64-page address boundaries, so an aperture that straddles one gets two. The failed assertion holds POOL, so four more tracking tests then fail on the poisoned lock. The PR keeps the test's aperture inside one chunk and changes no provider code.

DrArroway, this is your test from 9f9266ec. Say if you'd rather it asserted something else.

Main's red Miri job (two tests in tests/physical_backing.rs reaching VirtualAlloc2) is fixed by #658, so I'm not sending that part.

This contribution was written by an AI agent (Claude Opus 5.5) operating under my supervision. I am accountable for it and will respond to review.

<!-- greyfinch-sync:brcly/TuxBox:comment:7356147674 --> Imported from [brcly/TuxBox](https://github.com/brcly/TuxBox/issues/369#issuecomment-7356147674). Originally posted by [snoozedDev](https://github.com/snoozedDev) on 2026-12-02T19:25:23Z. --- One more test fix in `tuxbox-xmem`, sent as its own PR right after this comment. Under GE-Proton11-14's Wine, the xmem unit tests fail about half the time with default test threads: 14 of 30 runs at c1139ab2, with the test binary run from where cargo puts it. `chunked_private_span_shares_allocation_and_scans_across_uncommitted_gap` reserves a 16-page aperture wherever the OS puts it and expects one private span. Spans are cut at 64-page address boundaries, so an aperture that straddles one gets two. The failed assertion holds `POOL`, so four more tracking tests then fail on the poisoned lock. The PR keeps the test's aperture inside one chunk and changes no provider code. DrArroway, this is your test from 9f9266ec. Say if you'd rather it asserted something else. Main's red Miri job (two tests in `tests/physical_backing.rs` reaching `VirtualAlloc2`) is fixed by #658, so I'm not sending that part. This contribution was written by an AI agent (Claude Opus 5.5) operating under my supervision. I am accountable for it and will respond to review.
snoozedDev commented 2026-12-02 22:10:33 +00:00 (Migrated from github.com)
Author
Contributor

Imported from brcly/TuxBox. Originally posted by snoozedDev on 2026-12-02T22:10:33Z.


One more tuxbox-xmem test fix; the PR follows right after this comment.

On main at a789a4e4 the xmem unit tests fail on every run under GE-Proton11-14's Wine: 10 of 10 with --test-threads=1, and every default-thread run. gpu_tile_hold_keeps_the_whole_private_span_mapped (from #660) unmaps one page of its aperture, and its clean-up then unmaps all four. An unmap refuses a range with an unmapped page in it, so the last map(aperture, 4, null) returns NULL. The panic holds POOL, and six more tests fail on the poisoned lock.

The assertions the test is about pass: the sibling page stays committed under the hold and is reserved again after release. The PR only changes the clean-up to unmap the three pages that are still mapped. No provider code changes.

This contribution was written by an AI agent (Claude Opus 5.5) operating under my supervision. I am accountable for it and will respond to review.

<!-- greyfinch-sync:brcly/TuxBox:comment:7360328399 --> Imported from [brcly/TuxBox](https://github.com/brcly/TuxBox/issues/369#issuecomment-7360328399). Originally posted by [snoozedDev](https://github.com/snoozedDev) on 2026-12-02T22:10:33Z. --- One more `tuxbox-xmem` test fix; the PR follows right after this comment. On main at a789a4e4 the xmem unit tests fail on every run under GE-Proton11-14's Wine: 10 of 10 with `--test-threads=1`, and every default-thread run. `gpu_tile_hold_keeps_the_whole_private_span_mapped` (from #660) unmaps one page of its aperture, and its clean-up then unmaps all four. An unmap refuses a range with an unmapped page in it, so the last `map(aperture, 4, null)` returns NULL. The panic holds `POOL`, and six more tests fail on the poisoned lock. The assertions the test is about pass: the sibling page stays committed under the hold and is reserved again after release. The PR only changes the clean-up to unmap the three pages that are still mapped. No provider code changes. This contribution was written by an AI agent (Claude Opus 5.5) operating under my supervision. I am accountable for it and will respond to review.
snoozedDev commented 2026-12-02 23:30:31 +00:00 (Migrated from github.com)
Author
Contributor

Imported from brcly/TuxBox. Originally posted by snoozedDev on 2026-12-02T23:30:31Z.


Re-timed Miri on a789a4e4, as you asked before a second round.

The job took 7 min 28 s there (run 46975151989), and the d3d12 tests are 351 s of it. The time is spread out now: timed here, the ten longest tests take 135 s of 219 s, and the longest (packed_structure, 28 s) needs its 2,049 leaves to cross a run boundary, so shrinking has less to give than in #599.

Running the d3d12 tests as three groups at once does more, because Miri runs each test process on one core. With CI's command on four pinned cores here (local nightly, not CI's pinned one):

wall d3d12 passed / ignored
one process, as CI runs it now 4 min 08 s 491 / 176
commands::, device:: and everything else at once, beside the other providers 2 min 04 s 491 / 176 in total

No test or size changes. The last group is whatever the first two leave, so a test in a new module still runs without editing the workflow. A failing test or a Miri error in any group fails the job, and each group's log prints in its own section. I have not timed it on a GitHub runner yet.

I'll send that as one PR to ci.yml, with the job time from its own CI run. If you'd rather keep one process and shrink sizes under cfg(miri) instead, say so and I'll do that.

This contribution was written by an AI agent (Claude Opus 5.5) operating under my supervision. I am accountable for it and will respond to review.

<!-- greyfinch-sync:brcly/TuxBox:comment:7362088878 --> Imported from [brcly/TuxBox](https://github.com/brcly/TuxBox/issues/369#issuecomment-7362088878). Originally posted by [snoozedDev](https://github.com/snoozedDev) on 2026-12-02T23:30:31Z. --- Re-timed Miri on a789a4e4, as you asked before a second round. The job took 7 min 28 s there ([run 46975151989](https://github.com/brcly/TuxBox/actions/runs/46975151989)), and the d3d12 tests are 351 s of it. The time is spread out now: timed here, the ten longest tests take 135 s of 219 s, and the longest (`packed_structure`, 28 s) needs its 2,049 leaves to cross a run boundary, so shrinking has less to give than in #599. Running the d3d12 tests as three groups at once does more, because Miri runs each test process on one core. With CI's command on four pinned cores here (local nightly, not CI's pinned one): | | wall | d3d12 passed / ignored | |---|---|---| | one process, as CI runs it now | 4 min 08 s | 491 / 176 | | `commands::`, `device::` and everything else at once, beside the other providers | 2 min 04 s | 491 / 176 in total | No test or size changes. The last group is whatever the first two leave, so a test in a new module still runs without editing the workflow. A failing test or a Miri error in any group fails the job, and each group's log prints in its own section. I have not timed it on a GitHub runner yet. I'll send that as one PR to `ci.yml`, with the job time from its own CI run. If you'd rather keep one process and shrink sizes under `cfg(miri)` instead, say so and I'll do that. This contribution was written by an AI agent (Claude Opus 5.5) operating under my supervision. I am accountable for it and will respond to review.
Sign in to join this conversation.
No labels
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.

Reference
brcly/TuxBox#369
No description provided.