Lines Matching refs:fl
113 struct flock fl; in test2() local
120 fl.l_start = 0; in test2()
121 fl.l_len = 0; in test2()
122 fl.l_type = F_WRLCK; in test2()
123 fl.l_whence = SEEK_SET; in test2()
135 if (fcntl(fd, F_SETLK, &fl) < 0) in test2()
155 res = fcntl(fd, F_SETLK, &fl); in test2()
184 struct flock fl; in test3() local
191 fl.l_start = 0; in test3()
192 fl.l_len = 0; in test3()
193 fl.l_type = F_WRLCK; in test3()
194 fl.l_whence = SEEK_SET; in test3()
206 if (fcntl(fd, F_SETLK, &fl) < 0) in test3()
229 res = fcntl(fd, F_SETLKW, &fl); in test3()
254 struct flock fl; in test4() local
260 fl.l_start = 0; in test4()
261 fl.l_len = 99; in test4()
262 fl.l_type = F_WRLCK; in test4()
263 fl.l_whence = SEEK_SET; in test4()
275 if (fcntl(fd, F_SETLK, &fl) < 0) in test4()
294 if (fcntl(fd, F_GETLK, &fl) < 0) in test4()
298 FAIL(fl.l_start != 0); in test4()
299 FAIL(fl.l_len != 99); in test4()
300 FAIL(fl.l_type != F_WRLCK); in test4()
301 FAIL(fl.l_pid != pid); in test4()
337 struct flock fl; in test5() local
343 fl.l_start = 0; in test5()
344 fl.l_len = 1; in test5()
345 fl.l_type = F_WRLCK; in test5()
346 fl.l_whence = SEEK_SET; in test5()
347 if (fcntl(fd, F_SETLK, &fl) < 0) in test5()
359 fl.l_start = 1; in test5()
360 if (fcntl(fd, F_SETLK, &fl) < 0) in test5()
362 fl.l_start = 0; in test5()
363 if (fcntl(fd, F_SETLKW, &fl) < 0) in test5()
382 fl.l_start = 1; in test5()
383 res = fcntl(fd, F_SETLKW, &fl); in test5()
390 fl.l_start = 0; in test5()
391 fl.l_len = 0; in test5()
392 fl.l_type = F_UNLCK; in test5()
393 if (fcntl(fd, F_SETLK, &fl) < 0) in test5()
423 struct flock fl; in test6() local
429 fl.l_start = 0; in test6()
430 fl.l_len = 1; in test6()
431 fl.l_type = F_WRLCK; in test6()
432 fl.l_whence = SEEK_SET; in test6()
433 if (fcntl(fd, F_SETLK, &fl) < 0) in test6()
445 fl.l_start = 1; in test6()
446 if (fcntl(fd, F_SETLK, &fl) < 0) in test6()
462 fl.l_start = 2; in test6()
463 if (fcntl(fd, F_SETLK, &fl) < 0) in test6()
465 fl.l_start = 0; in test6()
466 if (fcntl(fd, F_SETLKW, &fl) < 0) in test6()
485 fl.l_start = 1; in test6()
486 fl.l_len = 2; in test6()
487 res = fcntl(fd, F_SETLKW, &fl); in test6()
493 fl.l_start = 0; in test6()
494 fl.l_len = 0; in test6()
495 fl.l_type = F_UNLCK; in test6()
496 if (fcntl(fd, F_SETLK, &fl) < 0) in test6()
525 struct flock fl; in test7() local
532 fl.l_start = 0; in test7()
533 fl.l_len = 0; in test7()
534 fl.l_type = F_WRLCK; in test7()
535 fl.l_whence = SEEK_SET; in test7()
547 if (fcntl(fd, F_SETLK, &fl) < 0) in test7()
568 fl.l_type = F_RDLCK; in test7()
569 res = fcntl(fd, F_SETLK, &fl); in test7()
597 struct flock fl; in test8() local
604 fl.l_start = 0; in test8()
605 fl.l_len = 0; in test8()
606 fl.l_type = F_RDLCK; in test8()
607 fl.l_whence = SEEK_SET; in test8()
619 if (fcntl(fd, F_SETLK, &fl) < 0) in test8()
640 fl.l_type = F_RDLCK; in test8()
641 res = fcntl(fd, F_SETLK, &fl); in test8()
648 fl.l_start = 0; in test8()
649 fl.l_len = 0; in test8()
650 fl.l_type = F_UNLCK; in test8()
651 if (fcntl(fd, F_SETLK, &fl) < 0) in test8()
674 struct flock fl; in test9() local
681 fl.l_start = 0; in test9()
682 fl.l_len = 0; in test9()
683 fl.l_type = F_RDLCK; in test9()
684 fl.l_whence = SEEK_SET; in test9()
696 if (fcntl(fd, F_SETLK, &fl) < 0) in test9()
717 fl.l_type = F_WRLCK; in test9()
718 res = fcntl(fd, F_SETLK, &fl); in test9()
746 struct flock fl; in test10() local
752 fl.l_start = 0; in test10()
753 fl.l_len = 0; in test10()
754 fl.l_type = F_WRLCK; in test10()
755 fl.l_whence = SEEK_SET; in test10()
756 fl.l_pid = 9999; in test10()
768 if (fcntl(fd, F_SETLK, &fl) < 0) in test10()
785 if (fcntl(fd, F_GETLK, &fl) < 0) in test10()
793 FAIL(fl.l_pid != pid); in test10()
808 struct flock fl; in test11() local
814 fl.l_start = 0; in test11()
815 fl.l_len = 0; in test11()
816 fl.l_type = F_WRLCK; in test11()
817 fl.l_whence = SEEK_SET; in test11()
818 fl.l_pid = 9999; in test11()
819 fl.l_sysid = 1001; in test11()
823 res = fcntl(fd, F_SETLK_REMOTE, &fl); in test11()
826 fl.l_sysid = 1002; in test11()
827 res = fcntl(fd, F_SETLK_REMOTE, &fl); in test11()
831 res = fcntl(fd, F_GETLK, &fl); in test11()
833 FAIL(fl.l_pid != 9999); in test11()
834 FAIL(fl.l_sysid != 1001); in test11()
836 fl.l_type = F_UNLCK; in test11()
837 fl.l_sysid = 1001; in test11()
838 fl.l_start = 0; in test11()
839 fl.l_len = 0; in test11()
840 res = fcntl(fd, F_SETLK_REMOTE, &fl); in test11()
843 fl.l_pid = 1234; in test11()
844 fl.l_sysid = 1001; in test11()
845 fl.l_start = 0; in test11()
846 fl.l_len = 1; in test11()
847 fl.l_whence = SEEK_SET; in test11()
848 fl.l_type = F_RDLCK; in test11()
849 res = fcntl(fd, F_SETLK_REMOTE, &fl); in test11()
852 fl.l_sysid = 1002; in test11()
853 res = fcntl(fd, F_SETLK_REMOTE, &fl); in test11()
856 fl.l_type = F_UNLCKSYS; in test11()
857 fl.l_sysid = 1001; in test11()
858 res = fcntl(fd, F_SETLK_REMOTE, &fl); in test11()
861 fl.l_type = F_WRLCK; in test11()
862 res = fcntl(fd, F_GETLK, &fl); in test11()
864 FAIL(fl.l_pid != 1234); in test11()
865 FAIL(fl.l_sysid != 1002); in test11()
867 fl.l_type = F_UNLCKSYS; in test11()
868 fl.l_sysid = 1002; in test11()
869 res = fcntl(fd, F_SETLK_REMOTE, &fl); in test11()
893 struct flock fl; in test12() local
900 fl.l_start = 0; in test12()
901 fl.l_len = 0; in test12()
902 fl.l_type = F_WRLCK; in test12()
903 fl.l_whence = SEEK_SET; in test12()
915 if (fcntl(fd, F_SETLK, &fl) < 0) in test12()
939 res = fcntl(fd, F_SETLKW, &fl); in test12()
946 fl.l_start = 0; in test12()
947 fl.l_len = 0; in test12()
948 fl.l_type = F_UNLCK; in test12()
949 if (fcntl(fd, F_SETLK, &fl) < 0) in test12()
971 struct flock fl; in test13() local
983 fl.l_start = 0; in test13()
984 fl.l_len = 0; in test13()
985 fl.l_type = F_WRLCK; in test13()
986 fl.l_whence = SEEK_SET; in test13()
998 if (fcntl(fd, F_SETLK, &fl) < 0) in test13()
1027 res = fcntl(fd, F_SETLKW, &fl); in test13()
1034 fl.l_start = 0; in test13()
1035 fl.l_len = 0; in test13()
1036 fl.l_type = F_UNLCK; in test13()
1037 if (fcntl(fd, F_SETLK, &fl) < 0) in test13()
1060 struct flock fl; in test14() local
1101 fl.l_start = start; in test14()
1102 fl.l_len = len; in test14()
1103 fl.l_whence = SEEK_SET; in test14()
1105 fl.l_type = wrlock ? F_WRLCK : F_RDLCK; in test14()
1107 fl.l_type = F_UNLCK; in test14()
1115 if (fcntl(fd, F_SETLKW, &fl) < 0) { in test14()
1254 struct flock fl; in test15() local
1271 fl.l_start = 0; in test15()
1272 fl.l_len = 0; in test15()
1273 fl.l_type = F_RDLCK; in test15()
1274 fl.l_whence = SEEK_SET; in test15()
1275 if (fcntl(fd, F_SETLK, &fl) < 0) in test15()
1310 fl.l_start = 0; in test15()
1311 fl.l_len = 0; in test15()
1312 fl.l_type = F_WRLCK; in test15()
1313 fl.l_whence = SEEK_SET; in test15()
1314 res = fcntl(fd, F_GETLK, &fl); in test15()
1319 FAIL(fl.l_type != F_UNLCK); in test15()
1336 struct flock fl; in test16()
1339 fl.l_pid = 0; in test16()
1340 fl.l_type = 1; in test16()
1341 fl.l_whence = 0; in test16()
1343 fl.l_start = 0; in test16()
1344 fl.l_len = 0x8000000000000000; in test16()
1345 res = fcntl(fd, F_SETLK, &fl); in test16()
1348 fl.l_start = 0x10000; in test16()
1349 fl.l_len = 0; in test16()
1350 res = fcntl(fd, F_SETLK, &fl); in test16()
1353 fl.l_start = 0; in test16()
1354 fl.l_len = 0x8000000000000000; in test16()
1355 res = fcntl(fd, F_SETLK, &fl); in test16()
1358 fl.l_start = 0x10000; in test16()
1359 fl.l_len = 0; in test16()
1360 res = fcntl(fd, F_SETLK, &fl); in test16()
1375 struct flock fl; in test17() local
1383 fl.l_start = 0; in test17()
1384 fl.l_len = 100; in test17()
1385 fl.l_pid = 0; in test17()
1386 fl.l_type = F_RDLCK; in test17()
1387 fl.l_whence = 0; in test17()
1388 res = fcntl(fd, F_SETLK, &fl); in test17()
1399 fl.l_start = 100; in test17()
1400 fl.l_len = 100; in test17()
1401 fl.l_pid = 0; in test17()
1402 fl.l_type = F_RDLCK; in test17()
1403 fl.l_whence = 0; in test17()
1404 res = fcntl(fd, F_SETLK, &fl); in test17()
1407 fl.l_start = 200; in test17()
1408 fl.l_len = 100; in test17()
1409 fl.l_pid = 0; in test17()
1410 fl.l_type = F_RDLCK; in test17()
1411 fl.l_whence = 0; in test17()
1412 res = fcntl(fd, F_SETLK, &fl); in test17()
1423 fl.l_start = 300; in test17()
1424 fl.l_len = 100; in test17()
1425 fl.l_pid = 0; in test17()
1426 fl.l_type = F_RDLCK; in test17()
1427 fl.l_whence = 0; in test17()
1428 res = fcntl(fd, F_SETLK, &fl); in test17()
1431 fl.l_start = 500; in test17()
1432 fl.l_len = 100; in test17()
1433 fl.l_pid = 0; in test17()
1434 fl.l_type = F_RDLCK; in test17()
1435 fl.l_whence = 0; in test17()
1436 res = fcntl(fd, F_SETLK, &fl); in test17()
1439 fl.l_start = 400; in test17()
1440 fl.l_len = 100; in test17()
1441 fl.l_pid = 0; in test17()
1442 fl.l_type = F_RDLCK; in test17()
1443 fl.l_whence = 0; in test17()
1444 res = fcntl(fd, F_SETLK, &fl); in test17()
1461 struct flock fl; in test18() local
1464 fl.l_start = 0; in test18()
1465 fl.l_len = 100; in test18()
1466 fl.l_pid = 0; in test18()
1467 fl.l_type = F_RDLCK; in test18()
1468 fl.l_whence = 0; in test18()
1469 res = fcntl(fd, F_SETLK, &fl); in test18()
1471 res = fcntl(fd, F_SETLK, &fl); in test18()
1485 struct flock fl; in test19() local
1493 fl.l_start = 0; in test19()
1494 fl.l_len = 100; in test19()
1495 fl.l_pid = 0; in test19()
1496 fl.l_type = F_RDLCK; in test19()
1497 fl.l_whence = 0; in test19()
1498 res = fcntl(fd, F_SETLK, &fl); in test19()
1501 fl.l_start = 0; in test19()
1502 fl.l_len = 50; in test19()
1503 fl.l_pid = 0; in test19()
1504 fl.l_type = F_RDLCK; in test19()
1505 fl.l_whence = 0; in test19()
1506 res = fcntl(fd, F_SETLK, &fl); in test19()
1517 fl.l_start = 100; in test19()
1518 fl.l_len = 100; in test19()
1519 fl.l_pid = 0; in test19()
1520 fl.l_type = F_RDLCK; in test19()
1521 fl.l_whence = 0; in test19()
1522 res = fcntl(fd, F_SETLK, &fl); in test19()
1525 fl.l_start = 100; in test19()
1526 fl.l_len = 50; in test19()
1527 fl.l_pid = 0; in test19()
1528 fl.l_type = F_WRLCK; in test19()
1529 fl.l_whence = 0; in test19()
1530 res = fcntl(fd, F_SETLK, &fl); in test19()
1541 fl.l_start = 100; in test19()
1542 fl.l_len = 100; in test19()
1543 fl.l_pid = 0; in test19()
1544 fl.l_type = F_RDLCK; in test19()
1545 fl.l_whence = 0; in test19()
1546 res = fcntl(fd, F_SETLK, &fl); in test19()
1549 fl.l_start = 110; in test19()
1550 fl.l_len = 50; in test19()
1551 fl.l_pid = 0; in test19()
1552 fl.l_type = F_WRLCK; in test19()
1553 fl.l_whence = 0; in test19()
1554 res = fcntl(fd, F_SETLK, &fl); in test19()
1571 struct flock fl; in test20() local
1574 fl.l_start = 0; in test20()
1575 fl.l_len = 100; in test20()
1576 fl.l_pid = 0; in test20()
1577 fl.l_type = F_WRLCK; in test20()
1578 fl.l_whence = 0; in test20()
1579 res = fcntl(fd, F_SETLK, &fl); in test20()
1582 fl.l_start = 0; in test20()
1583 fl.l_len = 200; in test20()
1584 fl.l_pid = 0; in test20()
1585 fl.l_type = F_WRLCK; in test20()
1586 fl.l_whence = 0; in test20()
1587 res = fcntl(fd, F_SETLK, &fl); in test20()
1601 struct flock fl; in test21() local
1604 fl.l_start = 0; in test21()
1605 fl.l_len = 100; in test21()
1606 fl.l_pid = 0; in test21()
1607 fl.l_type = F_WRLCK; in test21()
1608 fl.l_whence = 0; in test21()
1609 res = fcntl(fd, F_SETLK, &fl); in test21()
1612 fl.l_start = 50; in test21()
1613 fl.l_len = 100; in test21()
1614 fl.l_pid = 0; in test21()
1615 fl.l_type = F_WRLCK; in test21()
1616 fl.l_whence = 0; in test21()
1617 res = fcntl(fd, F_SETLK, &fl); in test21()
1631 struct flock fl; in test22() local
1634 fl.l_start = 10; in test22()
1635 fl.l_len = 100; in test22()
1636 fl.l_pid = 0; in test22()
1637 fl.l_type = F_WRLCK; in test22()
1638 fl.l_whence = 0; in test22()
1639 res = fcntl(fd, F_SETLK, &fl); in test22()
1642 fl.l_start = 0; in test22()
1643 fl.l_len = 50; in test22()
1644 fl.l_pid = 0; in test22()
1645 fl.l_type = F_WRLCK; in test22()
1646 fl.l_whence = 0; in test22()
1647 res = fcntl(fd, F_SETLK, &fl); in test22()
1659 struct flock fl; in test23() local
1662 fl.l_pid = 0; in test23()
1663 fl.l_type = F_WRLCK; in test23()
1664 fl.l_whence = SEEK_SET; in test23()
1665 fl.l_start = 2; in test23()
1666 fl.l_len = LLONG_MAX; in test23()
1667 res = fcntl(fd, F_SETLK, &fl); in test23()
1680 struct flock fl; in test24() local
1684 fl.l_pid = 0; in test24()
1685 fl.l_type = F_WRLCK; in test24()
1686 fl.l_whence = SEEK_SET; in test24()
1689 fl.l_start = 0; in test24()
1690 fl.l_len = LLONG_MIN; in test24()
1691 res = fcntl(fd, F_SETLK, &fl); in test24()
1696 fl.l_start = 4; in test24()
1697 fl.l_len = -2; in test24()
1698 res = fcntl(fd, F_SETLK, &fl); in test24()
1706 fl.l_start = 2; in test24()
1707 fl.l_len = 2; in test24()
1708 res = fcntl(fd, F_GETLK, &fl); in test24()
1710 FAIL(fl.l_type == F_UNLCK); in test24()
1727 struct flock fl; in test25() local
1734 fl.l_start = 0; in test25()
1735 fl.l_len = 0; in test25()
1736 fl.l_pid = 0; in test25()
1737 fl.l_type = F_RDLCK; in test25()
1738 fl.l_whence = SEEK_SET; in test25()
1739 res = fcntl(slave, F_SETLKW, &fl); in test25()
1742 fl.l_start = 3; in test25()
1743 fl.l_len = 0x7ffffffffffffffd; in test25()
1744 fl.l_pid = 0; in test25()
1745 fl.l_type = F_UNLCK; in test25()
1746 fl.l_whence = SEEK_END; in test25()
1747 res = fcntl(slave, F_SETLKW, &fl); in test25()
1750 fl.l_start = 0; in test25()
1751 fl.l_len = 0; in test25()
1752 fl.l_pid = 0; in test25()
1753 fl.l_type = F_RDLCK; in test25()
1754 fl.l_whence = SEEK_SET; in test25()
1755 res = fcntl(slave, F_SETLKW, &fl); in test25()
1772 struct flock fl; in test26() local
1777 fl.l_start = 0; in test26()
1778 fl.l_len = 0; in test26()
1779 fl.l_pid = 0; in test26()
1780 fl.l_type = F_RDLCK; in test26()
1781 fl.l_whence = SEEK_SET; in test26()
1782 res = fcntl(fd, F_SETLK, &fl); in test26()
1789 fl.l_start = LLONG_MAX; in test26()
1790 fl.l_len = 1; in test26()
1791 fl.l_pid = 0; in test26()
1792 fl.l_type = F_WRLCK; in test26()
1793 fl.l_whence = SEEK_SET; in test26()
1794 res = fcntl(fd, F_SETLK, &fl); in test26()
1802 fl.l_start = 0; in test26()
1803 fl.l_len = 0; in test26()
1804 fl.l_type = F_WRLCK; in test26()
1805 fl.l_whence = SEEK_SET; in test26()
1806 res = fcntl(fd, F_GETLK, &fl); in test26()
1808 FAIL(fl.l_type != F_RDLCK); in test26()
1809 FAIL(fl.l_start != 0); in test26()
1810 FAIL(fl.l_len != LLONG_MAX); in test26()
1812 fl.l_start = LLONG_MAX; in test26()
1813 fl.l_len = 0; in test26()
1814 fl.l_type = F_WRLCK; in test26()
1815 fl.l_whence = SEEK_SET; in test26()
1816 res = fcntl(fd, F_GETLK, &fl); in test26()
1818 FAIL(fl.l_type != F_WRLCK); in test26()
1819 FAIL(fl.l_start != LLONG_MAX); in test26()
1820 FAIL(fl.l_len != 0); in test26()
1828 fl.l_start = 0; in test26()
1829 fl.l_len = 0; in test26()
1830 fl.l_pid = 0; in test26()
1831 fl.l_type = F_UNLCK; in test26()
1832 fl.l_whence = SEEK_SET; in test26()
1833 res = fcntl(fd, F_SETLK, &fl); in test26()
1841 fl.l_start = 0; in test26()
1842 fl.l_len = 0; in test26()
1843 fl.l_type = F_WRLCK; in test26()
1844 fl.l_whence = SEEK_SET; in test26()
1845 res = fcntl(fd, F_GETLK, &fl); in test26()
1847 FAIL(fl.l_type != F_UNLCK); in test26()
1848 FAIL(fl.l_start != 0); in test26()
1849 FAIL(fl.l_len != 0); in test26()