aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/lockf
diff options
context:
space:
mode:
authorMark Johnston <markj@FreeBSD.org>2024-07-14 16:13:13 +0000
committerMark Johnston <markj@FreeBSD.org>2024-07-14 18:29:14 +0000
commit498b3b494b8b3e500e555a9653d950b9e25a2f1a (patch)
tree7883aa76572e51f23c5c184fed9b308f6dfad246 /usr.bin/lockf
parentab27e232b14c07317642a2e4c546c9b71bd9c00b (diff)
downloadsrc-498b3b494b8b3e500e555a9653d950b9e25a2f1a.tar.gz
src-498b3b494b8b3e500e555a9653d950b9e25a2f1a.zip
lockf tests: Fix a race
The test launches lockf(1) in the background and races with it, so it shouldn't be using atf_check to check that lockf won the race. MFC after: 1 week
Diffstat (limited to 'usr.bin/lockf')
-rw-r--r--usr.bin/lockf/tests/lockf_test.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.bin/lockf/tests/lockf_test.sh b/usr.bin/lockf/tests/lockf_test.sh
index cc6938d2306e..d73c7590653d 100644
--- a/usr.bin/lockf/tests/lockf_test.sh
+++ b/usr.bin/lockf/tests/lockf_test.sh
@@ -47,7 +47,9 @@ basic_body()
lpid=$!
# Make sure that the lock exists...
- atf_check test -e "testlock"
+ while ! test -e "testlock"; do
+ sleep 0.1
+ done
# Attempt both verbose and silent re-lock
atf_check -s exit:${EX_TEMPFAIL} -e not-empty \