The branch main has been updated by markj:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=498b3b494b8b3e500e555a9653d950b9e25a2f1a

commit 498b3b494b8b3e500e555a9653d950b9e25a2f1a
Author:     Mark Johnston <[email protected]>
AuthorDate: 2024-07-14 16:13:13 +0000
Commit:     Mark Johnston <[email protected]>
CommitDate: 2024-07-14 18:29:14 +0000

    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
---
 usr.bin/lockf/tests/lockf_test.sh | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

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 \

Reply via email to