Commit 4c76c01
committed
TestSocketLabel: use LockOSThread to avoid flakes
The SetSocketLabel documentation says the caller should use
runtime.LockOSThread. Indeed, if not used, there is an occasional flake:
> $ go test -count 10000 -run SocketLabel .
> --- FAIL: TestSocketLabel (0.00s)
> label_linux_test.go:189: write /proc/thread-self/attr/sockcreate: permission denied
Add LockOSThread to fix the flake.
Signed-off-by: Kir Kolyshkin <[email protected]>1 parent 13b180a commit 4c76c01
1 file changed
+6
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
188 | 188 | | |
189 | 189 | | |
190 | 190 | | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
191 | 197 | | |
192 | 198 | | |
193 | 199 | | |
| |||
0 commit comments