Scripts: a test of smoke.ps1's block (adapter from report.json, fallback, counts) #279

Open
NiiRoZz wants to merge 1 commit from upstream-pr/282 into main
NiiRoZz commented 2026-11-23 22:22:32 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by NiiRoZz on 2026-11-23T22:22:32Z.


scripts/smoke.ps1 now takes its gpu: line from the run's report.json (#281, on main as 97dc49c), which fixes what this PR set out to fix from the log. That change is dropped here. What is left is the test it came with, rewritten for main's script: nothing on main runs smoke.ps1, whose block every runtime PR pastes as its evidence.

No open PR tests smoke.ps1 that I found: #285 changes the same gpu: line (from the log), #296 tests test.ps1.

What is in it

  • scripts/smoke.tests.ps1: runs the script against a stand-in xcl and a written log and report, the way test-native-stderr.tests.ps1 does for test.ps1:
    • gpu: is the adapter of report.json with its VRAM suffix dropped; a report without an adapter (the null backend) and no report at all fall back to the first video controller;
    • title, seconds, exit code, frames, presents and peak commit;
    • a device removal and an unhandled exception in the log are counted.

Tested

  • NVIDIA GeForce RTX 5090 (driver 621.35) plus AMD Radeon integrated graphics (the one Windows lists first), Ryzen 7 9800X3D, Windows 11 Pro 26300, Windows PowerShell 5.1.
  • powershell -File scripts\smoke.tests.ps1 on main a6f5f7a: passes. With smoke.ps1 as it was before #281 (9ab7d76) it fails on the gpu: line (AMD Radeon(TM) Graphics where the report names another adapter).
  • cargo test --workspace -- --test-threads=4 was run for this PR's first version on 9ab7d76 (651 passed, 0 failed, 40 ignored; SKIPPED: gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware, no wave64). It was not run again on this head: the PR adds one PowerShell file and no Rust.

Regression run

Not needed: scripts only, nothing under crates/xcl/src changes.

Not tested

  • PowerShell 7 (pwsh): not installed here.
  • The Rust suite on this head (see above).

AI use

  • Claude Code with Claude Fable 5.2 wrote the test and this description. The commands above were run on my machine, and I have read the diff.
<!-- greyfinch-sync:ivall/xcl:issue:5462250215 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/282). Originally posted by [NiiRoZz](https://github.com/NiiRoZz) on 2026-11-23T22:22:32Z. --- `scripts/smoke.ps1` now takes its `gpu:` line from the run's `report.json` (#281, on main as `97dc49c`), which fixes what this PR set out to fix from the log. That change is dropped here. What is left is the test it came with, rewritten for main's script: nothing on main runs `smoke.ps1`, whose block every runtime PR pastes as its evidence. No open PR tests `smoke.ps1` that I found: #285 changes the same `gpu:` line (from the log), #296 tests `test.ps1`. **What is in it** - `scripts/smoke.tests.ps1`: runs the script against a stand-in `xcl` and a written log and report, the way `test-native-stderr.tests.ps1` does for `test.ps1`: - `gpu:` is the adapter of `report.json` with its VRAM suffix dropped; a report without an adapter (the null backend) and no report at all fall back to the first video controller; - title, seconds, exit code, frames, presents and peak commit; - a device removal and an unhandled exception in the log are counted. **Tested** - NVIDIA GeForce RTX 5090 (driver 621.35) plus AMD Radeon integrated graphics (the one Windows lists first), Ryzen 7 9800X3D, Windows 11 Pro 26300, Windows PowerShell 5.1. - `powershell -File scripts\smoke.tests.ps1` on main `a6f5f7a`: passes. With `smoke.ps1` as it was before #281 (`9ab7d76`) it fails on the `gpu:` line (`AMD Radeon(TM) Graphics` where the report names another adapter). - `cargo test --workspace -- --test-threads=4` was run for this PR's first version on `9ab7d76` (651 passed, 0 failed, 40 ignored; SKIPPED: `gpu_geometry_wave32_prefix_count_over_a_mask`, `gpu_wave32_program_in_wave64_hardware`, no wave64). It was not run again on this head: the PR adds one PowerShell file and no Rust. **Regression run** Not needed: scripts only, nothing under `crates/xcl/src` changes. **Not tested** - PowerShell 7 (`pwsh`): not installed here. - The Rust suite on this head (see above). **AI use** - Claude Code with Claude Fable 5.2 wrote the test and this description. The commands above were run on my machine, and I have read the diff.
wileyGray commented 2026-11-24 07:05:08 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by wileyGray on 2026-11-24T01:03:29Z.


PowerShell 7.6.9 passes the smoke fixture at 791fbe135db894cfcea8f1699a91f46dc5ac82a3. I also confirmed the same result on Windows PowerShell 5.1.26100.9818.

Tested

On Windows 11 build 26300 (Core i9-14900K, RTX 4080 SUPER driver 32.0.16.2114 and Intel UHD 770), both commands exited 0. All 13 assertions across four fixture runs passed in each shell.

pwsh.exe -NoProfile -NonInteractive -File .\scripts\smoke.tests.ps1
powershell.exe -NoProfile -NonInteractive -File .\scripts\smoke.tests.ps1

Not tested

This run exercised the PowerShell script with its stand-in executable and synthetic logs. I did not run a retail title or the Rust suite.

AI use

Codex (GPT-6.2 Astra) inspected the fixture, ran both commands and wrote this report.

<!-- greyfinch-sync:ivall/xcl:comment:7118708969 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/282#issuecomment-7118708969). Originally posted by [wileyGray](https://github.com/wileyGray) on 2026-11-24T01:03:29Z. --- PowerShell 7.6.9 passes the smoke fixture at `791fbe135db894cfcea8f1699a91f46dc5ac82a3`. I also confirmed the same result on Windows PowerShell 5.1.26100.9818. **Tested** On Windows 11 build 26300 (Core i9-14900K, RTX 4080 SUPER driver 32.0.16.2114 and Intel UHD 770), both commands exited 0. All 13 assertions across four fixture runs passed in each shell. ```powershell pwsh.exe -NoProfile -NonInteractive -File .\scripts\smoke.tests.ps1 powershell.exe -NoProfile -NonInteractive -File .\scripts\smoke.tests.ps1 ``` **Not tested** This run exercised the PowerShell script with its stand-in executable and synthetic logs. I did not run a retail title or the Rust suite. **AI use** Codex (GPT-6.2 Astra) inspected the fixture, ran both commands and wrote this report.
DavidM1911 commented 2026-11-25 15:08:06 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-25T15:03:34Z.


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

  • cargo test -p xcl --lib: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.)

Thanks!

<!-- greyfinch-sync:ivall/xcl:comment:7166237922 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/282#issuecomment-7166237922). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-25T15:03:34Z. --- Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.) Thanks!
RavenCurseBurg commented 2026-11-25 22:06:49 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by RavenCurseBurg on 2026-11-25T21:38:36Z.


The fallback assertion on 791fbe135db894cfcea8f1699a91f46dc5ac82a3 queries the host and calculates its expected GPU with the same filter as the script. I replaced the host query in the test with three fixed controllers in order: Microsoft Basic Display Adapter, an integrated GPU, and the GPU named in the synthetic report. Test-only commit.

-NoProfile -NonInteractive -ExecutionPolicy Bypass -File scripts/smoke.tests.ps1 passed in Windows PowerShell 5.1 and PowerShell 7.6.9. The valid report selected the third listed adapter. A null adapter, malformed JSON and a missing report each selected the integrated GPU.

I then ran the test against three separate local changes to smoke.ps1: allow the Basic adapter, select the last usable controller, and always ignore the report. Each failed the expected GPU assertion in both shells (6/6). Windows 11 26100.9711, i7-13700. The runs used the stand-in executable and synthetic logs, with no host GPU enumeration or game launch. OpenAI Codex (GPT-6) wrote and tested the fixture.

<!-- greyfinch-sync:ivall/xcl:comment:7175350955 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/282#issuecomment-7175350955). Originally posted by [RavenCurseBurg](https://github.com/RavenCurseBurg) on 2026-11-25T21:38:36Z. --- The fallback assertion on `791fbe135db894cfcea8f1699a91f46dc5ac82a3` queries the host and calculates its expected GPU with the same filter as the script. I replaced the host query in the test with three fixed controllers in order: Microsoft Basic Display Adapter, an integrated GPU, and the GPU named in the synthetic report. [Test-only commit](https://github.com/RavenCurseBurg/xcl/commit/2232c6a1f9eab4b0c104c9e916ea94758c56d55b). `-NoProfile -NonInteractive -ExecutionPolicy Bypass -File scripts/smoke.tests.ps1` passed in Windows PowerShell 5.1 and PowerShell 7.6.9. The valid report selected the third listed adapter. A null adapter, malformed JSON and a missing report each selected the integrated GPU. I then ran the test against three separate local changes to `smoke.ps1`: allow the Basic adapter, select the last usable controller, and always ignore the report. Each failed the expected GPU assertion in both shells (6/6). Windows 11 26100.9711, i7-13700. The runs used the stand-in executable and synthetic logs, with no host GPU enumeration or game launch. OpenAI Codex (GPT-6) wrote and tested the fixture.
github-actions[bot] commented 2026-11-29 20:43:32 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by github-actions[bot] on 2026-11-29T20:43:32Z.


Nothing has happened on this PR for 3 days, so it is marked stale and will be closed in 4 days. A push or a comment takes the mark off: rebase it onto main if it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.

<!-- greyfinch-sync:ivall/xcl:comment:7262308219 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/282#issuecomment-7262308219). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-11-29T20:43:32Z. --- Nothing has happened on this PR for 3 days, so it is marked `stale` and will be closed in 4 days. A push or a comment takes the mark off: rebase it onto `main` if it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.
Foniass commented 2026-12-01 03:04:04 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T03:04:04Z.


Triage (#1607) – head 791fbe1

No open or merged PR adds this test. main's scripts/test-smoke-artifacts.tests.ps1 already covers the adapter taken from report.json and a run without report.json, but not the null-adapter report or the removal/crash/peak-commit counts, which this file does.
Problem: since 9683e7a (#677) smoke.ps1 on main prints the title as the hash of the folder name (title: 27693731 for SomeTitle) unless -Title is passed, so the title: SomeTitle assertion in scripts/smoke.tests.ps1 throws on current main. Pass -Title SomeTitle in Get-Block, or assert the hash.
Recommendation: keep open.

AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.

<!-- greyfinch-sync:ivall/xcl:comment:7299285968 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/282#issuecomment-7299285968). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T03:04:04Z. --- **Triage (#1607)** – head 791fbe1 No open or merged PR adds this test. main's scripts/test-smoke-artifacts.tests.ps1 already covers the adapter taken from report.json and a run without report.json, but not the null-adapter report or the removal/crash/peak-commit counts, which this file does. Problem: since 9683e7a (#677) smoke.ps1 on main prints the title as the hash of the folder name (`title: 27693731` for `SomeTitle`) unless -Title is passed, so the `title: SomeTitle` assertion in scripts/smoke.tests.ps1 throws on current main. Pass `-Title SomeTitle` in Get-Block, or assert the hash. Recommendation: keep open. AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/282:upstream-pr/282'
git switch 'upstream-pr/282'

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.

git switch 'main'
git merge --no-ff 'upstream-pr/282'
git switch 'upstream-pr/282'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/282'
git switch 'upstream-pr/282'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/282'
git switch 'main'
git merge --squash 'upstream-pr/282'
git switch 'main'
git merge --ff-only 'upstream-pr/282'
git switch 'main'
git merge 'upstream-pr/282'
git push origin 'main'
Sign in to join this conversation.
No reviewers
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
xcl-dev/xcl!279
No description provided.