mirror of
https://github.com/golang/go.git
synced 2025-12-28 06:34:04 +00:00
runtime: print output in case of segfault in goroutine leak tests
For #76526. Change-Id: I017e5d4c06e5de23cccc59c4c347599fecdece03 Reviewed-on: https://go-review.googlesource.com/c/go/+/726524 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Michael Pratt <mpratt@google.com> Auto-Submit: Michael Knyszek <mknyszek@google.com>
This commit is contained in:
parent
9616c33295
commit
54e5540014
@ -487,9 +487,9 @@ func TestGoroutineLeakProfile(t *testing.T) {
|
||||
testCases = append(testCases, patternTestCases...)
|
||||
|
||||
// Test cases must not panic or cause fatal exceptions.
|
||||
failStates := regexp.MustCompile(`fatal|panic|DATA RACE`)
|
||||
failStates := regexp.MustCompile(`segmentation fault|fatal|panic|DATA RACE`)
|
||||
|
||||
testApp := func(exepath string, testCases []testCase) {
|
||||
runTests := func(exepath string, testCases []testCase) {
|
||||
|
||||
// Build the test program once.
|
||||
exe, err := buildTestProg(t, exepath)
|
||||
@ -598,6 +598,6 @@ func TestGoroutineLeakProfile(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
testApp("testgoroutineleakprofile", testCases)
|
||||
testApp("testgoroutineleakprofile/goker", gokerTestCases)
|
||||
runTests("testgoroutineleakprofile", testCases)
|
||||
runTests("testgoroutineleakprofile/goker", gokerTestCases)
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user