aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/go/testdata/script/testing_issue40908.txt
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmd/go/testdata/script/testing_issue40908.txt')
-rw-r--r--src/cmd/go/testdata/script/testing_issue40908.txt21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/cmd/go/testdata/script/testing_issue40908.txt b/src/cmd/go/testdata/script/testing_issue40908.txt
new file mode 100644
index 0000000000..4939de080c
--- /dev/null
+++ b/src/cmd/go/testdata/script/testing_issue40908.txt
@@ -0,0 +1,21 @@
+[short] skip
+[!race] skip
+
+go test -race testrace
+
+-- testrace/race_test.go --
+package testrace
+
+import "testing"
+
+func TestRace(t *testing.T) {
+ helperDone := make(chan struct{})
+ go func() {
+ t.Logf("Something happened before cleanup.")
+ close(helperDone)
+ }()
+
+ t.Cleanup(func() {
+ <-helperDone
+ })
+}