Skip to content
This repository has been archived by the owner on Mar 6, 2020. It is now read-only.

cmd/gb: TestTestRace fails on windows because test-race.exe is in use when atExit runs #715

Open
davecheney opened this issue May 3, 2017 · 0 comments

Comments

@davecheney
Copy link
Contributor

--- FAIL: TestTestRace (0.51s)
gb_test.go:176: running C:\Users\appveyor\AppData\Local\Temp\1\testgb480388079\testgb.exe [test -race]
gb_test.go:186: standard output:
gb_test.go:187: ==================
WARNING: DATA RACE
Read at 0x00c042036c60 by goroutine 7:
runtime.mapaccess1_fast64()
C:/go/src/runtime/hashmap_fast.go:110 +0x0
race.TestRaceMapRW.func1()
C:/Users/appveyor/AppData/Local/Temp/1/testgb585552664/src/race/map_test.go:9 +0x58

	Previous write at 0x00c042036c60 by goroutine 6:
	  runtime.mapassign()
	      C:/go/src/runtime/hashmap.go:485 +0x0
	  race.TestRaceMapRW()
	      C:/Users/appveyor/AppData/Local/Temp/1/testgb585552664/src/race/map_test.go:12 +0xe1
	  testing.tRunner()
	      C:/go/src/testing/testing.go:657 +0x10e
	
	Goroutine 7 (running) created at:
	  race.TestRaceMapRW()
	      C:/Users/appveyor/AppData/Local/Temp/1/testgb585552664/src/race/map_test.go:11 +0xb4
	  testing.tRunner()
	      C:/go/src/testing/testing.go:657 +0x10e
	
	Goroutine 6 (running) created at:
	  testing.(*T).Run()
	      C:/go/src/testing/testing.go:697 +0x54a
	  testing.runTests.func1()
	      C:/go/src/testing/testing.go:882 +0xb1
	  testing.tRunner()
	      C:/go/src/testing/testing.go:657 +0x10e
	  testing.runTests()
	      C:/go/src/testing/testing.go:888 +0x4e7
	  testing.(*M).Run()
	      C:/go/src/testing/testing.go:822 +0x1ca
	  main.main()
	      C:/Users/appveyor/AppData/Local/Temp/1/testgb585552664/tmp/gb206094099/race/_test/_testmain.go:40 +0x216
	==================
	==================
	WARNING: DATA RACE
	Read at 0x00c0420780d8 by goroutine 7:
	  race.TestRaceMapRW.func1()
	      C:/Users/appveyor/AppData/Local/Temp/1/testgb585552664/src/race/map_test.go:9 +0x6e
	
	Previous write at 0x00c0420780d8 by goroutine 6:
	  race.TestRaceMapRW()
	      C:/Users/appveyor/AppData/Local/Temp/1/testgb585552664/src/race/map_test.go:12 +0xf7
	  testing.tRunner()
	      C:/go/src/testing/testing.go:657 +0x10e
	
	Goroutine 7 (running) created at:
	  race.TestRaceMapRW()
	      C:/Users/appveyor/AppData/Local/Temp/1/testgb585552664/src/race/map_test.go:11 +0xb4
	  testing.tRunner()
	      C:/go/src/testing/testing.go:657 +0x10e
	
	Goroutine 6 (running) created at:
	  testing.(*T).Run()
	      C:/go/src/testing/testing.go:697 +0x54a
	  testing.runTests.func1()
	      C:/go/src/testing/testing.go:882 +0xb1
	  testing.tRunner()
	      C:/go/src/testing/testing.go:657 +0x10e
	  testing.runTests()
	      C:/go/src/testing/testing.go:888 +0x4e7
	  testing.(*M).Run()
	      C:/go/src/testing/testing.go:822 +0x1ca
	  main.main()
	      C:/Users/appveyor/AppData/Local/Temp/1/testgb585552664/tmp/gb206094099/race/_test/_testmain.go:40 +0x216
	==================
	--- FAIL: TestRaceMapRW (0.00s)
		testing.go:610: race detected during execution of test
	FAIL
	
gb_test.go:190: standard error:
gb_test.go:191: # race
	FATAL: command "test" failed: [C:\Users\appveyor\AppData\Local\Temp\1\testgb585552664\tmp\gb206094099\race\testmain\_test\testmain-race.exe]: exit status 1
	atExit: remove C:\Users\appveyor\AppData\Local\Temp\1\testgb585552664\tmp\gb206094099\race\testmain\_test\testmain-race.exe: Access is denied.
	
gb_test.go:210: C:\Users\appveyor\AppData\Local\Temp\1\testgb480388079\testgb.exe failed as expected: exit status 1
gb_test.go:456: expected C:\Users\appveyor\AppData\Local\Temp\1\testgb585552664\tmp to be empty, found [C:\Users\appveyor\AppData\Local\Temp\1\testgb585552664\tmp\gb206094099 C:\Users\appveyor\AppData\Local\Temp\1\testgb585552664\tmp\gb206094099\race C:\Users\appveyor\AppData\Local\Temp\1\testgb585552664\tmp\gb206094099\race\testmain C:\Users\appveyor\AppData\Local\Temp\1\testgb585552664\tmp\gb206094099\race\testmain\_test C:\Users\appveyor\AppData\Local\Temp\1\testgb585552664\tmp\gb206094099\race\testmain\_test\testmain-race.exe]
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant