Lines Matching refs:flock
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));
29 tst_res(TFAIL | TTERRNO, "First attempt to flock() failed");
31 tst_res(TPASS, "First attempt to flock() passed");
34 TEST(flock(fd2, LOCK_EX | LOCK_NB));
36 tst_res(TPASS | TTERRNO, "Second attempt to flock() denied");
38 tst_res(TFAIL, "Second attempt to flock() succeeded!");
40 TEST(flock(fd1, LOCK_UN));
46 TEST(flock(fd2, LOCK_EX | LOCK_NB));
48 tst_res(TFAIL | TTERRNO, "Third attempt to flock() denied!");
50 tst_res(TPASS, "Third attempt to flock() succeeded");