Lines Matching refs:pathname

461 assertion_chdir(const char *file, int line, const char *pathname)
464 if (chdir(pathname) == 0)
466 failure_start(file, line, "chdir(\"%s\")", pathname);
1059 const char *pathname, const char *lines[])
1071 buff = slurpfile(&buff_size, "%s", pathname);
1073 failure_start(pathname, line, "Can't read file: %s", pathname);
1086 failure_start(pathname, line, "Can't allocate memory");
1108 failure_start(pathname, line, "Can't allocate memory");
1153 failure_start(file, line, "File doesn't match: %s", pathname);
1174 const char *pathname, const char *strings[])
1179 buff = slurpfile(NULL, "%s", pathname);
1181 failure_start(file, line, "Can't read file: %s", pathname);
1188 failure_start(file, line, "Invalid string in %s: %s", pathname,
1271 /* Verify a/b/mtime of 'pathname'. */
1275 const char *pathname, long t, long nsec, char type, int recent)
1291 * the pathname is a directory. */
1292 h = CreateFile(pathname, FILE_READ_ATTRIBUTES, 0, NULL,
1295 failure_start(file, line, "Can't access %s\n", pathname);
1307 failure_start(file, line, "Can't GetFileTime %s\n", pathname);
1320 r = lstat(pathname, &st);
1322 failure_start(file, line, "Can't stat %s\n", pathname);
1364 pathname, type, filet, now - filet);
1371 pathname, type, filet, filet_nsec, t, nsec);
1378 /* Verify atime of 'pathname'. */
1381 const char *pathname, long t, long nsec)
1383 return assertion_file_time(file, line, pathname, t, nsec, 'a', 0);
1386 /* Verify atime of 'pathname' is up-to-date. */
1388 assertion_file_atime_recent(const char *file, int line, const char *pathname)
1390 return assertion_file_time(file, line, pathname, 0, 0, 'a', 1);
1393 /* Verify birthtime of 'pathname'. */
1396 const char *pathname, long t, long nsec)
1398 return assertion_file_time(file, line, pathname, t, nsec, 'b', 0);
1401 /* Verify birthtime of 'pathname' is up-to-date. */
1404 const char *pathname)
1406 return assertion_file_time(file, line, pathname, 0, 0, 'b', 1);
1409 /* Verify mode of 'pathname'. */
1411 assertion_file_mode(const char *file, int line, const char *pathname, int expected_mode)
1421 (void)pathname; /* UNUSED */
1426 r = lstat(pathname, &st);
1432 pathname, mode, expected_mode);
1438 /* Verify mtime of 'pathname'. */
1441 const char *pathname, long t, long nsec)
1443 return assertion_file_time(file, line, pathname, t, nsec, 'm', 0);
1446 /* Verify mtime of 'pathname' is up-to-date. */
1448 assertion_file_mtime_recent(const char *file, int line, const char *pathname)
1450 return assertion_file_time(file, line, pathname, 0, 0, 'm', 1);
1453 /* Verify number of links to 'pathname'. */
1456 const char *pathname, int nlinks)
1463 r = my_GetFileInformationByName(pathname, &bhfi);
1467 pathname, bhfi.nNumberOfLinks, nlinks);
1475 r = lstat(pathname, &st);
1479 pathname, st.st_nlink, nlinks);
1485 /* Verify size of 'pathname'. */
1487 assertion_file_size(const char *file, int line, const char *pathname, long size)
1496 r = !my_GetFileInformationByName(pathname, &bhfi);
1502 r = lstat(pathname, &st);
1509 pathname, (long)filesize, (long)size);
1514 /* Assert that 'pathname' is a dir. If mode >= 0, verify that too. */
1516 assertion_is_dir(const char *file, int line, const char *pathname, int mode)
1525 r = lstat(pathname, &st);
1527 failure_start(file, line, "Dir should exist: %s", pathname);
1532 failure_start(file, line, "%s is not a dir", pathname);
1541 failure_start(file, line, "Dir %s has wrong mode", pathname);
1551 /* Verify that 'pathname' is a regular file. If 'mode' is >= 0,
1554 assertion_is_reg(const char *file, int line, const char *pathname, int mode)
1563 r = lstat(pathname, &st);
1565 failure_start(file, line, "File should exist: %s", pathname);
1574 failure_start(file, line, "File %s has wrong mode", pathname);
1584 /* Check whether 'pathname' is a symbolic link. If 'contents' is
1588 const char *pathname, const char *contents)
1591 (void)pathname; /* UNUSED */
1605 r = lstat(pathname, &st);
1608 "Symlink should exist: %s", pathname);
1616 linklen = readlink(pathname, buff, sizeof(buff));
1618 failure_start(file, line, "Can't read symlink %s", pathname);
1798 const char *pathname, long at, long at_nsec, long mt, long mt_nsec)
1811 h = CreateFileA(pathname,GENERIC_READ | GENERIC_WRITE,
1815 failure_start(file, line, "Can't access %s\n", pathname);
1840 failure_start(file, line, "Can't SetFileTime %s\n", pathname);
1855 r = lstat(pathname, &st);
1857 failure_start(file, line, "Can't stat %s\n", pathname);
1886 r = lutimes(pathname, times);
1888 r = utimes(pathname, times);
1891 failure_start(file, line, "Can't utimes %s\n", pathname);
1901 assertion_nodump(const char *file, int line, const char *pathname)
1907 r = chflags(pathname, UF_NODUMP);
1909 failure_start(file, line, "Can't set nodump %s\n", pathname);
1918 fd = open(pathname, O_RDONLY | O_NONBLOCK);
1920 failure_start(file, line, "Can't open %s\n", pathname);
1926 failure_start(file, line, "Can't get flags %s\n", pathname);
1933 failure_start(file, line, "Can't set nodump %s\n", pathname);
1939 (void)pathname; /* UNUSED */