Page MenuHomeFreeBSD

D56723.id177051.diff
No OneTemporary

D56723.id177051.diff

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
@@ -177,6 +177,23 @@
atf_check test "$status2" -eq 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 <foo
+ # Background locker quit and foreground locker succeeded
+ atf_check -o save:trace kdump -tc
+ # Check how many times foreground locker called flock()
+ atf_check -o inline:"2\n" egrep -c 'CALL +flock' trace
+}
+
atf_test_case keep
keep_body()
{
@@ -334,6 +351,7 @@
atf_add_test_case basic
atf_add_test_case bubble_error
atf_add_test_case fdlock
+ atf_add_test_case fdlockspin
atf_add_test_case keep
atf_add_test_case needfile
atf_add_test_case termchild

File Metadata

Mime Type
text/plain
Expires
Fri, Jul 24, 2:22 AM (14 h, 5 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
32656043
Default Alt Text
D56723.id177051.diff (1005 B)

Event Timeline