Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F168124596
D56723.id176832.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
949 B
Referenced Files
None
Subscribers
None
D56723.id176832.diff
View Options
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 <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_init_test_cases()
{
atf_add_test_case badargs
@@ -341,4 +358,5 @@
atf_add_test_case writepid
atf_add_test_case writepid_keep
atf_add_test_case wrlock
+ atf_add_test_case fdlockspin
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Aug 27, 12:07 PM (19 h, 58 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
37382686
Default Alt Text
D56723.id176832.diff (949 B)
Attached To
Mode
D56723: lockf: Test that lockf does not spin on fd
Attached
Detach File
Event Timeline
Log In to Comment