Lines Matching defs:line
351 unsigned int line, uintptr_t pReserved)
358 (void)line;
455 void skipping_setup(const char *filename, int line)
458 skipping_line = line;
463 assertion_count(const char *file, int line)
466 (void)line; /* UNUSED */
471 /* Uncomment to print file:line after every assertion.
473 /* printf("Checked %s:%d\n", file, line); */
481 static struct line {
489 failure_start(const char *filename, int line, const char *fmt, ...)
493 /* Record another failure for this line. */
496 failed_lines[line].count++;
501 log_console = (failed_lines[line].count < 2);
507 /* Log file:line header for this failure */
510 logprintf("%s(%d): ", filename, line);
512 logprintf("%s:%d: ", filename, line);
583 assertion_assert(const char *file, int line, int value,
586 assertion_count(file, line);
588 failure_start(file, line, "Assertion failed: %s", condition);
596 assertion_chdir(const char *file, int line, const char *pathname)
598 assertion_count(file, line);
601 failure_start(file, line, "chdir(\"%s\")", pathname);
609 assertion_chmod(const char *file, int line, const char *pathname, int mode)
611 assertion_count(file, line);
614 failure_start(file, line, "chmod(\"%s\", %4.o)", pathname, mode);
622 assertion_equal_int(const char *file, int line,
625 assertion_count(file, line);
628 failure_start(file, line, "%s != %s", e1, e2);
637 assertion_equal_address(const char *file, int line,
640 assertion_count(file, line);
643 failure_start(file, line, "%s != %s", e1, e2);
799 assertion_equal_string(const char *file, int line,
806 assertion_count(file, line);
809 failure_start(file, line, "%s != %s", e1, e2);
861 assertion_equal_wstring(const char *file, int line,
866 assertion_count(file, line);
871 failure_start(file, line, "%s != %s", e1, e2);
922 assertion_equal_mem(const char *file, int line,
931 assertion_count(file, line);
937 failure_start(file, line, "%s != %s", e1, e2);
940 * in the second line. */
943 /* Two lines agree, so step forward one line. */
960 assertion_memory_filled_with(const char *file, int line,
970 assertion_count(file, line);
980 failure_start(file, line, "%s (size %d) not filled with %s", vd, (int)l, bd);
988 assertion_empty_file(const char *filename, int line, const char *f1)
995 assertion_count(filename, line);
998 failure_start(filename, line, "Stat failed: %s", f1);
1005 failure_start(filename, line, "File should be empty: %s", f1);
1024 assertion_non_empty_file(const char *filename, int line, const char *f1)
1028 assertion_count(filename, line);
1031 failure_start(filename, line, "Stat failed: %s", f1);
1036 failure_start(filename, line, "File empty: %s", f1);
1046 assertion_equal_file(const char *filename, int line, const char *fn1, const char *fn2)
1053 assertion_count(filename, line);
1077 failure_start(filename, line, "Files not identical");
1086 assertion_file_exists(const char *filename, int line, const char *f)
1088 assertion_count(filename, line);
1097 failure_start(filename, line, "File should exist: %s", f);
1104 assertion_file_not_exists(const char *filename, int line, const char *f)
1106 assertion_count(filename, line);
1115 failure_start(filename, line, "File should not exist: %s", f);
1122 assertion_file_contents(const char *filename, int line, const void *buff, int s, const char *fn)
1128 assertion_count(filename, line);
1132 failure_start(filename, line,
1144 failure_start(filename, line, "File contents don't match");
1157 /* Check the contents of a text file, being tolerant of line endings. */
1159 assertion_text_file_contents(const char *filename, int line, const char *buff, const char *fn)
1166 assertion_count(filename, line);
1169 failure_start(filename, line,
1190 /* Pass over different new line characters. */
1201 failure_start(filename, line, "Contents don't match");
1221 assertion_file_contains_lines_any_order(const char *file, int line,
1232 assertion_count(file, line);
1236 failure_start(pathname, line, "Can't read file: %s", pathname);
1249 failure_start(pathname, line, "Can't allocate memory");
1256 failure_start(pathname, line, "Can't allocate memory");
1275 failure_start(pathname, line, "Can't allocate memory");
1317 failure_start(file, line, "File doesn't match: %s", pathname);
1344 assertion_file_contains_no_invalid_strings(const char *file, int line,
1352 failure_start(file, line, "Can't read file: %s", pathname);
1359 failure_start(file, line, "Invalid string in %s: %s", pathname,
1374 is_hardlink(const char *file, int line,
1381 assertion_count(file, line);
1384 failure_start(file, line, "File %s can't be inspected?", path1);
1390 failure_start(file, line, "File %s can't be inspected?", path2);
1401 assertion_count(file, line);
1404 failure_start(file, line, "File should exist: %s", path1);
1410 failure_start(file, line, "File should exist: %s", path2);
1419 assertion_is_hardlink(const char *file, int line,
1422 if (is_hardlink(file, line, path1, path2))
1424 failure_start(file, line,
1431 assertion_is_not_hardlink(const char *file, int line,
1434 if (!is_hardlink(file, line, path1, path2))
1436 failure_start(file, line,
1445 assertion_file_time(const char *file, int line,
1459 assertion_count(file, line);
1466 failure_start(file, line, "Can't access %s\n", pathname);
1478 failure_start(file, line, "Can't GetFileTime %s\n", pathname);
1490 assertion_count(file, line);
1493 failure_start(file, line, "Can't stat %s\n", pathname);
1533 failure_start(file, line,
1540 failure_start(file, line,
1551 assertion_file_atime(const char *file, int line,
1554 return assertion_file_time(file, line, pathname, t, nsec, 'a', 0);
1559 assertion_file_atime_recent(const char *file, int line, const char *pathname)
1561 return assertion_file_time(file, line, pathname, 0, 0, 'a', 1);
1566 assertion_file_birthtime(const char *file, int line,
1569 return assertion_file_time(file, line, pathname, t, nsec, 'b', 0);
1574 assertion_file_birthtime_recent(const char *file, int line,
1577 return assertion_file_time(file, line, pathname, 0, 0, 'b', 1);
1582 assertion_file_mode(const char *file, int line, const char *pathname, int expected_mode)
1587 assertion_count(file, line);
1589 failure_start(file, line, "assertFileMode not yet implemented for Windows");
1602 failure_start(file, line, "File %s has mode %o, expected %o",
1611 assertion_file_mtime(const char *file, int line,
1614 return assertion_file_time(file, line, pathname, t, nsec, 'm', 0);
1619 assertion_file_mtime_recent(const char *file, int line, const char *pathname)
1621 return assertion_file_time(file, line, pathname, 0, 0, 'm', 1);
1626 assertion_file_nlinks(const char *file, int line,
1633 assertion_count(file, line);
1637 failure_start(file, line, "File %s has %jd links, expected %d",
1645 assertion_count(file, line);
1649 failure_start(file, line, "File %s has %jd links, expected %d",
1658 assertion_file_size(const char *file, int line, const char *pathname, long size)
1663 assertion_count(file, line);
1679 failure_start(file, line, "File %s has size %ld, expected %ld",
1687 assertion_is_dir(const char *file, int line, const char *pathname, int mode)
1695 assertion_count(file, line);
1698 failure_start(file, line, "Dir should exist: %s", pathname);
1703 failure_start(file, line, "%s is not a dir", pathname);
1712 failure_start(file, line, "Dir %s has wrong mode", pathname);
1725 assertion_is_reg(const char *file, int line, const char *pathname, int mode)
1733 assertion_count(file, line);
1736 failure_start(file, line, "File should exist: %s", pathname);
1745 failure_start(file, line, "File %s has wrong mode", pathname);
1764 is_symlink(const char *file, int line,
1784 failure_start(file, line, "Can't allocate memory");
1800 failure_start(file, line, "Can't access %s\n", pathname);
1806 failure_start(file, line,
1810 failure_start(file, line,
1816 failure_start(file, line,
1823 failure_start(file, line,
1839 failure_start(file, line,
1849 failure_start(file, line,
1896 assertion_count(file, line);
1899 failure_start(file, line,
1910 failure_start(file, line, "Can't read symlink %s", pathname);
1923 assertion_is_symlink(const char *file, int line,
1926 if (is_symlink(file, line, path, contents, isdir))
1929 failure_start(file, line, "File %s is not a symlink to %s",
1932 failure_start(file, line, "File %s is not a symlink", path);
1940 assertion_make_dir(const char *file, int line, const char *dirname, int mode)
1942 assertion_count(file, line);
1950 assertion_file_mode(file, line, dirname, mode);
1955 failure_start(file, line, "Could not create directory %s", dirname);
1962 assertion_make_file(const char *file, int line,
1969 assertion_count(file, line);
1972 failure_start(file, line, "Could not create file %s", path);
1985 failure_start(file, line,
1995 assertion_count(file, line);
1998 failure_start(file, line, "Could not create %s", path);
2008 failure_start(file, line, "Could not chmod %s", path);
2022 failure_start(file, line,
2030 assertion_file_mode(file, line, path, mode);
2037 assertion_make_hardlink(const char *file, int line,
2042 assertion_count(file, line);
2052 failure_start(file, line, "Could not create hardlink");
2065 assertion_make_symlink(const char *file, int line,
2069 assertion_count(file, line);
2074 assertion_count(file, line);
2080 failure_start(file, line, "Could not create symlink");
2089 assertion_umask(const char *file, int line, int mask)
2091 assertion_count(file, line);
2093 (void)line; /* UNUSED */
2100 assertion_utimes(const char *file, int line, const char *pathname,
2113 assertion_count(file, line);
2118 failure_start(file, line, "Can't access %s\n", pathname);
2143 failure_start(file, line, "Can't SetFileTime %s\n", pathname);
2160 failure_start(file, line, "Can't stat %s\n", pathname);
2194 failure_start(file, line, "Can't utimes %s\n", pathname);
2204 assertion_compare_fflags(const char *file, int line, const char *patha,
2210 assertion_count(file, line);
2217 failure_start(file, line, "File flags should be identical: "
2224 failure_start(file, line, "File flags should be different: "
2236 assertion_count(file, line);
2239 failure_start(file, line, "Can't open %s\n", patha);
2252 failure_start(file, line, "Can't get flags %s\n", patha);
2258 failure_start(file, line, "Can't open %s\n", pathb);
2271 failure_start(file, line, "Can't get flags %s\n", pathb);
2276 failure_start(file, line, "File flags should be identical: "
2282 failure_start(file, line, "File flags should be different: "
2291 assertion_count(file, line);
2298 assertion_set_nodump(const char *file, int line, const char *pathname)
2303 assertion_count(file, line);
2306 failure_start(file, line, "Can't set nodump %s\n", pathname);
2316 assertion_count(file, line);
2319 failure_start(file, line, "Can't open %s\n", pathname);
2331 failure_start(file, line, "Can't get flags %s\n", pathname);
2349 failure_start(file, line, "Can't set nodump %s\n", pathname);
2356 assertion_count(file, line);
2459 /* All terminated by end-of-line. */
3090 * Call standard system() call, but build up the command line using
3199 /* Read up to and including the 'begin' line. */
3303 assertion_entry_set_acls(const char *file, int line, struct archive_entry *ae,
3308 assertion_count(file, line);
3318 failure_start(file, line, "type=%#010x, "
3364 assertion_entry_compare_acls(const char *file, int line,
3374 assertion_count(file, line);
3388 failure_start(file, line, "No ACL's to compare, type mask: %d",
3407 failure_start(file, line, "No match for "
3413 failure_start(file, line, "USER_OBJ permset "
3422 failure_start(file, line, "No match for "
3428 failure_start(file, line, "GROUP_OBJ permset "
3437 failure_start(file, line, "No match for "
3443 failure_start(file, line, "OTHER permset "
3450 failure_start(file, line, "Could not find match for "
3458 failure_start(file, line, "Should not exit before EOF");
3464 failure_start(file, line, "Mode (%02o) and entry mode (%02o) "
3470 failure_start(file, line, "Could not find match for ACL "
3492 * a line like
3564 case VERBOSITY_PASSFAIL: /* rest of line will include ok/FAIL marker */