Lines Matching full:how
158 struct open_how how; member
169 .how.flags = O_TMPFILE | O_PATH | O_RDWR, .err = -EINVAL }, in test_openat2_flags()
171 .how.flags = O_TMPFILE | O_CREAT | O_RDWR, .err = -EINVAL }, in test_openat2_flags()
175 .how.flags = O_PATH | O_CLOEXEC }, in test_openat2_flags()
177 .how.flags = O_PATH | O_DIRECTORY }, in test_openat2_flags()
179 .how.flags = O_PATH | O_NOFOLLOW }, in test_openat2_flags()
182 .how.flags = O_PATH | O_RDWR, .err = -EINVAL }, in test_openat2_flags()
184 .how.flags = O_PATH | O_CREAT, .err = -EINVAL }, in test_openat2_flags()
186 .how.flags = O_PATH | O_EXCL, .err = -EINVAL }, in test_openat2_flags()
188 .how.flags = O_PATH | O_NOCTTY, .err = -EINVAL }, in test_openat2_flags()
190 .how.flags = O_PATH | O_DIRECT, .err = -EINVAL }, in test_openat2_flags()
192 .how.flags = O_PATH | O_LARGEFILE, .err = -EINVAL }, in test_openat2_flags()
195 { .name = "non-zero how.mode and O_RDONLY", in test_openat2_flags()
196 .how.flags = O_RDONLY, .how.mode = 0600, .err = -EINVAL }, in test_openat2_flags()
197 { .name = "non-zero how.mode and O_PATH", in test_openat2_flags()
198 .how.flags = O_PATH, .how.mode = 0600, .err = -EINVAL }, in test_openat2_flags()
199 { .name = "valid how.mode and O_CREAT", in test_openat2_flags()
200 .how.flags = O_CREAT, .how.mode = 0600 }, in test_openat2_flags()
201 { .name = "valid how.mode and O_TMPFILE", in test_openat2_flags()
202 .how.flags = O_TMPFILE | O_RDWR, .how.mode = 0600 }, in test_openat2_flags()
204 { .name = "invalid how.mode and O_CREAT", in test_openat2_flags()
205 .how.flags = O_CREAT, in test_openat2_flags()
206 .how.mode = 0xFFFF, .err = -EINVAL }, in test_openat2_flags()
207 { .name = "invalid (very large) how.mode and O_CREAT", in test_openat2_flags()
208 .how.flags = O_CREAT, in test_openat2_flags()
209 .how.mode = 0xC000000000000000ULL, .err = -EINVAL }, in test_openat2_flags()
210 { .name = "invalid how.mode and O_TMPFILE", in test_openat2_flags()
211 .how.flags = O_TMPFILE | O_RDWR, in test_openat2_flags()
212 .how.mode = 0x1337, .err = -EINVAL }, in test_openat2_flags()
213 { .name = "invalid (very large) how.mode and O_TMPFILE", in test_openat2_flags()
214 .how.flags = O_TMPFILE | O_RDWR, in test_openat2_flags()
215 .how.mode = 0x0000A00000000000ULL, .err = -EINVAL }, in test_openat2_flags()
219 .how.flags = O_RDONLY, in test_openat2_flags()
220 .how.resolve = RESOLVE_BENEATH | RESOLVE_IN_ROOT, in test_openat2_flags()
224 { .name = "invalid how.resolve and O_RDONLY", in test_openat2_flags()
225 .how.flags = O_RDONLY, in test_openat2_flags()
226 .how.resolve = 0x1337, .err = -EINVAL }, in test_openat2_flags()
227 { .name = "invalid how.resolve and O_CREAT", in test_openat2_flags()
228 .how.flags = O_CREAT, in test_openat2_flags()
229 .how.resolve = 0x1337, .err = -EINVAL }, in test_openat2_flags()
230 { .name = "invalid how.resolve and O_TMPFILE", in test_openat2_flags()
231 .how.flags = O_TMPFILE | O_RDWR, in test_openat2_flags()
232 .how.resolve = 0x1337, .err = -EINVAL }, in test_openat2_flags()
233 { .name = "invalid how.resolve and O_PATH", in test_openat2_flags()
234 .how.flags = O_PATH, in test_openat2_flags()
235 .how.resolve = 0x1337, .err = -EINVAL }, in test_openat2_flags()
239 .how.flags = O_RDONLY | (1ULL << 63), in test_openat2_flags()
240 .how.resolve = 0, .err = -EINVAL }, in test_openat2_flags()
258 path = (test->how.flags & O_CREAT) ? "/tmp/ksft.openat2_tmpfile" : "."; in test_openat2_flags()
261 fd = sys_openat2(AT_FDCWD, path, &test->how); in test_openat2_flags()
291 if (test->how.flags & O_CREAT) in test_openat2_flags()
293 if (!(test->how.flags & O_LARGEFILE)) in test_openat2_flags()
295 failed |= (fdflags != test->how.flags); in test_openat2_flags()
305 test->how.flags); in test_openat2_flags()