Lines Matching refs:flock
26 * TEST TITLE : Error condition test for flock(2)
37 * This test verifies that flock locks held on one fd conflict with
38 * flock locks held on a different fd.
42 * It acquires an exclusive flock on the first descriptor,
43 * checks that attempting to acquire an flock on the second
99 TEST(flock(fd1, LOCK_EX | LOCK_NB));
102 "First attempt to flock() failed");
104 tst_resm(TPASS, "First attempt to flock() passed");
111 TEST(flock(fd2, LOCK_EX | LOCK_NB));
113 tst_resm(TPASS, "Second attempt to flock() denied");
115 tst_resm(TFAIL, "Second attempt to flock() succeeded!");
117 TEST(flock(fd1, LOCK_UN));
123 TEST(flock(fd2, LOCK_EX | LOCK_NB));
125 tst_resm(TFAIL, "Third attempt to flock() denied!");
127 tst_resm(TPASS, "Third attempt to flock() succeeded");