Tests: pin the process logger's level filter and file line format #1579
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/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?
Imported from ivall/xcl. Originally posted by amazedturnip on 2026-11-24T18:00:54Z.
Pins 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
Imported from ivall/xcl. Originally posted by futurepro62 on 2026-11-24T18:53:57Z.
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
Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-24T20:02:59Z.
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!
Imported from ivall/xcl. Originally posted by JJAutoCompare on 2026-11-25T05:14:49Z.
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.Imported from ivall/xcl. Originally posted by github-actions[bot] on 2026-11-28T20:18:07Z.
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 amazedturnip on 2026-11-28T20:36:42Z.
Still merges cleanly onto main (
765b2c5b) with passing checks; pins process logger level filtering and output line format contracts — waiting on maintainer / post-goal review.Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T06:12:14Z.
Triage (#1607) – head
466a425No open or merged PR tests the logger's level filter and line format; main's log.rs has only
a_panic_is_in_the_log. The open log.rs PRs (#2286, #2634, #3430, #2933) change the logger's behaviour and would need this test updated if they change the line format.The assertions match main's
Level::parse,enabled,initandwrite([{t:9.3}][{tid:5}][{TAG}] msg). Splitting on]assumes the message has no]; the markers used do not.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.