tailscale/util
Brad Fitzpatrick f844c8bc32 util/winutil/gp: deflake TestGroupPolicyReadLockClose
The test goroutine read lockCnt immediately after Lock returned, racing
with Close: close(lk.closing) wakes lockSlow's select, whose deferred
Add(-2) on lockCnt can run before Close's CAS clears the LSB. When that
happens, lockCnt is briefly 1 (3 - 2) instead of 0 (1 + 2 - 2 - 1),
producing "lockCnt: got 1; want 0".

Move the lockCnt assertion into the main test goroutine, after both
Close has returned and the Lock goroutine has finished, so both updates
have settled before we read.

Fixes #19647

Change-Id: Ia67036ff73a1beb528cbd621460db9048f3066ad
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2026-05-05 14:02:35 -07:00
..
backoff all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
bufiox derp,types,util: use bufio Peek+Discard for allocation-free fast reads (#19067) 2026-03-24 10:52:20 -04:00
checkchange all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
cibuild all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
clientmetric all: fix six tests that failed with -count=2 2026-04-13 18:52:57 -07:00
cloudenv all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
cloudinfo all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
cmpver cmd/vet: add subtestnames analyzer; fix all existing violations 2026-04-05 15:52:51 -07:00
codegen all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
ctxkey all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
deephash cmd/vet/lowerell, drive/driveimpl: forbid variables named "l" or "I" 2026-05-04 14:03:28 -07:00
dirwalk all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
dnsname all: use Go 1.26 things, run most gofix modernizers 2026-03-06 13:32:03 -08:00
eventbus cmd/vet: add subtestnames analyzer; fix all existing violations 2026-04-05 15:52:51 -07:00
execqueue all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
goroutines all: use Go 1.26 things, run most gofix modernizers 2026-03-06 13:32:03 -08:00
groupmember all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
hashx all: use Go 1.26 things, run most gofix modernizers 2026-03-06 13:32:03 -08:00
httphdr all: use Go 1.26 things, run most gofix modernizers 2026-03-06 13:32:03 -08:00
httpm util/httpm: open .git/index to defeat Go test caching 2026-04-15 15:44:19 -07:00
limiter all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
lineiter all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
lineread all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
linuxfw util/linuxfw/linuxfwtest: remove unused package (#19520) 2026-05-04 12:33:12 -07:00
lru all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
mak all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
multierr all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
must all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
nocasemaps all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
osdiag util/osdiag: fix typo in comment (reciever -> receiver) 2026-03-23 12:54:38 +00:00
osshare all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
osuser util/osuser: extend id command fallback for group IDs to freebsd 2026-03-09 08:39:07 +00:00
precompress all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
progresstracking all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
prompt all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
qrcodes all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
quarantine all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
race all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
racebuild all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
rands all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
reload all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
ringlog all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
safediff all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
set all: use Go 1.26 things, run most gofix modernizers 2026-03-06 13:32:03 -08:00
singleflight all: use Go 1.26 things, run most gofix modernizers 2026-03-06 13:32:03 -08:00
slicesx all: use Go 1.26 things, run most gofix modernizers 2026-03-06 13:32:03 -08:00
stringsx all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
syspolicy cmd/vet: add subtestnames analyzer; fix all existing violations 2026-04-05 15:52:51 -07:00
testenv all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
truncate all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
usermetric all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
vizerror all: use Go 1.26 things, run most gofix modernizers 2026-03-06 13:32:03 -08:00
winutil util/winutil/gp: deflake TestGroupPolicyReadLockClose 2026-05-05 14:02:35 -07:00
zstdframe all: use Go 1.26 things, run most gofix modernizers 2026-03-06 13:32:03 -08:00