Lines Matching refs:path
32 char path[PATH_MAX]; in MakeTree() local
34 snprintf(path, sizeof(path), "%s/dir", root); in MakeTree()
35 ASSERT_EQ(0, mkdir(path, 0755)) << path; in MakeTree()
36 snprintf(path, sizeof(path), "%s/dir/sub", root); in MakeTree()
37 ASSERT_EQ(0, mkdir(path, 0555)) << path; in MakeTree()
38 snprintf(path, sizeof(path), "%s/unreadable-dir", root); in MakeTree()
39 ASSERT_EQ(0, mkdir(path, 0000)) << path; in MakeTree()
41 snprintf(path, sizeof(path), "%s/dangler", root); in MakeTree()
42 ASSERT_EQ(0, symlink("/does-not-exist", path)); in MakeTree()
43 snprintf(path, sizeof(path), "%s/symlink", root); in MakeTree()
44 ASSERT_EQ(0, symlink("dir/sub", path)); in MakeTree()
47 snprintf(path, sizeof(path), "%s/regular", root); in MakeTree()
48 ASSERT_NE(-1, fd = open(path, O_CREAT|O_TRUNC, 0666)); in MakeTree()
105 MakeTree(root.path); in TEST()
106 ASSERT_EQ(0, ftw(root.path, check_ftw, 128)); in TEST()
111 MakeTree(root.path); in TEST()
112 ASSERT_EQ(0, ftw64(root.path, check_ftw64, 128)); in TEST()
117 MakeTree(root.path); in TEST()
118 ASSERT_EQ(0, nftw(root.path, check_nftw, 128, 0)); in TEST()
123 MakeTree(root.path); in TEST()
124 ASSERT_EQ(0, nftw64(root.path, check_nftw64, 128, 0)); in TEST()
128 static int bug_28197840_ftw(const char* path, const StatT*, int flag) { in bug_28197840_ftw() argument
129 EXPECT_EQ(strstr(path, "unreadable") != nullptr ? FTW_DNR : FTW_D, flag) << path; in bug_28197840_ftw()
134 static int bug_28197840_nftw(const char* path, const StatT* sb, int flag, FTW*) { in bug_28197840_nftw() argument
135 return bug_28197840_ftw(path, sb, flag); in bug_28197840_nftw()
148 std::string path = android::base::StringPrintf("%s/unreadable-directory", root.path); in TEST() local
149 ASSERT_EQ(0, mkdir(path.c_str(), 0000)) << path; in TEST()
151 ASSERT_EQ(0, ftw(root.path, bug_28197840_ftw<struct stat>, 128)); in TEST()
152 ASSERT_EQ(0, ftw64(root.path, bug_28197840_ftw<struct stat64>, 128)); in TEST()
153 ASSERT_EQ(0, nftw(root.path, bug_28197840_nftw<struct stat>, 128, FTW_PHYS)); in TEST()
154 ASSERT_EQ(0, nftw64(root.path, bug_28197840_nftw<struct stat64>, 128, FTW_PHYS)); in TEST()