Lines Matching refs:fl

187 	struct flock fl;  in test2()  local
194 fl.l_start = 0; in test2()
195 fl.l_len = 0; in test2()
196 fl.l_type = F_WRLCK; in test2()
197 fl.l_whence = SEEK_SET; in test2()
209 if (fcntl(fd, F_SETLK, &fl) < 0) in test2()
229 res = fcntl(fd, F_SETLK, &fl); in test2()
258 struct flock fl; in test3() local
265 fl.l_start = 0; in test3()
266 fl.l_len = 0; in test3()
267 fl.l_type = F_WRLCK; in test3()
268 fl.l_whence = SEEK_SET; in test3()
280 if (fcntl(fd, F_SETLK, &fl) < 0) in test3()
303 res = fcntl(fd, F_SETLKW, &fl); in test3()
328 struct flock fl; in test4() local
334 fl.l_start = 0; in test4()
335 fl.l_len = 99; in test4()
336 fl.l_type = F_WRLCK; in test4()
337 fl.l_whence = SEEK_SET; in test4()
349 if (fcntl(fd, F_SETLK, &fl) < 0) in test4()
368 if (fcntl(fd, F_GETLK, &fl) < 0) in test4()
372 FAIL(fl.l_start != 0); in test4()
373 FAIL(fl.l_len != 99); in test4()
374 FAIL(fl.l_type != F_WRLCK); in test4()
375 FAIL(fl.l_pid != pid); in test4()
377 FAIL(fl.l_sysid != 0); in test4()
414 struct flock fl; in test5() local
420 fl.l_start = 0; in test5()
421 fl.l_len = 1; in test5()
422 fl.l_type = F_WRLCK; in test5()
423 fl.l_whence = SEEK_SET; in test5()
424 if (fcntl(fd, F_SETLK, &fl) < 0) in test5()
436 fl.l_start = 1; in test5()
437 if (fcntl(fd, F_SETLK, &fl) < 0) in test5()
439 fl.l_start = 0; in test5()
440 if (fcntl(fd, F_SETLKW, &fl) < 0) in test5()
459 fl.l_start = 1; in test5()
460 res = fcntl(fd, F_SETLKW, &fl); in test5()
467 fl.l_start = 0; in test5()
468 fl.l_len = 0; in test5()
469 fl.l_type = F_UNLCK; in test5()
470 if (fcntl(fd, F_SETLK, &fl) < 0) in test5()
500 struct flock fl; in test6() local
506 fl.l_start = 0; in test6()
507 fl.l_len = 1; in test6()
508 fl.l_type = F_WRLCK; in test6()
509 fl.l_whence = SEEK_SET; in test6()
510 if (fcntl(fd, F_SETLK, &fl) < 0) in test6()
522 fl.l_start = 1; in test6()
523 if (fcntl(fd, F_SETLK, &fl) < 0) in test6()
539 fl.l_start = 2; in test6()
540 if (fcntl(fd, F_SETLK, &fl) < 0) in test6()
542 fl.l_start = 0; in test6()
543 if (fcntl(fd, F_SETLKW, &fl) < 0) in test6()
562 fl.l_start = 1; in test6()
563 fl.l_len = 2; in test6()
564 res = fcntl(fd, F_SETLKW, &fl); in test6()
570 fl.l_start = 0; in test6()
571 fl.l_len = 0; in test6()
572 fl.l_type = F_UNLCK; in test6()
573 if (fcntl(fd, F_SETLK, &fl) < 0) in test6()
602 struct flock fl; in test7() local
609 fl.l_start = 0; in test7()
610 fl.l_len = 0; in test7()
611 fl.l_type = F_WRLCK; in test7()
612 fl.l_whence = SEEK_SET; in test7()
624 if (fcntl(fd, F_SETLK, &fl) < 0) in test7()
645 fl.l_type = F_RDLCK; in test7()
646 res = fcntl(fd, F_SETLK, &fl); in test7()
674 struct flock fl; in test8() local
681 fl.l_start = 0; in test8()
682 fl.l_len = 0; in test8()
683 fl.l_type = F_RDLCK; in test8()
684 fl.l_whence = SEEK_SET; in test8()
696 if (fcntl(fd, F_SETLK, &fl) < 0) in test8()
717 fl.l_type = F_RDLCK; in test8()
718 res = fcntl(fd, F_SETLK, &fl); in test8()
725 fl.l_start = 0; in test8()
726 fl.l_len = 0; in test8()
727 fl.l_type = F_UNLCK; in test8()
728 if (fcntl(fd, F_SETLK, &fl) < 0) in test8()
751 struct flock fl; in test9() local
758 fl.l_start = 0; in test9()
759 fl.l_len = 0; in test9()
760 fl.l_type = F_RDLCK; in test9()
761 fl.l_whence = SEEK_SET; in test9()
773 if (fcntl(fd, F_SETLK, &fl) < 0) in test9()
794 fl.l_type = F_WRLCK; in test9()
795 res = fcntl(fd, F_SETLK, &fl); in test9()
823 struct flock fl; in test10() local
829 fl.l_start = 0; in test10()
830 fl.l_len = 0; in test10()
831 fl.l_type = F_WRLCK; in test10()
832 fl.l_whence = SEEK_SET; in test10()
833 fl.l_pid = 9999; in test10()
835 fl.l_sysid = 9999; in test10()
848 if (fcntl(fd, F_SETLK, &fl) < 0) in test10()
865 if (fcntl(fd, F_GETLK, &fl) < 0) in test10()
873 FAIL(fl.l_pid != pid); in test10()
875 FAIL(fl.l_sysid != 0); in test10()
891 struct flock fl; in test11() local
897 fl.l_start = 0; in test11()
898 fl.l_len = 0; in test11()
899 fl.l_type = F_WRLCK; in test11()
900 fl.l_whence = SEEK_SET; in test11()
901 fl.l_pid = 9999; in test11()
902 fl.l_sysid = 1001; in test11()
906 res = fcntl(fd, F_SETLK_REMOTE, &fl); in test11()
909 fl.l_sysid = 1002; in test11()
910 res = fcntl(fd, F_SETLK_REMOTE, &fl); in test11()
914 res = fcntl(fd, F_GETLK, &fl); in test11()
916 FAIL(fl.l_pid != 9999); in test11()
917 FAIL(fl.l_sysid != 1001); in test11()
919 fl.l_type = F_UNLCK; in test11()
920 fl.l_sysid = 1001; in test11()
921 fl.l_start = 0; in test11()
922 fl.l_len = 0; in test11()
923 res = fcntl(fd, F_SETLK_REMOTE, &fl); in test11()
926 fl.l_pid = 1234; in test11()
927 fl.l_sysid = 1001; in test11()
928 fl.l_start = 0; in test11()
929 fl.l_len = 1; in test11()
930 fl.l_whence = SEEK_SET; in test11()
931 fl.l_type = F_RDLCK; in test11()
932 res = fcntl(fd, F_SETLK_REMOTE, &fl); in test11()
935 fl.l_sysid = 1002; in test11()
936 res = fcntl(fd, F_SETLK_REMOTE, &fl); in test11()
939 fl.l_type = F_UNLCKSYS; in test11()
940 fl.l_sysid = 1001; in test11()
941 res = fcntl(fd, F_SETLK_REMOTE, &fl); in test11()
944 fl.l_type = F_WRLCK; in test11()
945 res = fcntl(fd, F_GETLK, &fl); in test11()
947 FAIL(fl.l_pid != 1234); in test11()
948 FAIL(fl.l_sysid != 1002); in test11()
950 fl.l_type = F_UNLCKSYS; in test11()
951 fl.l_sysid = 1002; in test11()
952 res = fcntl(fd, F_SETLK_REMOTE, &fl); in test11()
976 struct flock fl; in test12() local
983 fl.l_start = 0; in test12()
984 fl.l_len = 0; in test12()
985 fl.l_type = F_WRLCK; in test12()
986 fl.l_whence = SEEK_SET; in test12()
998 if (fcntl(fd, F_SETLK, &fl) < 0) in test12()
1022 res = fcntl(fd, F_SETLKW, &fl); in test12()
1029 fl.l_start = 0; in test12()
1030 fl.l_len = 0; in test12()
1031 fl.l_type = F_UNLCK; in test12()
1032 if (fcntl(fd, F_SETLK, &fl) < 0) in test12()
1054 struct flock fl; in test13() local
1066 fl.l_start = 0; in test13()
1067 fl.l_len = 0; in test13()
1068 fl.l_type = F_WRLCK; in test13()
1069 fl.l_whence = SEEK_SET; in test13()
1081 if (fcntl(fd, F_SETLK, &fl) < 0) in test13()
1110 res = fcntl(fd, F_SETLKW, &fl); in test13()
1117 fl.l_start = 0; in test13()
1118 fl.l_len = 0; in test13()
1119 fl.l_type = F_UNLCK; in test13()
1120 if (fcntl(fd, F_SETLK, &fl) < 0) in test13()
1143 struct flock fl; in test14() local
1189 fl.l_start = start; in test14()
1190 fl.l_len = len; in test14()
1191 fl.l_whence = SEEK_SET; in test14()
1193 fl.l_type = wrlock ? F_WRLCK : F_RDLCK; in test14()
1195 fl.l_type = F_UNLCK; in test14()
1203 if (fcntl(fd, F_SETLKW, &fl) < 0) { in test14()
1341 struct flock fl; in test15() local
1358 fl.l_start = 0; in test15()
1359 fl.l_len = 0; in test15()
1360 fl.l_type = F_RDLCK; in test15()
1361 fl.l_whence = SEEK_SET; in test15()
1362 if (fcntl(fd, F_SETLK, &fl) < 0) in test15()
1396 fl.l_start = 0; in test15()
1397 fl.l_len = 0; in test15()
1398 fl.l_type = F_WRLCK; in test15()
1399 fl.l_whence = SEEK_SET; in test15()
1400 res = fcntl(fd, F_GETLK, &fl); in test15()
1405 FAIL(fl.l_type != F_UNLCK); in test15()