Lines Matching refs:dirfd

245 static int test_open_rel(const int dirfd, const char *const path, const int flags)  in test_open_rel()  argument
250 fd = openat(dirfd, path, flags | O_CLOEXEC); in test_open_rel()
1389 int dirfd, ruleset_fd; in test_relative_path() local
1419 dirfd = open(dir_s1d2, O_DIRECTORY); in test_relative_path()
1420 ASSERT_LE(0, dirfd); in test_relative_path()
1424 dirfd = AT_FDCWD; in test_relative_path()
1431 dirfd = AT_FDCWD; in test_relative_path()
1438 dirfd = AT_FDCWD; in test_relative_path()
1443 test_open_rel(dirfd, "..", O_RDONLY)); in test_relative_path()
1444 ASSERT_EQ(0, test_open_rel(dirfd, ".", O_RDONLY)); in test_relative_path()
1448 ASSERT_EQ(0, test_open_rel(dirfd, "./s2d3", O_RDONLY)); in test_relative_path()
1451 ASSERT_EQ(0, test_open_rel(dirfd, "./s1d3", O_RDONLY)); in test_relative_path()
1456 ASSERT_EQ(0, test_open_rel(dirfd, "/..", O_RDONLY)); in test_relative_path()
1457 ASSERT_EQ(0, test_open_rel(dirfd, "/", O_RDONLY)); in test_relative_path()
1458 ASSERT_EQ(0, test_open_rel(dirfd, "/f1", O_RDONLY)); in test_relative_path()
1459 ASSERT_EQ(0, test_open_rel(dirfd, "/s1d3", O_RDONLY)); in test_relative_path()
1463 ASSERT_EQ(EACCES, test_open_rel(dirfd, "../../s1d1", O_RDONLY)); in test_relative_path()
1464 ASSERT_EQ(0, test_open_rel(dirfd, "../../s1d1/s1d2", O_RDONLY)); in test_relative_path()
1465 ASSERT_EQ(0, test_open_rel(dirfd, "../../s1d1/s1d2/s1d3", O_RDONLY)); in test_relative_path()
1467 ASSERT_EQ(EACCES, test_open_rel(dirfd, "../../s2d1", O_RDONLY)); in test_relative_path()
1468 ASSERT_EQ(0, test_open_rel(dirfd, "../../s2d1/s2d2", O_RDONLY)); in test_relative_path()
1469 ASSERT_EQ(0, test_open_rel(dirfd, "../../s2d1/s2d2/s2d3", O_RDONLY)); in test_relative_path()
1473 ASSERT_EQ(0, close(dirfd)); in test_relative_path()