diff --git a/usr.bin/lockf/tests/lockf_test.sh b/usr.bin/lockf/tests/lockf_test.sh --- a/usr.bin/lockf/tests/lockf_test.sh +++ b/usr.bin/lockf/tests/lockf_test.sh @@ -328,6 +328,23 @@ lockf -wt 0 "testlock" sleep 0 } +atf_test_case fdlockspin +fdlockspin_head() +{ + atf_set "descr" "Don't spin when locking a file descriptor" +} +fdlockspin_body() +{ + # Start background locker and give it time to get settled + lockf foo sleep 2 & sleep 1 + # Start foreground locker in fdlock mode + atf_check ktrace -tc lockf -t 3 0