Lines Matching refs:pathname

440 assertion_chdir(const char *file, int line, const char *pathname)
443 if (chdir(pathname) == 0)
445 failure_start(file, line, "chdir(\"%s\")", pathname);
1010 const char *pathname, const char *lines[])
1022 buff = slurpfile(&buff_size, "%s", pathname);
1024 failure_start(pathname, line, "Can't read file: %s", pathname);
1037 failure_start(pathname, line, "Can't allocate memory");
1059 failure_start(pathname, line, "Can't allocate memory");
1103 failure_start(file, line, "File doesn't match: %s", pathname);
1192 /* Verify a/b/mtime of 'pathname'. */
1196 const char *pathname, long t, long nsec, char type, int recent)
1212 * the pathname is a directory. */
1213 h = CreateFile(pathname, FILE_READ_ATTRIBUTES, 0, NULL,
1216 failure_start(file, line, "Can't access %s\n", pathname);
1228 failure_start(file, line, "Can't GetFileTime %s\n", pathname);
1241 r = lstat(pathname, &st);
1243 failure_start(file, line, "Can't stat %s\n", pathname);
1280 pathname, type, filet, now - filet);
1287 pathname, type, filet, filet_nsec, t, nsec);
1294 /* Verify atime of 'pathname'. */
1297 const char *pathname, long t, long nsec)
1299 return assertion_file_time(file, line, pathname, t, nsec, 'a', 0);
1302 /* Verify atime of 'pathname' is up-to-date. */
1304 assertion_file_atime_recent(const char *file, int line, const char *pathname)
1306 return assertion_file_time(file, line, pathname, 0, 0, 'a', 1);
1309 /* Verify birthtime of 'pathname'. */
1312 const char *pathname, long t, long nsec)
1314 return assertion_file_time(file, line, pathname, t, nsec, 'b', 0);
1317 /* Verify birthtime of 'pathname' is up-to-date. */
1320 const char *pathname)
1322 return assertion_file_time(file, line, pathname, 0, 0, 'b', 1);
1325 /* Verify mtime of 'pathname'. */
1328 const char *pathname, long t, long nsec)
1330 return assertion_file_time(file, line, pathname, t, nsec, 'm', 0);
1333 /* Verify mtime of 'pathname' is up-to-date. */
1335 assertion_file_mtime_recent(const char *file, int line, const char *pathname)
1337 return assertion_file_time(file, line, pathname, 0, 0, 'm', 1);
1340 /* Verify number of links to 'pathname'. */
1343 const char *pathname, int nlinks)
1350 r = my_GetFileInformationByName(pathname, &bhfi);
1354 pathname, bhfi.nNumberOfLinks, nlinks);
1362 r = lstat(pathname, &st);
1366 pathname, st.st_nlink, nlinks);
1372 /* Verify size of 'pathname'. */
1374 assertion_file_size(const char *file, int line, const char *pathname, long size)
1383 r = !my_GetFileInformationByName(pathname, &bhfi);
1389 r = lstat(pathname, &st);
1396 pathname, (long)filesize, (long)size);
1401 /* Assert that 'pathname' is a dir. If mode >= 0, verify that too. */
1403 assertion_is_dir(const char *file, int line, const char *pathname, int mode)
1412 r = lstat(pathname, &st);
1414 failure_start(file, line, "Dir should exist: %s", pathname);
1419 failure_start(file, line, "%s is not a dir", pathname);
1428 failure_start(file, line, "Dir %s has wrong mode", pathname);
1438 /* Verify that 'pathname' is a regular file. If 'mode' is >= 0,
1441 assertion_is_reg(const char *file, int line, const char *pathname, int mode)
1450 r = lstat(pathname, &st);
1452 failure_start(file, line, "File should exist: %s", pathname);
1461 failure_start(file, line, "File %s has wrong mode", pathname);
1471 /* Check whether 'pathname' is a symbolic link. If 'contents' is
1475 const char *pathname, const char *contents)
1478 (void)pathname; /* UNUSED */
1492 r = lstat(pathname, &st);
1495 "Symlink should exist: %s", pathname);
1503 linklen = readlink(pathname, buff, sizeof(buff));
1505 failure_start(file, line, "Can't read symlink %s", pathname);
1673 const char *pathname, long at, long at_nsec, long mt, long mt_nsec)
1686 h = CreateFileA(pathname,GENERIC_READ | GENERIC_WRITE,
1690 failure_start(file, line, "Can't access %s\n", pathname);
1715 failure_start(file, line, "Can't SetFileTime %s\n", pathname);
1730 r = lstat(pathname, &st);
1732 failure_start(file, line, "Can't stat %s\n", pathname);
1761 r = lutimes(pathname, times);
1763 r = utimes(pathname, times);
1766 failure_start(file, line, "Can't utimes %s\n", pathname);
1776 assertion_nodump(const char *file, int line, const char *pathname)
1782 r = chflags(pathname, UF_NODUMP);
1784 failure_start(file, line, "Can't set nodump %s\n", pathname);
1793 fd = open(pathname, O_RDONLY | O_NONBLOCK);
1795 failure_start(file, line, "Can't open %s\n", pathname);
1801 failure_start(file, line, "Can't get flags %s\n", pathname);
1808 failure_start(file, line, "Can't set nodump %s\n", pathname);
1814 (void)pathname; /* UNUSED */