tests: Implement test_fcntl_lock correctly
authorAndreas Schneider <asn@samba.org>
Fri, 23 Jun 2023 11:50:03 +0000 (13:50 +0200)
committerAndreas Schneider <asn@samba.org>
Thu, 29 Jun 2023 09:22:19 +0000 (11:22 +0200)
commit72d3b3c26a51024e35f82673f6d7ce734ccf54bf
tree4f3dca7405af6bbb9216049598bae97cbb581ed2
parentbbe14cc3200ca553b13ed49357e2e88ba487eeaa
tests: Implement test_fcntl_lock correctly

This does:

openat(AT_FDCWD, "/tmp/test_socket_wrapper_Win6aA/file", O_RDWR|O_CREAT, 0600) = 3
fcntl(3, F_OFD_SETLK, {l_type=F_WRLCK, l_whence=SEEK_SET, l_start=0, l_len=1}) = 0
write(3, "fd=3\n", 5)                   = 5
fcntl(3, F_OFD_SETLK, {l_type=F_UNLCK, l_whence=SEEK_SET, l_start=0, l_len=1}) = 0
unlink("/tmp/test_socket_wrapper_Win6aA/file") = 0                                                                                                                                   close(3)
close(3)                                = 0

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
tests/test_fcntl_lock.c