Mike Danese
94f4f06d13
test flake: fix data race in csi_test.go
The attach goroutine can currently t.Log/t.Error during or after the
subtest completion. This causes races like:
```
==================
WARNING: DATA RACE
Read at 0x00c000e90ac3 by goroutine 1231:
testing.(*common).logDepth()
GOROOT/src/testing/testing.go:736 +0xa9
testing.(*common).log()
GOROOT/src/testing/testing.go:729 +0x8f
testing.(*common).Logf()
GOROOT/src/testing/testing.go:775 +0x21
k8s.io/kubernetes/pkg/volume/csi.TestCSI_VolumeAll.func21.1()
pkg/volume/csi/csi_test.go:313 +0x1a4
Previous write at 0x00c000e90ac3 by goroutine 875:
testing.tRunner.func1()
GOROOT/src/testing/testing.go:1113 +0x484
testing.tRunner()
GOROOT/src/testing/testing.go:1131 +0x22a
testing.tRunner()
GOROOT/src/testing/testing.go:1127 +0x202
Goroutine 1231 (running) created at:
k8s.io/kubernetes/pkg/volume/csi.TestCSI_VolumeAll.func21()
pkg/volume/csi/csi_test.go:307 +0xf05
testing.tRunner()
GOROOT/src/testing/testing.go:1127 +0x202
Goroutine 875 (running) created at:
testing.(*T).Run()
GOROOT/src/testing/testing.go:1178 +0x796
k8s.io/kubernetes/pkg/volume/csi.TestCSI_VolumeAll()
pkg/volume/csi/csi_test.go:223 +0xb2c
testing.tRunner()
GOROOT/src/testing/testing.go:1127 +0x202
==================
```
See also this comment:
07c1788357/src/testing/testing.go (L1141-L1142)
Noticed in:
https://github.com/kubernetes/kubernetes/pull/94449
https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/94449/pull-kubernetes-bazel-test/1304519003330318337
2020-09-11 22:19:42 -07:00
..
2020-09-08 10:59:33 +02:00
2020-09-08 19:14:36 -07:00
2020-05-16 07:54:33 -04:00
2020-09-04 15:33:43 -04:00
2020-07-30 13:48:40 -04:00
2020-09-02 10:48:25 -07:00
2020-09-11 00:08:14 -07:00
2020-09-10 16:34:05 -07:00
2020-07-30 13:48:40 -04:00
2020-09-10 09:03:00 +08:00
2020-07-24 13:01:02 +05:30
2020-07-24 13:01:02 +05:30
2020-06-16 11:53:22 +08:00
2020-09-11 04:20:14 -07:00
2020-09-03 22:23:20 +05:30
2020-09-08 19:14:36 -07:00
2020-09-04 11:22:11 -04:00
2020-09-10 09:03:00 +08:00
2020-09-08 11:33:05 -04:00
2020-09-08 19:14:36 -07:00
2020-05-16 07:54:33 -04:00
2020-09-11 00:08:14 -07:00
2020-07-11 15:35:22 -07:00
2020-05-04 18:25:23 -07:00
2020-05-21 15:34:57 -07:00
2020-05-16 07:54:33 -04:00
2020-09-05 01:07:46 +08:00
2020-09-11 22:19:42 -07:00
2020-05-16 07:54:33 -04:00
2020-04-28 08:46:49 -07:00
2020-09-08 14:34:55 -07:00
2020-08-08 19:08:38 -04:00