runtime, testing: support Goexit, SkipNow, FailNow

Keep a pending Goexit separate from the active panic state so recovered
deferred panics do not cancel the original Goexit unwind. Goexit should
also ignore -panic=trap, since it is not a panic.

Wire testing.FailNow and SkipNow through runtime.Goexit, and run tests
and benchmarks in goroutines. This lets Goexit terminate the user
function without skipping test bookkeeping. Add Goexit/recover coverage
and enable crypto/ecdh in the Linux stdlib test list.
This commit is contained in:
Jake Bailey
2026-07-03 16:30:32 -07:00
committed by Ron Evans
parent fb1bf2e6bf
commit 16eefc59eb
15 changed files with 201 additions and 23 deletions
+2
View File
@@ -11,6 +11,8 @@
c
failed
after failed
--- FAIL: TestBar/Bar4 (0.00s)
fatal
log Bar end
--- FAIL: TestAllLowercase (0.00s)
--- FAIL: TestAllLowercase/BETA (0.00s)