/third_party/ltp/testcases/kernel/syscalls/fcntl/ |
H A D | fcntl13.c | 15 * - EINVAL when cmd argument is F_SETLK and flock.l_whence is not equal to 25 static struct flock flock; variable 30 struct flock *flock; member 35 {1, F_BADCMD, &flock, "F_BADCMD", EINVAL}, 36 {1, F_SETLK, &flock, "F_SETLK", EINVAL}, 37 {-1, F_GETLK, &flock, "F_GETLK", EBADF} 44 if (!tc->flock) in verify_fcntl() 45 tc->flock in verify_fcntl() [all...] |
H A D | fcntl14.c | 534 static struct flock flock; variable 614 flock.l_type = thiscase->c_type; in dochild() 615 flock.l_whence = thiscase->c_whence; in dochild() 616 flock.l_start = thiscase->c_start; in dochild() 617 flock.l_len = thiscase->c_len; in dochild() 618 flock.l_pid = 0; in dochild() 627 if ((rc = fcntl(fd, F_GETLK, &flock)) < 0) { in dochild() 634 if (flock.l_type != F_UNLCK) { in dochild() 638 flock in dochild() [all...] |
H A D | fcntl_common.h | 14 #define FCNTL_COMPAT(fd, cmd, flock) \ 15 SAFE_FCNTL(fd, cmd, flock) 31 * pass the flock sturct directly to the kernel even if it had 32-bit 41 int fd, int cmd, struct flock *lck) in fcntl_compat() 71 #define FCNTL_COMPAT(fd, cmd, flock) \ 72 fcntl_compat(__FILE__, __LINE__, #cmd, fd, cmd, flock)
|
H A D | fcntl21.c | 63 void compare_lock(struct flock *, short, short, int, int, pid_t); 65 void do_test(struct flock *, short, short, int, int); 134 struct flock fl; in do_child() 151 struct flock fl; in do_lock() 160 void do_test(struct flock *fl, short type, short whence, int start, int len) in do_test() 173 compare_lock(struct flock *fl, short type, short whence, int start, int len, in compare_lock() 210 struct flock fl; in unlock_file() 237 void parent_put(struct flock *l) in parent_put() 245 void parent_get(struct flock *l) in parent_get() 253 void child_put(struct flock * [all...] |
H A D | fcntl20.c | 64 void compare_lock(struct flock *, short, short, int, int, pid_t); 66 void do_test(struct flock *, short, short, int, int); 127 struct flock fl; in do_child() 143 struct flock fl; in do_lock() 152 void do_test(struct flock *fl, short type, short whence, int start, int len) in do_test() 165 compare_lock(struct flock *fl, short type, short whence, int start, int len, in compare_lock() 202 struct flock fl; in unlock_file() 229 void parent_put(struct flock *l) in parent_put() 237 void parent_get(struct flock *l) in parent_get() 245 void child_put(struct flock * [all...] |
H A D | fcntl19.c | 68 void compare_lock(struct flock *, short, short, int, int, pid_t); 70 void do_test(struct flock *, short, short, int, int); 130 struct flock fl; in do_child() 144 struct flock fl; in do_lock() 153 void do_test(struct flock *fl, short type, short whence, int start, int len) in do_test() 166 compare_lock(struct flock *fl, short type, short whence, int start, int len, in compare_lock() 203 struct flock fl; in unlock_file() 230 void parent_put(struct flock *l) in parent_put() 238 void parent_get(struct flock *l) in parent_get() 246 void child_put(struct flock * [all...] |
H A D | fcntl11.c | 64 void compare_lock(struct flock *, short, short, int, int, pid_t); 66 void do_test(struct flock *, short, short, int, int); 116 struct flock fl; in do_child() 130 struct flock fl; in do_lock() 139 void do_test(struct flock *fl, short type, short whence, int start, int len) in do_test() 152 compare_lock(struct flock *fl, short type, short whence, int start, int len, in compare_lock() 179 struct flock fl; in unlock_file() 204 void parent_put(struct flock *l) in parent_put() 209 void parent_get(struct flock *l) in parent_get() 214 void child_put(struct flock * [all...] |
H A D | fcntl17.c | 74 struct flock lock1 = { (short)F_WRLCK, (short)0, 2, 5, (short)0 }; 75 struct flock lock2 = { (short)F_WRLCK, (short)0, 9, 5, (short)0 }; 76 struct flock lock3 = { (short)F_WRLCK, (short)0, 17, 5, (short)0 }; 77 struct flock lock4 = { (short)F_WRLCK, (short)0, 17, 5, (short)0 }; 78 struct flock lock5 = { (short)F_WRLCK, (short)0, 2, 14, (short)0 }; 79 struct flock unlock = { (short)F_UNLCK, (short)0, 0, 0, (short)0 }; 91 int do_test(struct flock *, pid_t); 285 int do_test(struct flock *lock, pid_t pid) in do_test() 287 struct flock fl; in do_test()
|
H A D | fcntl18.c | 65 struct flock fl; in main() 83 retval = fcntl(fd, F_GETLK, (struct flock *)INVAL_FLAG); in main() 106 retval = fcntl(fd, F_GETLK, (struct flock *)INVAL_FLAG); in main()
|
/third_party/rust/crates/rustix/tests/fs/ |
H A D | flock.rs | 4 use rustix::fs::{cwd, flock, openat, FlockOperation, Mode, OFlags}; in test_flock() 7 flock(&f, FlockOperation::LockExclusive).unwrap(); in test_flock() 8 flock(&f, FlockOperation::Unlock).unwrap(); in test_flock() 10 flock(&g, FlockOperation::LockExclusive).unwrap(); in test_flock() 11 flock(&g, FlockOperation::Unlock).unwrap(); in test_flock() 16 flock(&f, FlockOperation::LockShared).unwrap(); in test_flock() 18 flock(&g, FlockOperation::LockShared).unwrap(); in test_flock() 19 flock(&f, FlockOperation::Unlock).unwrap(); in test_flock() 20 flock(&g, FlockOperation::Unlock).unwrap(); in test_flock() 25 flock( in test_flock() [all...] |
/third_party/musl/libc-test/src/functionalext/supplement/linux/ |
H A D | flock.c | 32 result = flock(fd, LOCK_SH); in flock_0100() 50 result = flock(fd, LOCK_SH | LOCK_NB); in flock_0200() 68 result = flock(fd, LOCK_EX); in flock_0300() 86 result = flock(fd, LOCK_EX | LOCK_NB); in flock_0400() 104 result = flock(fd, LOCK_UN); in flock_0500() 117 int result = flock(-1, LOCK_EX); in flock_0600() 133 result = flock(fd, 0); in flock_0700()
|
/third_party/rust/crates/nix/test/ |
H A D | test_fcntl.rs | 395 let mut flock: libc::flock = unsafe { in test_ofd_write_lock() variables 398 flock.l_type = libc::F_WRLCK as libc::c_short; in test_ofd_write_lock() 399 flock.l_whence = libc::SEEK_SET as libc::c_short; in test_ofd_write_lock() 400 flock.l_start = 0; in test_ofd_write_lock() 401 flock.l_len = 0; in test_ofd_write_lock() 402 flock.l_pid = 0; in test_ofd_write_lock() 403 fcntl(fd, FcntlArg::F_OFD_SETLKW(&flock)).expect("write lock failed"); in test_ofd_write_lock() 409 flock.l_type = libc::F_UNLCK as libc::c_short; in test_ofd_write_lock() 410 fcntl(fd, FcntlArg::F_OFD_SETLKW(&flock)) in test_ofd_write_lock() 433 let mut flock: libc::flock = unsafe { test_ofd_read_lock() variables [all...] |
/third_party/ltp/testcases/kernel/syscalls/flock/ |
H A D | flock06.c | 6 * This test verifies that flock locks held on one fd conflict with flock 11 * an exclusive flock on the first descriptor, checks that attempting to 12 * acquire an flock on the second descriptor fails. Then it removes the 27 TEST(flock(fd1, LOCK_EX | LOCK_NB)); in verify_flock() 29 tst_res(TFAIL | TTERRNO, "First attempt to flock() failed"); in verify_flock() 31 tst_res(TPASS, "First attempt to flock() passed"); in verify_flock() 34 TEST(flock(fd2, LOCK_EX | LOCK_NB)); in verify_flock() 36 tst_res(TPASS | TTERRNO, "Second attempt to flock() denied"); in verify_flock() 38 tst_res(TFAIL, "Second attempt to flock() succeede in verify_flock() [all...] |
H A D | flock03.c | 7 * This test verifies that flock() cannot unlock a file locked by another 30 if (flock(fd2, LOCK_EX | LOCK_NB) != -1) in childfunc() 33 TEST(flock(fd, LOCK_UN)); in childfunc() 42 TEST(flock(fd2, LOCK_EX | LOCK_NB)); in childfunc() 68 TEST(flock(fd1, LOCK_EX | LOCK_NB)); in verify_flock() 71 "Parent: Initial attempt to flock() failed"); in verify_flock() 74 "Parent: Initial attempt to flock() passed"); in verify_flock()
|
/third_party/python/Lib/test/ |
H A D | test_fcntl.py | 148 fcntl.flock(fileno, fcntl.LOCK_SH) 149 fcntl.flock(fileno, fcntl.LOCK_UN) 150 fcntl.flock(self.f, fcntl.LOCK_SH | fcntl.LOCK_NB) 151 fcntl.flock(self.f, fcntl.LOCK_UN) 152 fcntl.flock(fileno, fcntl.LOCK_EX) 153 fcntl.flock(fileno, fcntl.LOCK_UN) 155 self.assertRaises(ValueError, fcntl.flock, -1, fcntl.LOCK_SH) 156 self.assertRaises(TypeError, fcntl.flock, 'spam', fcntl.LOCK_SH) 183 self.assertRaises(OverflowError, fcntl.flock, _testcapi.INT_MAX+1,
|
/third_party/musl/porting/linux/user/src/linux/aarch64/ |
H A D | flock.s | 4 .global flock 5 .type flock,%function 6 flock: label
|
/third_party/musl/src/linux/aarch64/linux/ |
H A D | flock.s | 4 .global flock 5 .type flock,%function 6 flock: label
|
/third_party/musl/porting/linux/user/src/linux/x86_64/ |
H A D | flock.s | 2 .global flock 3 .type flock,@function 4 flock: label
|
/third_party/musl/src/linux/x86_64/linux/ |
H A D | flock.s | 2 .global flock 3 .type flock,@function 4 flock: label
|
/third_party/musl/porting/linux/user/src/linux/arm/ |
H A D | flock.s | 4 .global flock 5 .type flock,%function 6 flock: label
|
/third_party/musl/src/linux/arm/linux/ |
H A D | flock.s | 4 .global flock 5 .type flock,%function 6 flock: label
|
/third_party/ltp/testcases/kernel/fs/doio/ |
H A D | file_lock.c | 64 struct flock flocks; in file_lock() 66 memset(&flocks, 0, sizeof(struct flock)); in file_lock() 136 struct flock flocks; in record_lock() 138 memset(&flocks, 0, sizeof(struct flock)); in record_lock()
|
/third_party/ltp/testcases/network/nfsv4/locks/ |
H A D | locktests.c | 148 struct flock request; in validationResults() 263 void lockWholeFile(struct flock *request) in lockWholeFile() 383 void serializeFLock(struct flock *request) in serializeFLock() 407 void unSerializeFLock(struct flock *request) in unSerializeFLock() 417 int serverSendLockClient(struct flock *request, int client) in serverSendLockClient() 423 int serverSendLockLocal(struct flock *request, int slave) in serverSendLockLocal() 429 int getLockSection(struct flock *request) in getLockSection() 496 struct flock lock; in masterClient() 582 struct flock request; in master() 753 struct flock reques in slave() [all...] |
/third_party/musl/src/linux/ |
H A D | flock.c | 7 int flock(int fd, int op) in __flock() 14 weak_alias(__flock, flock);
|
/third_party/ltp/testcases/network/nfs/nfslock01/ |
H A D | nfs_flock_func.c | 14 struct flock lock; in lock_reg() 26 struct flock lock; in lock_test()
|