Lines Matching defs:lock
192 tst_resm(TINFO, "child 1 lock err %d", err);
224 tst_resm(TINFO, "child 2 lock err %d", err);
262 tst_resm(TINFO, "child 3 lock err %d", err);
285 int do_test(struct flock *lock, pid_t pid)
289 fl.l_type = /* lock->l_type */ F_RDLCK;
290 fl.l_whence = lock->l_whence;
291 fl.l_start = lock->l_start;
292 fl.l_len = lock->l_len;
299 if (fl.l_type != lock->l_type) {
300 tst_resm(TFAIL, "lock type is wrong should be %s is %s",
301 str_type(lock->l_type), str_type(fl.l_type));
305 if (fl.l_whence != lock->l_whence) {
306 tst_resm(TFAIL, "lock whence is wrong should be %d is %d",
307 lock->l_whence, fl.l_whence);
311 if (fl.l_start != lock->l_start) {
314 (int64_t) lock->l_start, (int64_t) fl.l_start);
318 if (fl.l_len != lock->l_len) {
321 PRId64, (int64_t) lock->l_len, (int64_t) fl.l_len);
536 * child 1 puts first lock (bytes 2-7)
540 tst_resm(TFAIL, "didn't set first child's lock, "
549 * child 2 puts second lock (bytes 9-14)
553 tst_resm(TINFO, "didn't set second child's lock, "
563 * child 3 puts third lock (bytes 17-22)
567 tst_resm(TFAIL, "didn't set third child's lock, "
577 * child 2 tries to lock same range as
578 * child 3's first lock.
583 * child 3 tries to lock same range as
589 * Tell child 1 to release its lock. This should cause a
602 * second lock EDEADLOCK
611 * Double check that lock 2 and lock 3 are still right