Tests: the CLI exit codes and error messages #913
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/919"
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 Koro4e on 2026-11-24T08:17:13Z.
xclis called from scripts and CI, where the exit code is the interface:2for a usage or input error,3for a file that is not a PE. Nothing tested those codes, and nothing pinned which stream each message goes to.Tests only - no code touched.
What is in it
crates/xcl/tests/cli_errors.rs- five hermetic cases that need no game, no GPU and no test title:--versionis a command (exit 0,xcl <version>); an unknown command prints the usage to stdout and exits 2inspecton a missing file: exit 2,xcl inspect: cannot read ...on stderr, stdout untouched; on a file that is not a PE: exit 3,not a PE fileand the XVC/MSIXVC hintdisasmon a blob with no shader is not an error (exit 0, "no RDNA2 programs found"); an offset past the end of the file is exit 2rpfon a file that is not an RPF9 package: exit 2, nothing on stdoutrunon a missing folder and on an empty one: exit 2,xcl: ...naming the targetThe assertions are the strings the binary actually prints (checked by running each case by hand first), not guesses.
Tested
cargo test -p xcl --test cli_errors: 5 passed, 0 failedcargo test --workspace --no-fail-fast -- --test-threads=4: 722 passed, 0 failed, 41 ignored, 18 test binaries. SKIPPED:gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware(no wave64)hle::d3d12x(mid_list_write64_wait64_split_avoids_cycle_and_reuses_spares,placed_title_textures_share_vram_and_preserve_pixels,transitions_apply_when_their_list_is_submitted,d32s8_targets_take_their_own_size_of_video_memory) on this 12 GiB RTX 3060 (driver 617.14). All four passed in the run above and pass on their own; this PR's file starts no device at all.stable-x86_64-pc-windows-msvc)Not tested
AI use
upstream-sync referenced this pull request2026-11-24 09:06:54 +00:00
mainreaches on Windows; the obstacle is replaced vtables — proposal: proxies #172upstream-sync referenced this pull request2026-11-24 10:04:29 +00:00
Imported from ivall/xcl. Originally posted by SlopTart on 2026-11-24T10:37:25Z.
Linux / AMD RDNA3 datapoint.
Merged state: head
1aa7d91onto main02bfd1d, clean merge.Full suite,
cargo test --workspace --release --no-fail-fast --target x86_64-pc-windows-gnu -- --test-threads=4: 725 passed, 7 failed, 41 ignored; failures are the known Wine-lane set from my #42 rows. CLI exit-code/error-message tests green.Not tested: retail titles (none here), Windows, RDNA4.
Counts only, no game data.
Machine: RX 7900 XT (RADV NAVI31), Mesa 26.2.5, kernel 7.2 (Arch), Proton Experimental (wine-11.0), patched vkd3d-proton v3.1, Rust cross
x86_64-pc-windows-gnu,XCL_NETWORK=0, release profile,--test-threads=4. My Linux rows: #42 / #718.AI use: Hermes agent (local Qwen-class) ran the suite and drafted this; I checked it before posting.
Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-25T09:31:00Z.
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!
Imported from ivall/xcl. Originally posted by github-actions[bot] on 2026-11-29T07:41:18Z.
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 Foniass on 2026-12-01T04:30:05Z.
Triage (#1607) – head
1aa7d91Partly overlaps tests already on main: crates/xcl/tests/inspect_e2e.rs (#2211) checks the same inspect exit codes 2 / 3; #1735 also checks the unknown-command usage error. The disasm, rpf, run and --version cases are not covered elsewhere, and every message they assert exists on main. No problems found in the diff.
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.