Skip to content

testing: data race in FailNow #7401

@dvyukov

Description

@dvyukov
go version devel +3cf533be5e36 Mon Feb 24 16:34:51 2014 +0900 linux/amd64

$ go test -race testing

WARNING: DATA RACE
Write by goroutine 71:
  testing.(*common).FailNow()
      src/pkg/testing/testing.go:303 +0x48
  testing.(*common).Fatal()
      src/pkg/testing/testing.go:339 +0x78
  testing_test.func·003()
      src/pkg/testing/benchmark_test.go:91 +0x312
  testing.func·002()
      src/pkg/testing/benchmark.go:416 +0x17d

Previous write by goroutine 70:
  testing.(*common).FailNow()
      src/pkg/testing/testing.go:303 +0x48
  testing.(*common).Fatal()
      src/pkg/testing/testing.go:339 +0x78
  testing_test.func·003()
      src/pkg/testing/benchmark_test.go:91 +0x312
  testing.func·002()
      src/pkg/testing/benchmark.go:416 +0x17d

Goroutine 71 (running) created at:
  testing.(*B).RunParallel()
      src/pkg/testing/benchmark.go:417 +0x3a1
  testing_test.func·004()
      src/pkg/testing/benchmark_test.go:92 +0xc4
  testing.(*B).runN()
      src/pkg/testing/benchmark.go:124 +0xe8
  testing.(*B).launch()
      src/pkg/testing/benchmark.go:197 +0xc6

Goroutine 70 (finished) created at:
  testing.(*B).RunParallel()
      src/pkg/testing/benchmark.go:417 +0x3a1
  testing_test.func·004()
      src/pkg/testing/benchmark_test.go:92 +0xc4
  testing.(*B).runN()
      src/pkg/testing/benchmark.go:124 +0xe8
  testing.(*B).launch()
      src/pkg/testing/benchmark.go:197 +0xc6

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions