Tests: pin the process logger's level filter and file line format #1589
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!1589
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1589"
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?
@amazedturnip on GitHub · 2026-11-24 18:00 UTC · original
amazedturnip:xcl/tests-log-contract-level-filter-and-file-format-174713→main· +89 −0 · 1 files · 1 commits · openPins the process logger's contract in a single host-local integration test: Level::parse (case-insensitive; 'warning'->Warn; unknown/empty -> Info), enabled() as an ordering comparison against the level set by init(), and write() emitting one '[][][TAG] \n' line per enabled level and nothing otherwise. init() is also verified to create the log's parent directory and file. Single #[test] in its own binary (no shared Logger state with other tests).
What is in it
crates/xcl/tests/log_contract.rs: new integration test pinninglog::Level::parse(case-insensitive, 'warning'->Warn, unknown/empty -> Info),enabled()as an ordering comparison against the level set byinit, andwrite()emitting one[<elapsed>][<tid>][<TAG>] <msg>\nline per enabled level and nothing otherwise. Also pins thatinit()creates the log's parent directory and the log file itself. Single test in its own binary (no other test may observe or set the process-wide logger state).Tested
AMD Radeon(TM) Graphics (driver 32.0.21043.19003, DXC 1.9.2609, native wave64),XCL_ADAPTER=radeon):cargo test --workspace -- --test-threads=1— 777 passed, 0 failed, 41 ignored (SKIPPED GPU tests: 1 (no heap windows))cargo test --test log_contractFAILED with 'assertionleft == rightfailed' on line 43 (Level::parse("warning") expected Warn, got Info). Thengit checkout -- crates/xcl/src/log.rsrestored the source; original run passes.Not tested
AI use
@futurepro62 on GitHub · 2026-11-24 18:53 UTC · original
Full-suite run, since this PR has no test report yet. Tested exact head
466a425(on its base9e3831e).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: 776 passed, 0 failed, 41 ignored. SKIPPED (no wave64):gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware.the_log_level_filter_and_file_line_format.XCL_ADAPTER=radeon),cargo test --workspace -- --test-threads=4: 777 passed, 0 failed, 41 ignored. SKIPPED:heap_window_out_of_memory_falls_back_to_the_switch_form(no heap windows).heap_window_out_of_memory_falls_back_to_the_switch_formwas skipped with--skip. It fails on main9e3831etoo, not because of this PR: underXCL_REQUIRE_GPU=mesh,runner::skip_testturns every skip except "no wave64" into a failure, including this test's opt-in "no heap windows" skip (XCL_HEAP_WINDOWSunset). Reported as #1651.Not tested
AI use
@DavidM1911 on GitHub · 2026-11-24 20:02 UTC · original
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, ~22 ignored. (Intermittent single-test flake under parallel scheduling; clean on single-threaded rerun — same flake seen on unmodifiedmain.)Thanks!
@JJAutoCompare on GitHub · 2026-11-25 05:14 UTC · original
Empirical test report (
466a4258)Hardware / environment
rustc --versionreportedrustc 1.100.0 (0ef1bc386 2026-11-09).& "$env:XCL_DXC_DIR\dxc.exe" --versionreporteddxcompiler.dll: 1.9(5512-01b62ad4)(1.9.2609.5) - 1.9.2609.5 (01b62ad47).466a42589febc840198846349b3dccd455114cbb.Commands and results
cargo test --workspace --no-runexited 0 and built the workspace test executables, includinglog_contract. This was a compilation step with zero tests executed.Invoke-ArcTest.ps1, with no Arc GPU mutex held.Observed behavior
the_log_level_filter_and_file_line_formatpassed. The test checked case-insensitive level parsing, thewarningalias, and the default toInfofor unknown and empty values.Warnthreshold produced two lines, one forERRORand one forWARN. Both lines contained parseable elapsed time and thread ID fields and the expected tag and message. The Info, Debug, and Trace markers were absent.Not tested
This verification covered workspace test compilation and the focused CPU test. It omitted execution of the full GPU workspace suite and game smoke runs.
AI use
Verified with T3 Code / Codex (gpt-6.2-sol, reasoningEffort: high). Coordinator #2 (T3 Code / Antigravity, gemini-4-neon) verified counts against
pr1589-focused.logand published.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.