Home
last modified time | relevance | path

Searched refs:fsfd (Results 1 – 5 of 5) sorted by relevance

/linux/tools/testing/selftests/filesystems/
H A Dfclog.c51 int fsfd = fsopen("tmpfs", FSOPEN_CLOEXEC); in TEST_F() local
52 ASSERT_SUCCESS(fsfd); in TEST_F()
57 ASSERT_ERRNO_EQ(-ENODATA, read(fsfd, buf, sizeof(buf))); in TEST_F()
59 ASSERT_SUCCESS(close(fsfd)); in TEST_F()
64 int fsfd = fsopen("tmpfs", FSOPEN_CLOEXEC); in TEST_F() local
65 ASSERT_SUCCESS(fsfd); in TEST_F()
67 ASSERT_ERRNO_EQ(-EINVAL, fsconfig(fsfd, FSCONFIG_SET_STRING, "invalid-arg", "123", 0)); in TEST_F()
70 ASSERT_SUCCESS(read(fsfd, buf, sizeof(buf))); in TEST_F()
74 ASSERT_ERRNO_EQ(-ENODATA, read(fsfd, buf, sizeof(buf))); in TEST_F()
75 ASSERT_SUCCESS(close(fsfd)); in TEST_F()
[all …]
/linux/tools/testing/selftests/filesystems/overlayfs/
H A Ddev_in_maps.c52 int tmpfs, fsfd, ovl; in ovl_mount() local
54 fsfd = sys_fsopen("tmpfs", 0); in ovl_mount()
55 if (fsfd == -1) in ovl_mount()
58 if (sys_fsconfig(fsfd, FSCONFIG_CMD_CREATE, NULL, NULL, 0) == -1) in ovl_mount()
61 tmpfs = sys_fsmount(fsfd, 0, 0); in ovl_mount()
65 close(fsfd); in ovl_mount()
77 fsfd = sys_fsopen("overlay", 0); in ovl_mount()
78 if (fsfd == -1) in ovl_mount()
80 if (sys_fsconfig(fsfd, FSCONFIG_SET_STRING, "source", "test", 0) == -1 || in ovl_mount()
81 sys_fsconfig(fsfd, FSCONFIG_SET_STRING, "lowerdir", "/tmp/l", 0) == -1 || in ovl_mount()
[all …]
/linux/tools/testing/selftests/proc/
H A Dproc-pidns.c118 int fsfd = fsopen("proc", FSOPEN_CLOEXEC); in TEST_F()
119 ASSERT_SUCCESS(fsfd); in TEST_F()
121 ASSERT_SUCCESS(fsconfig(fsfd, FSCONFIG_SET_STRING, "pidns", "/tmp/dummy/pidns", 0)); in TEST_F()
122 ASSERT_SUCCESS(fsconfig(fsfd, FSCONFIG_CMD_CREATE, NULL, NULL, 0)); in TEST_F()
124 int mountfd = fsmount(fsfd, FSMOUNT_CLOEXEC, 0); in TEST_F()
130 ASSERT_SUCCESS(close(fsfd)); in TEST_F()
136 int fsfd = fsopen("proc", FSOPEN_CLOEXEC); in TEST_F()
137 ASSERT_SUCCESS(fsfd); in TEST_F()
139 ASSERT_SUCCESS(fsconfig(fsfd, FSCONFIG_SET_FD, "pidns", NULL, self->dummy_pidns)); in TEST_F()
140 ASSERT_SUCCESS(fsconfig(fsfd, FSCONFIG_CMD_CREAT in TEST_F()
117 int fsfd = fsopen("proc", FSOPEN_CLOEXEC); TEST_F() local
135 int fsfd = fsopen("proc", FSOPEN_CLOEXEC); TEST_F() local
167 int fsfd = fsopen("proc", FSOPEN_CLOEXEC); TEST_F() local
190 int fsfd = fsopen("proc", FSOPEN_CLOEXEC); TEST_F() local
[all...]
H A Dproc-fsconfig-hidepid.c35 int fsfd, ret; in main() local
38 assert((fsfd = fsopen("proc", 0)) != -1); in main()
40 ret = fsconfig(fsfd, FSCONFIG_SET_BINARY, "hidepid", &hidepid, 0); in main()
44 assert(!fsconfig(fsfd, FSCONFIG_SET_STRING, "hidepid", "2", 0)); in main()
45 assert(!fsconfig(fsfd, FSCONFIG_SET_STRING, "hidepid", "invisible", 0)); in main()
47 assert(!close(fsfd)); in main()
/linux/samples/vfs/
H A Dtest-fsmount.c77 static inline int fsmount(int fsfd, unsigned int flags, unsigned int ms_flags) in fsmount() argument
79 return syscall(__NR_fsmount, fsfd, flags, ms_flags); in fsmount()
82 static inline int fsconfig(int fsfd, unsigned int cmd, in fsconfig() argument
85 return syscall(__NR_fsconfig, fsfd, cmd, key, val, aux); in fsconfig()
105 int fsfd, mfd; in main() local
108 fsfd = fsopen("afs", 0); in main()
109 if (fsfd == -1) { in main()
114 E_fsconfig(fsfd, FSCONFIG_SET_STRING, "source", "#grand.central.org:root.cell.", 0); in main()
115 E_fsconfig(fsfd, FSCONFIG_CMD_CREATE, NULL, NULL, 0); in main()
117 mfd = fsmount(fsfd, 0, MOUNT_ATTR_RDONLY); in main()
[all …]