Lines Matching defs:line

344     unsigned int line, uintptr_t pReserved)
351 (void)line;
448 void skipping_setup(const char *filename, int line)
451 skipping_line = line;
456 assertion_count(const char *file, int line)
459 (void)line; /* UNUSED */
464 /* Uncomment to print file:line after every assertion.
466 /* printf("Checked %s:%d\n", file, line); */
474 static struct line {
482 failure_start(const char *filename, int line, const char *fmt, ...)
486 /* Record another failure for this line. */
489 failed_lines[line].count++;
494 log_console = (failed_lines[line].count < 2);
500 /* Log file:line header for this failure */
503 logprintf("%s(%d): ", filename, line);
505 logprintf("%s:%d: ", filename, line);
576 assertion_assert(const char *file, int line, int value,
579 assertion_count(file, line);
581 failure_start(file, line, "Assertion failed: %s", condition);
589 assertion_chdir(const char *file, int line, const char *pathname)
591 assertion_count(file, line);
594 failure_start(file, line, "chdir(\"%s\")", pathname);
602 assertion_chmod(const char *file, int line, const char *pathname, int mode)
604 assertion_count(file, line);
607 failure_start(file, line, "chmod(\"%s\", %4.o)", pathname, mode);
615 assertion_equal_int(const char *file, int line,
618 assertion_count(file, line);
621 failure_start(file, line, "%s != %s", e1, e2);
777 assertion_equal_string(const char *file, int line,
784 assertion_count(file, line);
787 failure_start(file, line, "%s != %s", e1, e2);
839 assertion_equal_wstring(const char *file, int line,
844 assertion_count(file, line);
849 failure_start(file, line, "%s != %s", e1, e2);
900 assertion_equal_mem(const char *file, int line,
909 assertion_count(file, line);
915 failure_start(file, line, "%s != %s", e1, e2);
918 * in the second line. */
921 /* Two lines agree, so step forward one line. */
938 assertion_memory_filled_with(const char *file, int line,
948 assertion_count(file, line);
958 failure_start(file, line, "%s (size %d) not filled with %s", vd, (int)l, bd);
966 assertion_empty_file(const char *filename, int line, const char *f1)
973 assertion_count(filename, line);
976 failure_start(filename, line, "Stat failed: %s", f1);
983 failure_start(filename, line, "File should be empty: %s", f1);
1002 assertion_non_empty_file(const char *filename, int line, const char *f1)
1006 assertion_count(filename, line);
1009 failure_start(filename, line, "Stat failed: %s", f1);
1014 failure_start(filename, line, "File empty: %s", f1);
1024 assertion_equal_file(const char *filename, int line, const char *fn1, const char *fn2)
1031 assertion_count(filename, line);
1055 failure_start(filename, line, "Files not identical");
1064 assertion_file_exists(const char *filename, int line, const char *f)
1066 assertion_count(filename, line);
1075 failure_start(filename, line, "File should exist: %s", f);
1082 assertion_file_not_exists(const char *filename, int line, const char *f)
1084 assertion_count(filename, line);
1093 failure_start(filename, line, "File should not exist: %s", f);
1100 assertion_file_contents(const char *filename, int line, const void *buff, int s, const char *fn)
1106 assertion_count(filename, line);
1110 failure_start(filename, line,
1122 failure_start(filename, line, "File contents don't match");
1135 /* Check the contents of a text file, being tolerant of line endings. */
1137 assertion_text_file_contents(const char *filename, int line, const char *buff, const char *fn)
1144 assertion_count(filename, line);
1147 failure_start(filename, line,
1168 /* Pass over different new line characters. */
1179 failure_start(filename, line, "Contents don't match");
1199 assertion_file_contains_lines_any_order(const char *file, int line,
1210 assertion_count(file, line);
1214 failure_start(pathname, line, "Can't read file: %s", pathname);
1227 failure_start(pathname, line, "Can't allocate memory");
1250 failure_start(pathname, line, "Can't allocate memory");
1296 failure_start(file, line, "File doesn't match: %s", pathname);
1316 assertion_file_contains_no_invalid_strings(const char *file, int line,
1324 failure_start(file, line, "Can't read file: %s", pathname);
1331 failure_start(file, line, "Invalid string in %s: %s", pathname,
1346 is_hardlink(const char *file, int line,
1353 assertion_count(file, line);
1356 failure_start(file, line, "File %s can't be inspected?", path1);
1362 failure_start(file, line, "File %s can't be inspected?", path2);
1373 assertion_count(file, line);
1376 failure_start(file, line, "File should exist: %s", path1);
1382 failure_start(file, line, "File should exist: %s", path2);
1391 assertion_is_hardlink(const char *file, int line,
1394 if (is_hardlink(file, line, path1, path2))
1396 failure_start(file, line,
1403 assertion_is_not_hardlink(const char *file, int line,
1406 if (!is_hardlink(file, line, path1, path2))
1408 failure_start(file, line,
1417 assertion_file_time(const char *file, int line,
1431 assertion_count(file, line);
1438 failure_start(file, line, "Can't access %s\n", pathname);
1450 failure_start(file, line, "Can't GetFileTime %s\n", pathname);
1462 assertion_count(file, line);
1465 failure_start(file, line, "Can't stat %s\n", pathname);
1505 failure_start(file, line,
1512 failure_start(file, line,
1523 assertion_file_atime(const char *file, int line,
1526 return assertion_file_time(file, line, pathname, t, nsec, 'a', 0);
1531 assertion_file_atime_recent(const char *file, int line, const char *pathname)
1533 return assertion_file_time(file, line, pathname, 0, 0, 'a', 1);
1538 assertion_file_birthtime(const char *file, int line,
1541 return assertion_file_time(file, line, pathname, t, nsec, 'b', 0);
1546 assertion_file_birthtime_recent(const char *file, int line,
1549 return assertion_file_time(file, line, pathname, 0, 0, 'b', 1);
1554 assertion_file_mode(const char *file, int line, const char *pathname, int expected_mode)
1559 assertion_count(file, line);
1561 failure_start(file, line, "assertFileMode not yet implemented for Windows");
1574 failure_start(file, line, "File %s has mode %o, expected %o",
1583 assertion_file_mtime(const char *file, int line,
1586 return assertion_file_time(file, line, pathname, t, nsec, 'm', 0);
1591 assertion_file_mtime_recent(const char *file, int line, const char *pathname)
1593 return assertion_file_time(file, line, pathname, 0, 0, 'm', 1);
1598 assertion_file_nlinks(const char *file, int line,
1605 assertion_count(file, line);
1609 failure_start(file, line, "File %s has %jd links, expected %d",
1617 assertion_count(file, line);
1621 failure_start(file, line, "File %s has %jd links, expected %d",
1630 assertion_file_size(const char *file, int line, const char *pathname, long size)
1635 assertion_count(file, line);
1651 failure_start(file, line, "File %s has size %ld, expected %ld",
1659 assertion_is_dir(const char *file, int line, const char *pathname, int mode)
1667 assertion_count(file, line);
1670 failure_start(file, line, "Dir should exist: %s", pathname);
1675 failure_start(file, line, "%s is not a dir", pathname);
1684 failure_start(file, line, "Dir %s has wrong mode", pathname);
1697 assertion_is_reg(const char *file, int line, const char *pathname, int mode)
1705 assertion_count(file, line);
1708 failure_start(file, line, "File should exist: %s", pathname);
1717 failure_start(file, line, "File %s has wrong mode", pathname);
1736 is_symlink(const char *file, int line,
1771 failure_start(file, line, "Can't access %s\n", pathname);
1777 failure_start(file, line,
1781 failure_start(file, line,
1787 failure_start(file, line,
1794 failure_start(file, line,
1810 failure_start(file, line,
1820 failure_start(file, line,
1867 assertion_count(file, line);
1870 failure_start(file, line,
1881 failure_start(file, line, "Can't read symlink %s", pathname);
1894 assertion_is_symlink(const char *file, int line,
1897 if (is_symlink(file, line, path, contents, isdir))
1900 failure_start(file, line, "File %s is not a symlink to %s",
1903 failure_start(file, line, "File %s is not a symlink", path);
1911 assertion_make_dir(const char *file, int line, const char *dirname, int mode)
1913 assertion_count(file, line);
1921 assertion_file_mode(file, line, dirname, mode);
1926 failure_start(file, line, "Could not create directory %s", dirname);
1933 assertion_make_file(const char *file, int line,
1940 assertion_count(file, line);
1943 failure_start(file, line, "Could not create file %s", path);
1956 failure_start(file, line,
1966 assertion_count(file, line);
1969 failure_start(file, line, "Could not create %s", path);
1974 failure_start(file, line, "Could not chmod %s", path);
1988 failure_start(file, line,
1996 assertion_file_mode(file, line, path, mode);
2003 assertion_make_hardlink(const char *file, int line,
2008 assertion_count(file, line);
2018 failure_start(file, line, "Could not create hardlink");
2031 assertion_make_symlink(const char *file, int line,
2035 assertion_count(file, line);
2040 assertion_count(file, line);
2046 failure_start(file, line, "Could not create symlink");
2055 assertion_umask(const char *file, int line, int mask)
2057 assertion_count(file, line);
2059 (void)line; /* UNUSED */
2066 assertion_utimes(const char *file, int line,
2079 assertion_count(file, line);
2084 failure_start(file, line, "Can't access %s\n", pathname);
2109 failure_start(file, line, "Can't SetFileTime %s\n", pathname);
2126 failure_start(file, line, "Can't stat %s\n", pathname);
2160 failure_start(file, line, "Can't utimes %s\n", pathname);
2170 assertion_compare_fflags(const char *file, int line, const char *patha,
2176 assertion_count(file, line);
2183 failure_start(file, line, "File flags should be identical: "
2190 failure_start(file, line, "File flags should be different: "
2202 assertion_count(file, line);
2205 failure_start(file, line, "Can't open %s\n", patha);
2218 failure_start(file, line, "Can't get flags %s\n", patha);
2224 failure_start(file, line, "Can't open %s\n", pathb);
2237 failure_start(file, line, "Can't get flags %s\n", pathb);
2242 failure_start(file, line, "File flags should be identical: "
2248 failure_start(file, line, "File flags should be different: "
2257 assertion_count(file, line);
2264 assertion_set_nodump(const char *file, int line, const char *pathname)
2269 assertion_count(file, line);
2272 failure_start(file, line, "Can't set nodump %s\n", pathname);
2282 assertion_count(file, line);
2285 failure_start(file, line, "Can't open %s\n", pathname);
2297 failure_start(file, line, "Can't get flags %s\n", pathname);
2315 failure_start(file, line, "Can't set nodump %s\n", pathname);
2322 assertion_count(file, line);
2425 /* All terminated by end-of-line. */
3057 * Call standard system() call, but build up the command line using
3166 /* Read up to and including the 'begin' line. */
3272 assertion_entry_set_acls(const char *file, int line, struct archive_entry *ae,
3277 assertion_count(file, line);
3287 failure_start(file, line, "type=%#010x, "
3333 assertion_entry_compare_acls(const char *file, int line,
3343 assertion_count(file, line);
3357 failure_start(file, line, "No ACL's to compare, type mask: %d",
3376 failure_start(file, line, "No match for "
3382 failure_start(file, line, "USER_OBJ permset "
3391 failure_start(file, line, "No match for "
3397 failure_start(file, line, "GROUP_OBJ permset "
3406 failure_start(file, line, "No match for "
3412 failure_start(file, line, "OTHER permset "
3419 failure_start(file, line, "Could not find match for "
3427 failure_start(file, line, "Should not exit before EOF");
3433 failure_start(file, line, "Mode (%02o) and entry mode (%02o) "
3439 failure_start(file, line, "Could not find match for ACL "
3461 * a line like
3527 case VERBOSITY_PASSFAIL: /* rest of line will include ok/FAIL marker */