Lines Matching refs:dirfd
410 static int test_open_rel(const int dirfd, const char *const path, in test_open_rel() argument
416 fd = openat(dirfd, path, flags | O_CLOEXEC); in test_open_rel()
1848 int dirfd, ruleset_fd; in test_relative_path() local
1878 dirfd = open(dir_s1d2, O_DIRECTORY); in test_relative_path()
1879 ASSERT_LE(0, dirfd); in test_relative_path()
1883 dirfd = AT_FDCWD; in test_relative_path()
1891 dirfd = AT_FDCWD; in test_relative_path()
1899 dirfd = AT_FDCWD; in test_relative_path()
1904 test_open_rel(dirfd, "..", O_RDONLY)); in test_relative_path()
1905 ASSERT_EQ(0, test_open_rel(dirfd, ".", O_RDONLY)); in test_relative_path()
1909 ASSERT_EQ(0, test_open_rel(dirfd, "./s2d3", O_RDONLY)); in test_relative_path()
1912 ASSERT_EQ(0, test_open_rel(dirfd, "./s1d3", O_RDONLY)); in test_relative_path()
1917 ASSERT_EQ(0, test_open_rel(dirfd, "/..", O_RDONLY)); in test_relative_path()
1918 ASSERT_EQ(0, test_open_rel(dirfd, "/", O_RDONLY)); in test_relative_path()
1919 ASSERT_EQ(0, test_open_rel(dirfd, "/f1", O_RDONLY)); in test_relative_path()
1920 ASSERT_EQ(0, test_open_rel(dirfd, "/s1d3", O_RDONLY)); in test_relative_path()
1924 ASSERT_EQ(EACCES, test_open_rel(dirfd, "../../s1d1", O_RDONLY)); in test_relative_path()
1925 ASSERT_EQ(0, test_open_rel(dirfd, "../../s1d1/s1d2", O_RDONLY)); in test_relative_path()
1926 ASSERT_EQ(0, test_open_rel(dirfd, "../../s1d1/s1d2/s1d3", in test_relative_path()
1929 ASSERT_EQ(EACCES, test_open_rel(dirfd, "../../s2d1", O_RDONLY)); in test_relative_path()
1930 ASSERT_EQ(0, test_open_rel(dirfd, "../../s2d1/s2d2", O_RDONLY)); in test_relative_path()
1931 ASSERT_EQ(0, test_open_rel(dirfd, "../../s2d1/s2d2/s2d3", in test_relative_path()
1936 ASSERT_EQ(0, close(dirfd)); in test_relative_path()