mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 23:30:53 +01:00
[PR #1051] run_semantic_tests: name a failed module's exit code, and a crash that printed nothing (SEMANTIC-RUNNER-EXIT-CODE) #1089
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#1089
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
📋 Pull Request Information
Original PR: https://github.com/ubiquitarianism/leonida/pull/1051
Author: @shwepz
Created: 11/24/2026
Status: 🔄 Open
Base:
main← Head:semantic-runner-exit-code📝 Commits (2)
448e09crun_semantic_tests: name a failed module's exit code, and a crash that printed nothing (SEMANTIC-RUNNER-EXIT-CODE)0f58c3erun_semantic_tests: call only known crash statuses a crash (review on #1051)📊 Changes
2 files changed (+80 additions, -3 deletions)
View changed files
📝
scripts/run_semantic_tests.py(+41 -3)📝
tests/test_run_semantic_tests.py(+39 -0)📄 Description
Claimed in the coordination issue as: SEMANTIC-RUNNER-EXIT-CODE (https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7138999168)
What and why
scripts/run_semantic_tests.pyprinted a failed module as==== FAILED: <name>followed by its output, but never its exit code. A module whose interpreter crashes prints nothing, so it showed up as a bare header with nothing under it, and the run gave no clue why it failed.I hit this on a Windows 11 machine: a different 4-9 files failed each full run, every one as an empty
==== FAILEDblock. With the exit code printed they turned out to bepython.exeexiting0xC0000005(access violation) in pure-Python tests that pass when run alone, and that pass in a 12-job run on Linux. So the fault is that machine, not the tests, but there was no way to tell from the runner's output.The header now carries the exit code:
describe_exit(code): a POSIX signal by name, a Windows NTSTATUS (>= 0xC0000000) in hex with its meaning for the common crash codes (access violation, illegal instruction, out of memory, stack overflow, Ctrl+C, heap corruption, fail fast), otherwiseexit code N.(no output ...)line.main()changes.run_moduleis untouched, so this does not overlap #662, which rewritesrun_module's test counting. The existing tests match the header as a prefix (==== FAILED: test_f), so they still hold.Tested
python -I tests/test_run_semantic_tests.py, three new tests:test_a_failure_header_names_the_exit_codetest_a_crash_that_prints_nothing_is_named: a module that really dies on import, with SIGSEGV on POSIX and exit code 0xC0000005 on Windowstest_describe_exittest_empty_package_alone_is_not_a_false_green (jobs=1), fails the same way onmainwithout this change. Python 3.11'sunittest discoverexits 0 when nothing ran; the exit code 5 the test expects is 3.12+.python -m compileall -qon both files.test_control_flow_vcc,test_lds_src2,test_vs_readfirstlaneandtest_wave64_halves_soundness, each exit code 3221225477 (0xC0000005), 0 tests run, 0 chars of output.describe_exit(3221225477)turns that into the access-violation line above.GPUs tested: n/a (no GPU code)
AI-assisted: yes
Checklist
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).docs/design.md, with how it was confirmed. (n/a: no translator change)🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.