Lines Matching refs:CHECK

53 #define CHECK(expr)     do {						\  macro
262 CHECK(capgrp != NULL); in test_cmds()
271 CHECK(cap_grp_limit_cmds(capgrp, cmds, 7) == 0); in test_cmds()
272 CHECK(cap_grp_limit_fields(capgrp, fields, 4) == 0); in test_cmds()
273 CHECK(cap_grp_limit_groups(capgrp, names, 5, NULL, 0) == 0); in test_cmds()
275 CHECK(runtest_cmds(capgrp) == (SETGRENT | GETGRENT | GETGRENT_R | in test_cmds()
290 CHECK(capgrp != NULL); in test_cmds()
299 CHECK(cap_grp_limit_cmds(capgrp, cmds, 7) == 0); in test_cmds()
300 CHECK(cap_grp_limit_fields(capgrp, fields, 4) == 0); in test_cmds()
301 CHECK(cap_grp_limit_groups(capgrp, NULL, 0, gids, 5) == 0); in test_cmds()
303 CHECK(runtest_cmds(capgrp) == (SETGRENT | GETGRENT | GETGRENT_R | in test_cmds()
322 CHECK(capgrp != NULL); in test_cmds()
330 CHECK(cap_grp_limit_cmds(capgrp, cmds, 6) == 0); in test_cmds()
338 CHECK(cap_grp_limit_cmds(capgrp, cmds, 7) == -1 && errno == ENOTCAPABLE); in test_cmds()
340 CHECK(cap_grp_limit_cmds(capgrp, cmds, 1) == -1 && errno == ENOTCAPABLE); in test_cmds()
341 CHECK(cap_grp_limit_groups(capgrp, names, 5, NULL, 0) == 0); in test_cmds()
343 CHECK(runtest_cmds(capgrp) == (GETGRENT0 | GETGRENT1 | GETGRENT_R0 | in test_cmds()
362 CHECK(capgrp != NULL); in test_cmds()
370 CHECK(cap_grp_limit_cmds(capgrp, cmds, 6) == 0); in test_cmds()
378 CHECK(cap_grp_limit_cmds(capgrp, cmds, 7) == -1 && errno == ENOTCAPABLE); in test_cmds()
380 CHECK(cap_grp_limit_cmds(capgrp, cmds, 1) == -1 && errno == ENOTCAPABLE); in test_cmds()
381 CHECK(cap_grp_limit_groups(capgrp, NULL, 0, gids, 5) == 0); in test_cmds()
383 CHECK(runtest_cmds(capgrp) == (GETGRENT0 | GETGRENT1 | GETGRENT_R0 | in test_cmds()
402 CHECK(capgrp != NULL); in test_cmds()
410 CHECK(cap_grp_limit_cmds(capgrp, cmds, 6) == 0); in test_cmds()
418 CHECK(cap_grp_limit_cmds(capgrp, cmds, 7) == -1 && errno == ENOTCAPABLE); in test_cmds()
420 CHECK(cap_grp_limit_cmds(capgrp, cmds, 1) == -1 && errno == ENOTCAPABLE); in test_cmds()
421 CHECK(cap_grp_limit_fields(capgrp, fields, 4) == 0); in test_cmds()
422 CHECK(cap_grp_limit_groups(capgrp, names, 5, NULL, 0) == 0); in test_cmds()
424 CHECK(runtest_cmds(capgrp) == (SETGRENT | GETGRENT_R2 | in test_cmds()
443 CHECK(capgrp != NULL); in test_cmds()
451 CHECK(cap_grp_limit_cmds(capgrp, cmds, 6) == 0); in test_cmds()
459 CHECK(cap_grp_limit_cmds(capgrp, cmds, 7) == -1 && errno == ENOTCAPABLE); in test_cmds()
461 CHECK(cap_grp_limit_cmds(capgrp, cmds, 1) == -1 && errno == ENOTCAPABLE); in test_cmds()
462 CHECK(cap_grp_limit_fields(capgrp, fields, 4) == 0); in test_cmds()
463 CHECK(cap_grp_limit_groups(capgrp, NULL, 0, gids, 5) == 0); in test_cmds()
465 CHECK(runtest_cmds(capgrp) == (SETGRENT | GETGRENT_R2 | in test_cmds()
484 CHECK(capgrp != NULL); in test_cmds()
492 CHECK(cap_grp_limit_cmds(capgrp, cmds, 6) == 0); in test_cmds()
500 CHECK(cap_grp_limit_cmds(capgrp, cmds, 7) == -1 && errno == ENOTCAPABLE); in test_cmds()
502 CHECK(cap_grp_limit_cmds(capgrp, cmds, 1) == -1 && errno == ENOTCAPABLE); in test_cmds()
503 CHECK(cap_grp_limit_groups(capgrp, names, 5, NULL, 0) == 0); in test_cmds()
505 CHECK(runtest_cmds(capgrp) == (SETGRENT | GETGRENT0 | GETGRENT1 | in test_cmds()
524 CHECK(capgrp != NULL); in test_cmds()
532 CHECK(cap_grp_limit_cmds(capgrp, cmds, 6) == 0); in test_cmds()
540 CHECK(cap_grp_limit_cmds(capgrp, cmds, 7) == -1 && errno == ENOTCAPABLE); in test_cmds()
542 CHECK(cap_grp_limit_cmds(capgrp, cmds, 1) == -1 && errno == ENOTCAPABLE); in test_cmds()
543 CHECK(cap_grp_limit_groups(capgrp, NULL, 0, gids, 5) == 0); in test_cmds()
545 CHECK(runtest_cmds(capgrp) == (SETGRENT | GETGRENT0 | GETGRENT1 | in test_cmds()
564 CHECK(capgrp != NULL); in test_cmds()
572 CHECK(cap_grp_limit_cmds(capgrp, cmds, 6) == 0); in test_cmds()
580 CHECK(cap_grp_limit_cmds(capgrp, cmds, 7) == -1 && errno == ENOTCAPABLE); in test_cmds()
582 CHECK(cap_grp_limit_cmds(capgrp, cmds, 1) == -1 && errno == ENOTCAPABLE); in test_cmds()
583 CHECK(cap_grp_limit_fields(capgrp, fields, 4) == 0); in test_cmds()
584 CHECK(cap_grp_limit_groups(capgrp, names, 5, NULL, 0) == 0); in test_cmds()
586 CHECK(runtest_cmds(capgrp) == (SETGRENT | GETGRENT | GETGRENT_R | in test_cmds()
605 CHECK(capgrp != NULL); in test_cmds()
613 CHECK(cap_grp_limit_cmds(capgrp, cmds, 6) == 0); in test_cmds()
621 CHECK(cap_grp_limit_cmds(capgrp, cmds, 7) == -1 && errno == ENOTCAPABLE); in test_cmds()
623 CHECK(cap_grp_limit_cmds(capgrp, cmds, 1) == -1 && errno == ENOTCAPABLE); in test_cmds()
624 CHECK(cap_grp_limit_fields(capgrp, fields, 4) == 0); in test_cmds()
625 CHECK(cap_grp_limit_groups(capgrp, NULL, 0, gids, 5) == 0); in test_cmds()
627 CHECK(runtest_cmds(capgrp) == (SETGRENT | GETGRENT | GETGRENT_R | in test_cmds()
646 CHECK(capgrp != NULL); in test_cmds()
654 CHECK(cap_grp_limit_cmds(capgrp, cmds, 6) == 0); in test_cmds()
662 CHECK(cap_grp_limit_cmds(capgrp, cmds, 7) == -1 && errno == ENOTCAPABLE); in test_cmds()
664 CHECK(cap_grp_limit_cmds(capgrp, cmds, 1) == -1 && errno == ENOTCAPABLE); in test_cmds()
665 CHECK(cap_grp_limit_groups(capgrp, names, 5, NULL, 0) == 0); in test_cmds()
667 CHECK(runtest_cmds(capgrp) == (SETGRENT | GETGRENT | GETGRENT_R | in test_cmds()
686 CHECK(capgrp != NULL); in test_cmds()
694 CHECK(cap_grp_limit_cmds(capgrp, cmds, 6) == 0); in test_cmds()
702 CHECK(cap_grp_limit_cmds(capgrp, cmds, 7) == -1 && errno == ENOTCAPABLE); in test_cmds()
704 CHECK(cap_grp_limit_cmds(capgrp, cmds, 1) == -1 && errno == ENOTCAPABLE); in test_cmds()
705 CHECK(cap_grp_limit_groups(capgrp, NULL, 0, gids, 5) == 0); in test_cmds()
707 CHECK(runtest_cmds(capgrp) == (SETGRENT | GETGRENT | GETGRENT_R | in test_cmds()
726 CHECK(capgrp != NULL); in test_cmds()
734 CHECK(cap_grp_limit_cmds(capgrp, cmds, 6) == 0); in test_cmds()
742 CHECK(cap_grp_limit_cmds(capgrp, cmds, 7) == -1 && errno == ENOTCAPABLE); in test_cmds()
744 CHECK(cap_grp_limit_cmds(capgrp, cmds, 1) == -1 && errno == ENOTCAPABLE); in test_cmds()
745 CHECK(cap_grp_limit_fields(capgrp, fields, 4) == 0); in test_cmds()
746 CHECK(cap_grp_limit_groups(capgrp, names, 5, NULL, 0) == 0); in test_cmds()
748 CHECK(runtest_cmds(capgrp) == (SETGRENT | GETGRENT | GETGRENT_R | in test_cmds()
767 CHECK(capgrp != NULL); in test_cmds()
775 CHECK(cap_grp_limit_cmds(capgrp, cmds, 6) == 0); in test_cmds()
783 CHECK(cap_grp_limit_cmds(capgrp, cmds, 7) == -1 && errno == ENOTCAPABLE); in test_cmds()
785 CHECK(cap_grp_limit_cmds(capgrp, cmds, 1) == -1 && errno == ENOTCAPABLE); in test_cmds()
786 CHECK(cap_grp_limit_fields(capgrp, fields, 4) == 0); in test_cmds()
787 CHECK(cap_grp_limit_groups(capgrp, NULL, 0, gids, 5) == 0); in test_cmds()
789 CHECK(runtest_cmds(capgrp) == (SETGRENT | GETGRENT | GETGRENT_R | in test_cmds()
808 CHECK(capgrp != NULL); in test_cmds()
816 CHECK(cap_grp_limit_cmds(capgrp, cmds, 6) == 0); in test_cmds()
824 CHECK(cap_grp_limit_cmds(capgrp, cmds, 7) == -1 && errno == ENOTCAPABLE); in test_cmds()
826 CHECK(cap_grp_limit_cmds(capgrp, cmds, 1) == -1 && errno == ENOTCAPABLE); in test_cmds()
827 CHECK(cap_grp_limit_groups(capgrp, names, 5, NULL, 0) == 0); in test_cmds()
829 CHECK(runtest_cmds(capgrp) == (SETGRENT | GETGRENT | GETGRENT_R | in test_cmds()
848 CHECK(capgrp != NULL); in test_cmds()
856 CHECK(cap_grp_limit_cmds(capgrp, cmds, 6) == 0); in test_cmds()
864 CHECK(cap_grp_limit_cmds(capgrp, cmds, 7) == -1 && errno == ENOTCAPABLE); in test_cmds()
866 CHECK(cap_grp_limit_cmds(capgrp, cmds, 1) == -1 && errno == ENOTCAPABLE); in test_cmds()
867 CHECK(cap_grp_limit_groups(capgrp, NULL, 0, gids, 5) == 0); in test_cmds()
869 CHECK(runtest_cmds(capgrp) == (SETGRENT | GETGRENT | GETGRENT_R | in test_cmds()
946 CHECK(runtest_fields(origcapgrp, GR_NAME | GR_PASSWD | GR_GID | GR_MEM)); in test_fields()
953 CHECK(capgrp != NULL); in test_fields()
959 CHECK(cap_grp_limit_fields(capgrp, fields, 4) == 0); in test_fields()
961 CHECK(runtest_fields(capgrp, GR_NAME | GR_PASSWD | GR_GID | GR_MEM)); in test_fields()
970 CHECK(capgrp != NULL); in test_fields()
975 CHECK(cap_grp_limit_fields(capgrp, fields, 3) == 0); in test_fields()
980 CHECK(cap_grp_limit_fields(capgrp, fields, 4) == -1 && in test_fields()
983 CHECK(runtest_fields(capgrp, GR_PASSWD | GR_GID | GR_MEM)); in test_fields()
992 CHECK(capgrp != NULL); in test_fields()
997 CHECK(cap_grp_limit_fields(capgrp, fields, 3) == 0); in test_fields()
1002 CHECK(cap_grp_limit_fields(capgrp, fields, 4) == -1 && in test_fields()
1005 CHECK(cap_grp_limit_fields(capgrp, fields, 1) == -1 && in test_fields()
1008 CHECK(runtest_fields(capgrp, GR_NAME | GR_GID | GR_MEM)); in test_fields()
1017 CHECK(capgrp != NULL); in test_fields()
1022 CHECK(cap_grp_limit_fields(capgrp, fields, 3) == 0); in test_fields()
1027 CHECK(cap_grp_limit_fields(capgrp, fields, 4) == -1 && in test_fields()
1030 CHECK(cap_grp_limit_fields(capgrp, fields, 1) == -1 && in test_fields()
1033 CHECK(runtest_fields(capgrp, GR_NAME | GR_PASSWD | GR_MEM)); in test_fields()
1042 CHECK(capgrp != NULL); in test_fields()
1047 CHECK(cap_grp_limit_fields(capgrp, fields, 3) == 0); in test_fields()
1052 CHECK(cap_grp_limit_fields(capgrp, fields, 4) == -1 && in test_fields()
1055 CHECK(cap_grp_limit_fields(capgrp, fields, 1) == -1 && in test_fields()
1058 CHECK(runtest_fields(capgrp, GR_NAME | GR_PASSWD | GR_GID)); in test_fields()
1067 CHECK(capgrp != NULL); in test_fields()
1071 CHECK(cap_grp_limit_fields(capgrp, fields, 2) == 0); in test_fields()
1076 CHECK(cap_grp_limit_fields(capgrp, fields, 4) == -1 && in test_fields()
1079 CHECK(cap_grp_limit_fields(capgrp, fields, 1) == -1 && in test_fields()
1082 CHECK(runtest_fields(capgrp, GR_NAME | GR_PASSWD)); in test_fields()
1091 CHECK(capgrp != NULL); in test_fields()
1095 CHECK(cap_grp_limit_fields(capgrp, fields, 2) == 0); in test_fields()
1100 CHECK(cap_grp_limit_fields(capgrp, fields, 4) == -1 && in test_fields()
1103 CHECK(cap_grp_limit_fields(capgrp, fields, 1) == -1 && in test_fields()
1106 CHECK(runtest_fields(capgrp, GR_NAME | GR_GID)); in test_fields()
1115 CHECK(capgrp != NULL); in test_fields()
1119 CHECK(cap_grp_limit_fields(capgrp, fields, 2) == 0); in test_fields()
1124 CHECK(cap_grp_limit_fields(capgrp, fields, 4) == -1 && in test_fields()
1127 CHECK(cap_grp_limit_fields(capgrp, fields, 1) == -1 && in test_fields()
1130 CHECK(runtest_fields(capgrp, GR_NAME | GR_MEM)); in test_fields()
1139 CHECK(capgrp != NULL); in test_fields()
1143 CHECK(cap_grp_limit_fields(capgrp, fields, 2) == 0); in test_fields()
1148 CHECK(cap_grp_limit_fields(capgrp, fields, 4) == -1 && in test_fields()
1151 CHECK(cap_grp_limit_fields(capgrp, fields, 1) == -1 && in test_fields()
1154 CHECK(runtest_fields(capgrp, GR_PASSWD | GR_GID)); in test_fields()
1163 CHECK(capgrp != NULL); in test_fields()
1167 CHECK(cap_grp_limit_fields(capgrp, fields, 2) == 0); in test_fields()
1172 CHECK(cap_grp_limit_fields(capgrp, fields, 4) == -1 && in test_fields()
1175 CHECK(cap_grp_limit_fields(capgrp, fields, 1) == -1 && in test_fields()
1178 CHECK(runtest_fields(capgrp, GR_PASSWD | GR_MEM)); in test_fields()
1187 CHECK(capgrp != NULL); in test_fields()
1191 CHECK(cap_grp_limit_fields(capgrp, fields, 2) == 0); in test_fields()
1196 CHECK(cap_grp_limit_fields(capgrp, fields, 4) == -1 && in test_fields()
1199 CHECK(cap_grp_limit_fields(capgrp, fields, 1) == -1 && in test_fields()
1202 CHECK(runtest_fields(capgrp, GR_GID | GR_MEM)); in test_fields()
1295 CHECK(capgrp != NULL); in test_groups()
1302 CHECK(cap_grp_limit_groups(capgrp, names, 5, NULL, 0) == 0); in test_groups()
1309 CHECK(runtest_groups(capgrp, names, gids, 5)); in test_groups()
1320 CHECK(capgrp != NULL); in test_groups()
1325 CHECK(cap_grp_limit_groups(capgrp, names, 3, NULL, 0) == 0); in test_groups()
1327 CHECK(cap_grp_limit_groups(capgrp, names, 4, NULL, 0) == -1 && in test_groups()
1330 CHECK(cap_grp_limit_groups(capgrp, names, 1, NULL, 0) == -1 && in test_groups()
1337 CHECK(runtest_groups(capgrp, names, gids, 3)); in test_groups()
1348 CHECK(capgrp != NULL); in test_groups()
1353 CHECK(cap_grp_limit_groups(capgrp, names, 3, NULL, 0) == 0); in test_groups()
1355 CHECK(cap_grp_limit_groups(capgrp, names, 4, NULL, 0) == -1 && in test_groups()
1358 CHECK(cap_grp_limit_groups(capgrp, names, 1, NULL, 0) == -1 && in test_groups()
1365 CHECK(runtest_groups(capgrp, names, gids, 3)); in test_groups()
1376 CHECK(capgrp != NULL); in test_groups()
1384 CHECK(cap_grp_limit_groups(capgrp, NULL, 0, gids, 3) == 0); in test_groups()
1386 CHECK(cap_grp_limit_groups(capgrp, NULL, 0, gids, 4) == -1 && in test_groups()
1389 CHECK(cap_grp_limit_groups(capgrp, NULL, 0, gids, 1) == -1 && in test_groups()
1393 CHECK(runtest_groups(capgrp, names, gids, 3)); in test_groups()
1404 CHECK(capgrp != NULL); in test_groups()
1412 CHECK(cap_grp_limit_groups(capgrp, NULL, 0, gids, 3) == 0); in test_groups()
1414 CHECK(cap_grp_limit_groups(capgrp, NULL, 0, gids, 4) == -1 && in test_groups()
1417 CHECK(cap_grp_limit_groups(capgrp, NULL, 0, gids, 1) == -1 && in test_groups()
1421 CHECK(runtest_groups(capgrp, names, gids, 3)); in test_groups()
1432 CHECK(capgrp != NULL); in test_groups()
1435 CHECK(cap_grp_limit_groups(capgrp, names, 1, NULL, 0) == 0); in test_groups()
1437 CHECK(cap_grp_limit_groups(capgrp, names, 2, NULL, 0) == -1 && in test_groups()
1440 CHECK(cap_grp_limit_groups(capgrp, names, 1, NULL, 0) == -1 && in test_groups()
1445 CHECK(runtest_groups(capgrp, names, gids, 1)); in test_groups()
1456 CHECK(capgrp != NULL); in test_groups()
1460 CHECK(cap_grp_limit_groups(capgrp, names, 2, NULL, 0) == 0); in test_groups()
1462 CHECK(cap_grp_limit_groups(capgrp, names, 3, NULL, 0) == -1 && in test_groups()
1465 CHECK(cap_grp_limit_groups(capgrp, names, 1, NULL, 0) == -1 && in test_groups()
1471 CHECK(runtest_groups(capgrp, names, gids, 2)); in test_groups()
1482 CHECK(capgrp != NULL); in test_groups()
1486 CHECK(cap_grp_limit_groups(capgrp, NULL, 0, gids, 1) == 0); in test_groups()
1488 CHECK(cap_grp_limit_groups(capgrp, NULL, 0, gids, 2) == -1 && in test_groups()
1491 CHECK(cap_grp_limit_groups(capgrp, NULL, 0, gids, 1) == -1 && in test_groups()
1495 CHECK(runtest_groups(capgrp, names, gids, 1)); in test_groups()
1506 CHECK(capgrp != NULL); in test_groups()
1512 CHECK(cap_grp_limit_groups(capgrp, NULL, 0, gids, 2) == 0); in test_groups()
1514 CHECK(cap_grp_limit_groups(capgrp, NULL, 0, gids, 3) == -1 && in test_groups()
1517 CHECK(cap_grp_limit_groups(capgrp, NULL, 0, gids, 1) == -1 && in test_groups()
1521 CHECK(runtest_groups(capgrp, names, gids, 2)); in test_groups()
1544 CHECK(runtest_cmds(capgrp) == (SETGRENT | GETGRENT | GETGRENT_R | in main()