Repository navigation
Conversation
…classes, failing first Item 5 of #1114 moves .github/scripts/go-test-crash-aware.sh into Go. These tests come first, against a package holding only its doc comment, where they do not build (undefined: stream, run, gotestsumCommand). Recorded go test -json streams under testdata/ stand for each path the script took: a pass, a crash beside a dead package (the 2026-09-12 Windows run), a failing package beside a crash, and the three reruns. The whole command is driven against a stand-in gotestsum, this test binary started again, so the exec path is the real one on every platform the cross-platform job runs. Refs #1114 Signed-off-by: José M. Requena Plens <mail@jmrp.io>
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 59 minutes. View limit details
No actionable comments were generated in the recent review. Summary
Merge Risk:
|
… in Go The command reads gotestsum's go test -json stream back and keeps the script's classes: a package with a "fatal error:" line outside the list of messages the runtime uses for a bug in the code under test is crashed, one with a fail event, no failing test and no line explaining it is dead, and every other package with a fail event is failing. Failing packages fail the run with their tests listed; crashed and dead ones are run once more, alone and with the same flags, and pass the run only when every one of them passes there. The report goes to the log and to the job summary GitHub names. Two answers the script gave without meaning to are refused. A first run that wrote no stream exited with gotestsum's own status, which is 0 when gotestsum could not tell anything went wrong; it now fails. A rerun that wrote no stream reported every package as passed when gotestsum exited 0; each is now reported with no stream, and the run fails. A pipe in a crash line is escaped in its table cell. 100.0% of statements; make coverage-mutants: 41 killed, 0 lived, 0 not covered, 0 timed out. Refs #1114 Signed-off-by: José M. Requena Plens <mail@jmrp.io>
The unit suite of the three cross-platform legs runs through the Go command instead of .github/scripts/go-test-crash-aware.sh, in each platform's default shell, so the Windows leg needs neither bash nor jq to read its own verdict. The script, its declaration and the line of pendingPorts for item 5 of #1114 are gone, and the verdict job's comment names the command. Refs #1114 Signed-off-by: José M. Requena Plens <mail@jmrp.io>
make coverage-mutants on cmd/audit_supply_chain, which this stack touches, left two mutants of untriggeredEvents alive: reading only the first github.event_name comparison of a condition passed every case, since none named two events. A condition naming two events the workflow is not triggered by is now reported for each of them. make coverage-mutants: 1158 killed and 2 lived before this case. Refs #1114 Signed-off-by: José M. Requena Plens <mail@jmrp.io>
docs/development/testing/testing.md is regenerated with -skip-coverage for the test functions and files cmd/crash_aware_tests adds, so `make check-testing-docs` passes on this layer whether CI checks the freshness gates here or defers them to the top of the stack. The new package reads n/a until the top of the stack measures its coverage. Refs #1114 Signed-off-by: José M. Requena Plens <mail@jmrp.io>
c3b8d2c to
ef8c79b
Compare
|



Refs #1114
This is item 5 of #1114:
.github/scripts/go-test-crash-aware.shported to Go ascmd/crash_aware_tests. It is the first layer of a stack that ports items 5, 11 and 12 and adds the rule of #1477.The cross-platform job runs its unit suite through the runner on all three legs. The Windows leg dies inside the Go runtime now and then (#467, explained by Go issue 81238), and the runner keeps that crash apart from a failing test. It is a Go command now, so the step runs in each platform's default shell and the Windows leg needs neither bash nor jq to read its own verdict.
The command keeps the script's classes. It runs the suite through gotestsum and reads the go test -json stream back. A package with a
fatal error:line outside the messages the runtime uses for a bug in the code under test is crashed. One with a fail event, no failing test and no line explaining it is dead. Every other package with a fail event is failing and fails the run, listed with its tests. Crashed and dead packages run once more, alone and with the same flags, and pass the run only when every one passes there. The report goes to the log and to the job summary.Two answers the script gave without meaning to are refused. A first run that wrote no stream exited with gotestsum's own status, which is 0 when gotestsum could not tell anything went wrong; it now fails. A rerun that wrote no stream left every package of it reported as passed when gotestsum exited 0; each is now reported with no stream, and the run fails. A pipe in a crash line is escaped in its table cell.
The script, its declaration and the line of
pendingPortsfor item 5 are gone.Taking the declaration out touches
cmd/audit_supply_chain, wheremake coverage-mutantsleft two mutants of rule 9'suntriggeredEventsalive, code this layer did not write: no case named two events in one condition. A commit of this layer adds that case. A last commit regenerates the counts ofdocs/development/testing/testing.mdwith-skip-coverage, somake check-testing-docspasses on this layer whether CI checks the freshness gates here or defers them to the top of the stack.How I checked it
testdata/stand for each path the script took: a pass, a crash beside a dead package (the 2026-09-12 Windows run), a failing package beside a crash, and the three reruns. The whole command runs against a stand-in gotestsum, the test binary started again, so the exec path is the real one on every platform.go test -racepasses oncmd/crash_aware_testsandcmd/audit_supply_chain, both at 100.0% of statements, and the whole unit suite passes on this layer's head with the freshness gates checked.make check-supply-chain, the make targets of the Generated artifacts job and actionlint pass.Mutants
cmd/crash_aware_testscmd/audit_supply_chain