Lines Matching refs:path
34 char path[PATH_MAX]; in MakeTree() local
36 snprintf(path, sizeof(path), "%s/dir", root); in MakeTree()
37 ASSERT_EQ(0, mkdir(path, 0755)) << path; in MakeTree()
38 snprintf(path, sizeof(path), "%s/dir/sub", root); in MakeTree()
39 ASSERT_EQ(0, mkdir(path, 0555)) << path; in MakeTree()
40 snprintf(path, sizeof(path), "%s/unreadable-dir", root); in MakeTree()
41 ASSERT_EQ(0, mkdir(path, 0000)) << path; in MakeTree()
43 snprintf(path, sizeof(path), "%s/dangler", root); in MakeTree()
44 ASSERT_EQ(0, symlink("/does-not-exist", path)); in MakeTree()
45 snprintf(path, sizeof(path), "%s/symlink", root); in MakeTree()
46 ASSERT_EQ(0, symlink("dir/sub", path)); in MakeTree()
49 snprintf(path, sizeof(path), "%s/regular", root); in MakeTree()
50 ASSERT_NE(-1, fd = open(path, O_CREAT|O_TRUNC, 0666)); in MakeTree()
107 MakeTree(root.path); in TEST()
108 ASSERT_EQ(0, ftw(root.path, check_ftw, 128)); in TEST()
113 MakeTree(root.path); in TEST()
114 ASSERT_EQ(0, ftw64(root.path, check_ftw64, 128)); in TEST()
119 MakeTree(root.path); in TEST()
120 ASSERT_EQ(0, nftw(root.path, check_nftw, 128, 0)); in TEST()
125 MakeTree(root.path); in TEST()
126 ASSERT_EQ(0, nftw64(root.path, check_nftw64, 128, 0)); in TEST()
130 static int bug_28197840_ftw(const char* path, const StatT*, int flag) { in bug_28197840_ftw() argument
131 EXPECT_EQ(strstr(path, "unreadable") != nullptr ? FTW_DNR : FTW_D, flag) << path; in bug_28197840_ftw()
136 static int bug_28197840_nftw(const char* path, const StatT* sb, int flag, FTW*) { in bug_28197840_nftw() argument
137 return bug_28197840_ftw(path, sb, flag); in bug_28197840_nftw()
150 std::string path = android::base::StringPrintf("%s/unreadable-directory", root.path); in TEST() local
151 ASSERT_EQ(0, mkdir(path.c_str(), 0000)) << path; in TEST()
153 ASSERT_EQ(0, ftw(root.path, bug_28197840_ftw<struct stat>, 128)); in TEST()
154 ASSERT_EQ(0, ftw64(root.path, bug_28197840_ftw<struct stat64>, 128)); in TEST()
155 ASSERT_EQ(0, nftw(root.path, bug_28197840_nftw<struct stat>, 128, FTW_PHYS)); in TEST()
156 ASSERT_EQ(0, nftw64(root.path, bug_28197840_nftw<struct stat64>, 128, FTW_PHYS)); in TEST()