Skip to content

e2e: the debug-layer test keeps its files in the target's tmp folder - #1015

Open
upipibi wants to merge 1 commit into
xcl-dev:mainfrom
upipibi:e2e-debug-layer-tmpdir
Open

upipibi wants to merge 1 commit into
xcl-dev:mainfrom
upipibi:e2e-debug-layer-tmpdir

Conversation

@upipibi

@upipibi upipibi commented Nov 24, 2026

Copy link
Copy Markdown
Contributor

test_title_draws_with_a_root_signature_under_the_debug_layer (crates/xcl/tests/e2e.rs) builds its game and data folders under <repository>/target/e2e-debug-layer, whatever the target directory is. With CARGO_TARGET_DIR (or build.target-dir) set, that makes a target folder in the source tree and leaves the test's files outside what cargo clean empties. It uses CARGO_TARGET_TMPDIR now, as test_title_runs_and_game_folder_is_untouched beside it does. No open PR that changes e2e.rs (#150, #157, #264, #434, #512, #632) touches this line.

What is in it

  • crates/xcl/tests/e2e.rs: one line, the test's root folder.

Tested

  • NVIDIA GeForce RTX 3070 8 GB, driver 616.56 (32.0.16.1656), 32-lane waves only; Ryzen 9 5950X; Windows 11 Pro 26100; Rust 1.100.0 MSVC, debug; CARGO_TARGET_DIR set to a folder outside the repository.
  • Where the folders go, with the test's check for d3d12SDKLayers.dll taken out locally so that it gets that far (it then fails at "the debug layer did not come up", as it must here): on main's line <worktree>\target\e2e-debug-layer is made and nothing under the target directory; with the change <CARGO_TARGET_DIR>\tmp\e2e-debug-layer is made and nothing in the worktree.
  • cargo test --workspace --no-fail-fast -- --test-threads=4 on ed405e8: 704 passed, 0 failed, 41 ignored (xcl lib: 663 passed, 0 failed, 21 ignored).
  • SKIPPED GPU tests: 2, both no wave64: gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware.

Regression run

Not needed: tests only.

Not tested

  • The test itself to its end: this machine has no D3D12 debug layer (Graphics Tools not installed), so it returns early. Where its folders go was checked with the d3d12SDKLayers.dll check taken out locally (not part of this PR).
  • AMD / Intel GPUs, wave64 hardware; no retail title, no XCL_SAMPLE_* data.

AI use

  • Claude Code with Claude Fable 5.2 (Anthropic): noticed the folder while running the suite with a target directory outside the repository, wrote the change and this description, and ran the tests.

🤖 Generated with Claude Code

test_title_draws_with_a_root_signature_under_the_debug_layer built its
game and data folders under <repository>/target/e2e-debug-layer,
whatever the target directory is. With CARGO_TARGET_DIR (or
build.target-dir) set, that made a `target` folder in the source tree
and left the test's files outside the place `cargo clean` empties. It
uses CARGO_TARGET_TMPDIR now, as test_title_runs_and_game_folder_is_untouched
beside it does.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@futurepro62

Copy link
Copy Markdown

Full-suite run, since this PR has no test report yet. Tested exact head ed405e8 (on its base e50836b).

Tested

  • NVIDIA GeForce RTX 5070 Ti 16 GB (Blackwell, 32-lane waves only, mesh shaders), driver 616.64, Ryzen 7 9800X3D, Windows 11 Home 26300, Rust 1.100.0 MSVC, debug, D3D12 debug layer installed.
  • cargo build --workspace, then XCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4: 704 passed, 0 failed, 41 ignored. SKIPPED (no wave64): gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware.
  • The changed test ran with the D3D12 debug layer installed and passed: test_title_draws_with_a_root_signature_under_the_debug_layer.

Not tested

  • AMD, a release build, a game (test run only).

AI use

  • Claude Code (Claude Opus 5.5) ran the tests and wrote this report. I checked it before posting.

@Darkkandadr

Copy link
Copy Markdown

A second reason for this change: on main the test fails in a deep checkout. The .. path it builds pushes the title's overlay writes past MAX_PATH. With this PR the test passes in the same folder.

Tested

  • NVIDIA GeForce RTX 3060 12 GB, driver 32.0.16.2101; Intel Core i3-12100F; Windows 11 Pro build 26300, LongPathsEnabled=1; Rust 1.96.0 MSVC, debug; DXC 1.9.2609.5; D3D12 debug layer installed. The checkout path is 185 characters long, with CARGO_TARGET_DIR set to a short folder.
  • main at 930e8b4: test_title_draws_with_a_root_signature_under_the_debug_layer fails. The test title reports [FAIL] files: writes go to the overlay, game folder untouched: … (os error 3) and [FAIL] files: directory listing merges overlay and hides deleted files: missing renamed.bin. The data root <checkout>\crates\xcl\..\..\target\e2e-debug-layer\data makes the overlay path of new_save.bin about 271 characters long, and the write of that file is never redirected to the overlay (xcl.log).
  • I ran xcl run by hand on the same game folder. The XCL_D3D12_DEBUG setting makes no difference. Only the total length matters: the same data root without .. (≈ 253 characters) gives 0 failures, and with .. (≈ 271 characters) it gives 2, with or without the debug layer.
  • This PR's head ed405e8, in the same folder: cargo test -p xcl --test e2e: 3 passed, 0 failed. The changed test ran under the debug layer.

Not tested

The overlay itself still fails past 260 characters even with LongPathsEnabled=1. A title's real data root under %LOCALAPPDATA%\XCL is far shorter, so this PR only changes the test.

Run and written with Claude Code (Claude Opus 5.5).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

off-goal Does not bear on the current goal (world loading); waits until it is reached

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants