Commit 360b2a3
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 4aa96bb commit 360b2a3
1 file changed
+7
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| |||
181 | 182 | | |
182 | 183 | | |
183 | 184 | | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
184 | 191 | | |
185 | 192 | | |
186 | 193 | | |
| |||
0 commit comments