Testing with overalls gives a race
$ overalls -project=github.com/mmcloughlin/overallsrace -- -v -race
| github.com/mmcloughlin/overallsrace
Test args: [test -v -race -covermode=count -coverprofile=profile.coverprofile -outputdir=.../src/github.com/mmcloughlin/overallsrace/ ./.]
2017/04/25 21:33:07 === RUN TestGreeting
2017/04/25 21:33:07 ==================
2017/04/25 21:33:07 WARNING: DATA RACE
...
2017/04/25 21:33:07 ==================
2017/04/25 21:33:07 --- PASS: TestGreeting (0.00s)
2017/04/25 21:33:07 PASS
2017/04/25 21:33:07 coverage: 100.0% of statements
2017/04/25 21:33:08 Found 1 data race(s)
2017/04/25 21:33:08 exit status 66
2017/04/25 21:33:08 FAIL github.com/mmcloughlin/overallsrace 1.032s
2017/04/25 21:33:08 ERROR:exit status 1
I believe this is because of -covermode=count
$ go test -v -race -covermode=count
=== RUN TestGreeting
==================
WARNING: DATA RACE
...
==================
--- PASS: TestGreeting (0.00s)
PASS
coverage: 100.0% of statements
Found 1 data race(s)
exit status 66
FAIL github.com/mmcloughlin/overallsrace 1.032s
Using atomic
removes the race
$ go test -v -race -covermode=atomic
=== RUN TestGreeting
--- PASS: TestGreeting (0.00s)
PASS
coverage: 100.0% of statements
ok github.com/mmcloughlin/overallsrace 1.030s