Commit 055e1a3a authored by Dmitry Vyukov's avatar Dmitry Vyukov

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/11416Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
parent 1045351c
......@@ -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)
......
......@@ -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() {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment