mirror of
https://github.com/golang/go
synced 2024-11-23 04:10:04 -07:00
runtime/race: fix test driver
At some point it silently stopped recognizing test output. Meanwhile two tests degraded... Change-Id: I90a0325fc9aaa16c3ef16b9c4c642581da2bb10c Reviewed-on: https://go-review.googlesource.com/11416 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
parent
1045351cef
commit
055e1a3ae7
@ -36,7 +36,7 @@ var (
|
||||
|
||||
const (
|
||||
visibleLen = 40
|
||||
testPrefix = "=== RUN Test"
|
||||
testPrefix = "=== RUN Test"
|
||||
)
|
||||
|
||||
func TestRace(t *testing.T) {
|
||||
@ -63,6 +63,9 @@ func TestRace(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
if totalTests == 0 {
|
||||
t.Fatalf("failed to parse test output")
|
||||
}
|
||||
fmt.Printf("\nPassed %d of %d tests (%.02f%%, %d+, %d-)\n",
|
||||
passedTests, totalTests, 100*float64(passedTests)/float64(totalTests), falsePos, falseNeg)
|
||||
fmt.Printf("%d expected failures (%d has not fail)\n", failingPos+failingNeg, failingNeg)
|
||||
|
4
src/runtime/race/testdata/mop_test.go
vendored
4
src/runtime/race/testdata/mop_test.go
vendored
@ -1598,7 +1598,7 @@ func TestRaceSliceSlice(t *testing.T) {
|
||||
<-c
|
||||
}
|
||||
|
||||
func TestRaceSliceSlice2(t *testing.T) {
|
||||
func TestRaceSliceSlice2Failing(t *testing.T) {
|
||||
c := make(chan bool, 1)
|
||||
x := make([]int, 10)
|
||||
i := 2
|
||||
@ -1610,7 +1610,7 @@ func TestRaceSliceSlice2(t *testing.T) {
|
||||
<-c
|
||||
}
|
||||
|
||||
func TestRaceSliceString(t *testing.T) {
|
||||
func TestRaceSliceStringFailing(t *testing.T) {
|
||||
c := make(chan bool, 1)
|
||||
x := "hello"
|
||||
go func() {
|
||||
|
Loading…
Reference in New Issue
Block a user