Home
last modified time | relevance | path

Searched refs:dfd (Results 1 – 11 of 11) sorted by relevance

/tools/testing/selftests/fchmodat2/
A Dfchmodat2_test.c21 int dfd, ret; in setup_testdir() local
28 dfd = open(dirname, O_PATH | O_DIRECTORY); in setup_testdir()
29 if (dfd < 0) in setup_testdir()
38 ret = symlinkat("regfile", dfd, "symlink"); in setup_testdir()
43 return dfd; in setup_testdir()
60 int dfd, ret; in test_regfile() local
62 dfd = setup_testdir(); in test_regfile()
69 if (!expect_mode(dfd, "regfile", 0100640)) in test_regfile()
79 if (!expect_mode(dfd, "regfile", 0100600)) in test_regfile()
88 int dfd, ret; in test_symlink() local
[all …]
/tools/testing/selftests/openat2/
A Drename_attack_test.c37 int dfd; in setup_testdir() local
43 dfd = open(dirname, O_PATH | O_DIRECTORY); in setup_testdir()
44 if (dfd < 0) in setup_testdir()
47 E_mkdirat(dfd, "a", 0755); in setup_testdir()
48 E_mkdirat(dfd, "b", 0755); in setup_testdir()
49 E_mkdirat(dfd, "a/c", 0755); in setup_testdir()
51 return dfd; in setup_testdir()
86 int dfd, afd; in test_rename_attack() local
101 dfd = setup_testdir(); in test_rename_attack()
102 afd = openat(dfd, "a", O_PATH); in test_rename_attack()
[all …]
A Dhelpers.c22 int raw_openat2(int dfd, const char *path, void *how, size_t size) in raw_openat2() argument
24 int ret = syscall(__NR_openat2, dfd, path, how, size); in raw_openat2()
28 int sys_openat2(int dfd, const char *path, struct open_how *how) in sys_openat2() argument
30 return raw_openat2(dfd, path, how, sizeof(*how)); in sys_openat2()
33 int sys_openat(int dfd, const char *path, struct open_how *how) in sys_openat() argument
35 int ret = openat(dfd, path, how->flags, how->mode); in sys_openat()
47 int touchat(int dfd, const char *path) in touchat() argument
49 int fd = openat(dfd, path, O_CREAT, 0700); in touchat()
71 bool fdequal(int fd, int dfd, const char *path) in fdequal() argument
77 dfdpath = fdreadlink(dfd); in fdequal()
A Dresolve_test.c49 int dfd, tmpfd; in setup_testdir() local
60 if (dfd < 0) in setup_testdir()
68 close(dfd); in setup_testdir()
69 dfd = tmpfd; in setup_testdir()
76 E_mkdirat(dfd, "mnt", 0755); in setup_testdir()
77 E_fchdir(dfd); in setup_testdir()
82 E_mkdirat(dfd, "etc", 0755); in setup_testdir()
106 return dfd; in setup_testdir()
442 int dfd, fd; in test_openat2_opath_tests() local
461 dfd = dup(rootfd); in test_openat2_opath_tests()
[all …]
A Dhelpers.h96 int raw_openat2(int dfd, const char *path, void *how, size_t size);
97 int sys_openat2(int dfd, const char *path, struct open_how *how);
98 int sys_openat(int dfd, const char *path, struct open_how *how);
102 int touchat(int dfd, const char *path);
104 bool fdequal(int fd, int dfd, const char *path);
/tools/testing/selftests/filesystems/
A Dwrappers.h103 static inline int sys_open_tree(int dfd, const char *filename, unsigned int flags) in sys_open_tree() argument
105 return syscall(__NR_open_tree, dfd, filename, flags); in sys_open_tree()
/tools/testing/selftests/mount_setattr/
A Dmount_setattr_test.c138 static inline int sys_mount_setattr(int dfd, const char *path, unsigned int flags, in sys_mount_setattr() argument
141 return syscall(__NR_mount_setattr, dfd, path, flags, attr, size); in sys_mount_setattr()
144 static inline int sys_open_tree_attr(int dfd, const char *path, unsigned int flags, in sys_open_tree_attr() argument
147 return syscall(__NR_open_tree_attr, dfd, path, flags, attr, size); in sys_open_tree_attr()
661 int fd, dfd; in TEST_F() local
705 dfd = open("/mnt/A/AA/B", O_DIRECTORY | O_CLOEXEC); in TEST_F()
706 ASSERT_GE(dfd, 0); in TEST_F()
707 EXPECT_EQ(fsync(dfd), 0); in TEST_F()
708 EXPECT_EQ(close(dfd), 0); in TEST_F()
1362 static bool expected_uid_gid(int dfd, const char *path, int flags, in expected_uid_gid() argument
[all …]
/tools/perf/Documentation/
A Dperf-trace.txt295 2272.992 ( 0.037 ms): gnome-shell/1370 openat(dfd: CWD, filename: /proc/self/stat) = 31
296 2277.481 ( 0.139 ms): gnome-shell/3039 openat(dfd: CWD, filename: /proc/self/stat) = 65
297 3026.398 ( 0.076 ms): gnome-shell/3039 openat(dfd: CWD, filename: /proc/self/stat) = 65
298 4294.665 ( 0.015 ms): sed/15879 openat(dfd: CWD, filename: /etc/ld.so.cache, flags: CLOEXEC) = 3
/tools/testing/selftests/iommu/
A Diommufd_fail_nth.c27 static int writeat(int dfd, const char *fn, const char *val) in writeat() argument
33 fd = openat(dfd, fn, O_WRONLY); in writeat()
/tools/testing/selftests/bpf/prog_tests/
A Dtoken.c36 static inline int sys_fspick(int dfd, const char *path, unsigned flags) in sys_fspick() argument
38 return syscall(__NR_fspick, dfd, path, flags); in sys_fspick()
/tools/testing/selftests/landlock/
A Dfs_test.c57 int open_tree(int dfd, const char *filename, unsigned int flags) in open_tree() argument
59 return syscall(__NR_open_tree, dfd, filename, flags); in open_tree()

Completed in 24 milliseconds