Home | History | Annotate | Download | only in flock

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
100 TEST(flock(fd1, LOCK_EX | LOCK_NB));
103 "First attempt to flock() failed");
105 tst_resm(TPASS, "First attempt to flock() passed");
112 TEST(flock(fd2, LOCK_EX | LOCK_NB));
114 tst_resm(TPASS, "Second attempt to flock() denied");
116 tst_resm(TFAIL, "Second attempt to flock() succeeded!");
118 TEST(flock(fd1, LOCK_UN));
124 TEST(flock(fd2, LOCK_EX | LOCK_NB));
126 tst_resm(TFAIL, "Third attempt to flock() denied!");
128 tst_resm(TPASS, "Third attempt to flock() succeeded");