From: Damien Neil Date: Thu, 20 Mar 2025 20:33:49 +0000 (-0700) Subject: runtime/race: don't complain about unrun tests when fatal map access happens X-Git-Tag: go1.25rc1~641 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=686128a9f3f112c2e103622190673656811dee5f;p=gostls13.git runtime/race: don't complain about unrun tests when fatal map access happens Fixes #72964 Change-Id: I42c6994fec3b21774bddd1d4d65dc832d9149446 Reviewed-on: https://go-review.googlesource.com/c/go/+/659697 Reviewed-by: Ian Lance Taylor LUCI-TryBot-Result: Go LUCI --- diff --git a/src/runtime/race/race_test.go b/src/runtime/race/race_test.go index 98936e3d3e..1c8bc949bf 100644 --- a/src/runtime/race/race_test.go +++ b/src/runtime/race/race_test.go @@ -190,6 +190,12 @@ func runTests(t *testing.T) ([]byte, error) { // in the map concurrent access detector). return out, errors.New("runtime fatal error") } + // A crash in the map concurrent access detector will cause other tests not to run. + // Perhaps we should run tests with concurrent map access separately to avoid this, + // but for the moment just skip the remaining tests. + if mapFatals == 0 { + return out, nil + } if !bytes.Contains(out, []byte("ALL TESTS COMPLETE")) { return out, errors.New("not all tests ran") }