Home
last modified time | relevance | path

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

/tools/testing/selftests/fchmodat2/
Dfchmodat2_test.c12 int sys_fchmodat2(int dfd, const char *filename, mode_t mode, int flags) in sys_fchmodat2() argument
14 int ret = syscall(__NR_fchmodat2, dfd, filename, mode, flags); in sys_fchmodat2()
21 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()
32 ret = openat(dfd, "regfile", O_CREAT | O_WRONLY | O_TRUNC, 0644); in setup_testdir()
38 ret = symlinkat("regfile", dfd, "symlink"); in setup_testdir()
43 return dfd; in setup_testdir()
46 int expect_mode(int dfd, const char *filename, mode_t expect_mode) in expect_mode() argument
49 int ret = fstatat(dfd, filename, &st, AT_SYMLINK_NOFOLLOW); in expect_mode()
[all …]
/tools/testing/selftests/openat2/
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 …]
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()
Dresolve_test.c49 int dfd, tmpfd; in setup_testdir() local
59 dfd = open(dirname, O_PATH | O_DIRECTORY); in setup_testdir()
60 if (dfd < 0) in setup_testdir()
64 E_mkdirat(dfd, "root", 0755); in setup_testdir()
65 tmpfd = openat(dfd, "root", O_PATH | O_DIRECTORY); in setup_testdir()
68 close(dfd); in setup_testdir()
69 dfd = tmpfd; in setup_testdir()
71 E_symlinkat("/proc/self/exe", dfd, "procexe"); in setup_testdir()
72 E_symlinkat("/proc/self/root", dfd, "procroot"); in setup_testdir()
73 E_mkdirat(dfd, "root", 0755); in setup_testdir()
[all …]
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/mount_setattr/
Dmount_setattr_test.c137 static inline int sys_mount_setattr(int dfd, const char *path, unsigned int flags, in sys_mount_setattr() argument
140 return syscall(__NR_mount_setattr, dfd, path, flags, attr, size); in sys_mount_setattr()
155 static inline int sys_open_tree(int dfd, const char *filename, unsigned int flags) in sys_open_tree() argument
157 return syscall(__NR_open_tree, dfd, filename, flags); in sys_open_tree()
667 int fd, dfd; in TEST_F() local
711 dfd = open("/mnt/A/AA/B", O_DIRECTORY | O_CLOEXEC); in TEST_F()
712 ASSERT_GE(dfd, 0); in TEST_F()
713 EXPECT_EQ(fsync(dfd), 0); in TEST_F()
714 EXPECT_EQ(close(dfd), 0); in TEST_F()
1391 static bool expected_uid_gid(int dfd, const char *path, int flags, in expected_uid_gid() argument
[all …]
/tools/perf/Documentation/
Dperf-trace.txt287 2272.992 ( 0.037 ms): gnome-shell/1370 openat(dfd: CWD, filename: /proc/self/stat) = 31
288 2277.481 ( 0.139 ms): gnome-shell/3039 openat(dfd: CWD, filename: /proc/self/stat) = 65
289 3026.398 ( 0.076 ms): gnome-shell/3039 openat(dfd: CWD, filename: /proc/self/stat) = 65
290 4294.665 ( 0.015 ms): sed/15879 openat(dfd: CWD, filename: /etc/ld.so.cache, flags: CLOEXEC) = 3
/tools/testing/selftests/iommu/
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/
Dtoken.c35 static inline int sys_fspick(int dfd, const char *path, unsigned flags) in sys_fspick() argument
37 return syscall(__NR_fspick, dfd, path, flags); in sys_fspick()
/tools/testing/selftests/landlock/
Dfs_test.c52 int open_tree(int dfd, const char *filename, unsigned int flags) in open_tree() argument
54 return syscall(__NR_open_tree, dfd, filename, flags); in open_tree()