diff options
| author | Damien Neil <dneil@google.com> | 2025-03-18 10:22:04 -0700 |
|---|---|---|
| committer | Gopher Robot <gobot@golang.org> | 2025-03-19 10:21:06 -0700 |
| commit | f9f5d1e8442e3268489f3cfab2f9b65922bd4b5b (patch) | |
| tree | 5c7321afe1a7e1209ee96365427fee4afa49d257 /src/runtime/race/testdata/rangefunc_test.go | |
| parent | 011b7ce8d12c14e9bd9b95a2519a6513a407bfc9 (diff) | |
| download | go-f9f5d1e8442e3268489f3cfab2f9b65922bd4b5b.tar.xz | |
runtime/race: detect when TestRace fails to run all tests, skip failures
TestRace runs a collection of tests, some of which are expected
to fail with data races. Make TestRace more robust at detecting
when the test run is cut short, such as when a test causes
an unhandled panic.
Skip TestRaceRangeFuncIterator, which contains an unhandled panic.
This test was causing all subsequent tests to not run.
Skip TestNoRaceRangeFuncIterator, which contains an unexpected data race.
This test was not running due to the above failure.
For #72925
Change-Id: Id662375cc498ea25ae308619709768588bf6a2f0
Reviewed-on: https://go-review.googlesource.com/c/go/+/658875
Reviewed-by: Ian Lance Taylor <iant@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Damien Neil <dneil@google.com>
Diffstat (limited to 'src/runtime/race/testdata/rangefunc_test.go')
| -rw-r--r-- | src/runtime/race/testdata/rangefunc_test.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/runtime/race/testdata/rangefunc_test.go b/src/runtime/race/testdata/rangefunc_test.go index f2ff793df7..453c0733ed 100644 --- a/src/runtime/race/testdata/rangefunc_test.go +++ b/src/runtime/race/testdata/rangefunc_test.go @@ -65,6 +65,7 @@ func foo(v int) int64 { // TestRaceRangeFuncIterator races because x%5 can be equal to 4, // therefore foo can early exit. func TestRaceRangeFuncIterator(t *testing.T) { + t.Skip("#72925: uncaught panic ends tests") x := foo(4) t.Logf("foo(4)=%d", x) } @@ -72,6 +73,7 @@ func TestRaceRangeFuncIterator(t *testing.T) { // TestNoRaceRangeFuncIterator does not race because x%5 is never 5, // therefore foo's loop will not exit early, and this it will not race. func TestNoRaceRangeFuncIterator(t *testing.T) { + t.Skip("#72925: unexpected data race") x := foo(5) t.Logf("foo(5)=%d", x) } |
