Lines Matching refs:fl

189 	struct flock fl;  in test2()  local
196 fl.l_start = 0; in test2()
197 fl.l_len = 0; in test2()
198 fl.l_type = F_WRLCK; in test2()
199 fl.l_whence = SEEK_SET; in test2()
211 if (fcntl(fd, F_SETLK, &fl) < 0) in test2()
231 res = fcntl(fd, F_SETLK, &fl); in test2()
260 struct flock fl; in test3() local
267 fl.l_start = 0; in test3()
268 fl.l_len = 0; in test3()
269 fl.l_type = F_WRLCK; in test3()
270 fl.l_whence = SEEK_SET; in test3()
282 if (fcntl(fd, F_SETLK, &fl) < 0) in test3()
305 res = fcntl(fd, F_SETLKW, &fl); in test3()
330 struct flock fl; in test4() local
336 fl.l_start = 0; in test4()
337 fl.l_len = 99; in test4()
338 fl.l_type = F_WRLCK; in test4()
339 fl.l_whence = SEEK_SET; in test4()
351 if (fcntl(fd, F_SETLK, &fl) < 0) in test4()
370 if (fcntl(fd, F_GETLK, &fl) < 0) in test4()
374 FAIL(fl.l_start != 0); in test4()
375 FAIL(fl.l_len != 99); in test4()
376 FAIL(fl.l_type != F_WRLCK); in test4()
377 FAIL(fl.l_pid != pid); in test4()
379 FAIL(fl.l_sysid != 0); in test4()
416 struct flock fl; in test5() local
422 fl.l_start = 0; in test5()
423 fl.l_len = 1; in test5()
424 fl.l_type = F_WRLCK; in test5()
425 fl.l_whence = SEEK_SET; in test5()
426 if (fcntl(fd, F_SETLK, &fl) < 0) in test5()
438 fl.l_start = 1; in test5()
439 if (fcntl(fd, F_SETLK, &fl) < 0) in test5()
441 fl.l_start = 0; in test5()
442 if (fcntl(fd, F_SETLKW, &fl) < 0) in test5()
461 fl.l_start = 1; in test5()
462 res = fcntl(fd, F_SETLKW, &fl); in test5()
469 fl.l_start = 0; in test5()
470 fl.l_len = 0; in test5()
471 fl.l_type = F_UNLCK; in test5()
472 if (fcntl(fd, F_SETLK, &fl) < 0) in test5()
502 struct flock fl; in test6() local
508 fl.l_start = 0; in test6()
509 fl.l_len = 1; in test6()
510 fl.l_type = F_WRLCK; in test6()
511 fl.l_whence = SEEK_SET; in test6()
512 if (fcntl(fd, F_SETLK, &fl) < 0) in test6()
524 fl.l_start = 1; in test6()
525 if (fcntl(fd, F_SETLK, &fl) < 0) in test6()
541 fl.l_start = 2; in test6()
542 if (fcntl(fd, F_SETLK, &fl) < 0) in test6()
544 fl.l_start = 0; in test6()
545 if (fcntl(fd, F_SETLKW, &fl) < 0) in test6()
564 fl.l_start = 1; in test6()
565 fl.l_len = 2; in test6()
566 res = fcntl(fd, F_SETLKW, &fl); in test6()
572 fl.l_start = 0; in test6()
573 fl.l_len = 0; in test6()
574 fl.l_type = F_UNLCK; in test6()
575 if (fcntl(fd, F_SETLK, &fl) < 0) in test6()
604 struct flock fl; in test7() local
611 fl.l_start = 0; in test7()
612 fl.l_len = 0; in test7()
613 fl.l_type = F_WRLCK; in test7()
614 fl.l_whence = SEEK_SET; in test7()
626 if (fcntl(fd, F_SETLK, &fl) < 0) in test7()
647 fl.l_type = F_RDLCK; in test7()
648 res = fcntl(fd, F_SETLK, &fl); in test7()
676 struct flock fl; in test8() local
683 fl.l_start = 0; in test8()
684 fl.l_len = 0; in test8()
685 fl.l_type = F_RDLCK; in test8()
686 fl.l_whence = SEEK_SET; in test8()
698 if (fcntl(fd, F_SETLK, &fl) < 0) in test8()
719 fl.l_type = F_RDLCK; in test8()
720 res = fcntl(fd, F_SETLK, &fl); in test8()
727 fl.l_start = 0; in test8()
728 fl.l_len = 0; in test8()
729 fl.l_type = F_UNLCK; in test8()
730 if (fcntl(fd, F_SETLK, &fl) < 0) in test8()
753 struct flock fl; in test9() local
760 fl.l_start = 0; in test9()
761 fl.l_len = 0; in test9()
762 fl.l_type = F_RDLCK; in test9()
763 fl.l_whence = SEEK_SET; in test9()
775 if (fcntl(fd, F_SETLK, &fl) < 0) in test9()
796 fl.l_type = F_WRLCK; in test9()
797 res = fcntl(fd, F_SETLK, &fl); in test9()
825 struct flock fl; in test10() local
831 fl.l_start = 0; in test10()
832 fl.l_len = 0; in test10()
833 fl.l_type = F_WRLCK; in test10()
834 fl.l_whence = SEEK_SET; in test10()
835 fl.l_pid = 9999; in test10()
837 fl.l_sysid = 9999; in test10()
850 if (fcntl(fd, F_SETLK, &fl) < 0) in test10()
867 if (fcntl(fd, F_GETLK, &fl) < 0) in test10()
875 FAIL(fl.l_pid != pid); in test10()
877 FAIL(fl.l_sysid != 0); in test10()
893 struct flock fl; in test11() local
899 fl.l_start = 0; in test11()
900 fl.l_len = 0; in test11()
901 fl.l_type = F_WRLCK; in test11()
902 fl.l_whence = SEEK_SET; in test11()
903 fl.l_pid = 9999; in test11()
904 fl.l_sysid = 1001; in test11()
908 res = fcntl(fd, F_SETLK_REMOTE, &fl); in test11()
911 fl.l_sysid = 1002; in test11()
912 res = fcntl(fd, F_SETLK_REMOTE, &fl); in test11()
916 res = fcntl(fd, F_GETLK, &fl); in test11()
918 FAIL(fl.l_pid != 9999); in test11()
919 FAIL(fl.l_sysid != 1001); in test11()
921 fl.l_type = F_UNLCK; in test11()
922 fl.l_sysid = 1001; in test11()
923 fl.l_start = 0; in test11()
924 fl.l_len = 0; in test11()
925 res = fcntl(fd, F_SETLK_REMOTE, &fl); in test11()
928 fl.l_pid = 1234; in test11()
929 fl.l_sysid = 1001; in test11()
930 fl.l_start = 0; in test11()
931 fl.l_len = 1; in test11()
932 fl.l_whence = SEEK_SET; in test11()
933 fl.l_type = F_RDLCK; in test11()
934 res = fcntl(fd, F_SETLK_REMOTE, &fl); in test11()
937 fl.l_sysid = 1002; in test11()
938 res = fcntl(fd, F_SETLK_REMOTE, &fl); in test11()
941 fl.l_type = F_UNLCKSYS; in test11()
942 fl.l_sysid = 1001; in test11()
943 res = fcntl(fd, F_SETLK_REMOTE, &fl); in test11()
946 fl.l_type = F_WRLCK; in test11()
947 res = fcntl(fd, F_GETLK, &fl); in test11()
949 FAIL(fl.l_pid != 1234); in test11()
950 FAIL(fl.l_sysid != 1002); in test11()
952 fl.l_type = F_UNLCKSYS; in test11()
953 fl.l_sysid = 1002; in test11()
954 res = fcntl(fd, F_SETLK_REMOTE, &fl); in test11()
978 struct flock fl; in test12() local
985 fl.l_start = 0; in test12()
986 fl.l_len = 0; in test12()
987 fl.l_type = F_WRLCK; in test12()
988 fl.l_whence = SEEK_SET; in test12()
1000 if (fcntl(fd, F_SETLK, &fl) < 0) in test12()
1024 res = fcntl(fd, F_SETLKW, &fl); in test12()
1031 fl.l_start = 0; in test12()
1032 fl.l_len = 0; in test12()
1033 fl.l_type = F_UNLCK; in test12()
1034 if (fcntl(fd, F_SETLK, &fl) < 0) in test12()
1056 struct flock fl; in test13() local
1068 fl.l_start = 0; in test13()
1069 fl.l_len = 0; in test13()
1070 fl.l_type = F_WRLCK; in test13()
1071 fl.l_whence = SEEK_SET; in test13()
1083 if (fcntl(fd, F_SETLK, &fl) < 0) in test13()
1112 res = fcntl(fd, F_SETLKW, &fl); in test13()
1119 fl.l_start = 0; in test13()
1120 fl.l_len = 0; in test13()
1121 fl.l_type = F_UNLCK; in test13()
1122 if (fcntl(fd, F_SETLK, &fl) < 0) in test13()
1145 struct flock fl; in test14() local
1191 fl.l_start = start; in test14()
1192 fl.l_len = len; in test14()
1193 fl.l_whence = SEEK_SET; in test14()
1195 fl.l_type = wrlock ? F_WRLCK : F_RDLCK; in test14()
1197 fl.l_type = F_UNLCK; in test14()
1205 if (fcntl(fd, F_SETLKW, &fl) < 0) { in test14()
1343 struct flock fl; in test15() local
1360 fl.l_start = 0; in test15()
1361 fl.l_len = 0; in test15()
1362 fl.l_type = F_RDLCK; in test15()
1363 fl.l_whence = SEEK_SET; in test15()
1364 if (fcntl(fd, F_SETLK, &fl) < 0) in test15()
1398 fl.l_start = 0; in test15()
1399 fl.l_len = 0; in test15()
1400 fl.l_type = F_WRLCK; in test15()
1401 fl.l_whence = SEEK_SET; in test15()
1402 res = fcntl(fd, F_GETLK, &fl); in test15()
1407 FAIL(fl.l_type != F_UNLCK); in test15()