Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F177358799
D56723.1794192394.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
1005 B
Referenced Files
None
Subscribers
None
D56723.1794192394.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
@@ -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
Details
Attached
Mime Type
text/plain
Expires
Mon, Nov 9, 2:46 AM (4 h, 45 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41603789
Default Alt Text
D56723.1794192394.diff (1005 B)
Attached To
Mode
D56723: lockf: Test that lockf does not spin on fd
Attached
Detach File
Event Timeline