Lines Matching full:how
154 struct open_how how; member
165 .how.flags = O_TMPFILE | O_PATH | O_RDWR, .err = -EINVAL }, in test_openat2_flags()
167 .how.flags = O_TMPFILE | O_CREAT | O_RDWR, .err = -EINVAL }, in test_openat2_flags()
171 .how.flags = O_PATH | O_CLOEXEC }, in test_openat2_flags()
173 .how.flags = O_PATH | O_DIRECTORY }, in test_openat2_flags()
175 .how.flags = O_PATH | O_NOFOLLOW }, in test_openat2_flags()
178 .how.flags = O_PATH | O_RDWR, .err = -EINVAL }, in test_openat2_flags()
180 .how.flags = O_PATH | O_CREAT, .err = -EINVAL }, in test_openat2_flags()
182 .how.flags = O_PATH | O_EXCL, .err = -EINVAL }, in test_openat2_flags()
184 .how.flags = O_PATH | O_NOCTTY, .err = -EINVAL }, in test_openat2_flags()
186 .how.flags = O_PATH | O_DIRECT, .err = -EINVAL }, in test_openat2_flags()
188 .how.flags = O_PATH | O_LARGEFILE, .err = -EINVAL }, in test_openat2_flags()
191 { .name = "non-zero how.mode and O_RDONLY", in test_openat2_flags()
192 .how.flags = O_RDONLY, .how.mode = 0600, .err = -EINVAL }, in test_openat2_flags()
193 { .name = "non-zero how.mode and O_PATH", in test_openat2_flags()
194 .how.flags = O_PATH, .how.mode = 0600, .err = -EINVAL }, in test_openat2_flags()
195 { .name = "valid how.mode and O_CREAT", in test_openat2_flags()
196 .how.flags = O_CREAT, .how.mode = 0600 }, in test_openat2_flags()
197 { .name = "valid how.mode and O_TMPFILE", in test_openat2_flags()
198 .how.flags = O_TMPFILE | O_RDWR, .how.mode = 0600 }, in test_openat2_flags()
200 { .name = "invalid how.mode and O_CREAT", in test_openat2_flags()
201 .how.flags = O_CREAT, in test_openat2_flags()
202 .how.mode = 0xFFFF, .err = -EINVAL }, in test_openat2_flags()
203 { .name = "invalid (very large) how.mode and O_CREAT", in test_openat2_flags()
204 .how.flags = O_CREAT, in test_openat2_flags()
205 .how.mode = 0xC000000000000000ULL, .err = -EINVAL }, in test_openat2_flags()
206 { .name = "invalid how.mode and O_TMPFILE", in test_openat2_flags()
207 .how.flags = O_TMPFILE | O_RDWR, in test_openat2_flags()
208 .how.mode = 0x1337, .err = -EINVAL }, in test_openat2_flags()
209 { .name = "invalid (very large) how.mode and O_TMPFILE", in test_openat2_flags()
210 .how.flags = O_TMPFILE | O_RDWR, in test_openat2_flags()
211 .how.mode = 0x0000A00000000000ULL, .err = -EINVAL }, in test_openat2_flags()
214 { .name = "invalid how.resolve and O_RDONLY", in test_openat2_flags()
215 .how.flags = O_RDONLY, in test_openat2_flags()
216 .how.resolve = 0x1337, .err = -EINVAL }, in test_openat2_flags()
217 { .name = "invalid how.resolve and O_CREAT", in test_openat2_flags()
218 .how.flags = O_CREAT, in test_openat2_flags()
219 .how.resolve = 0x1337, .err = -EINVAL }, in test_openat2_flags()
220 { .name = "invalid how.resolve and O_TMPFILE", in test_openat2_flags()
221 .how.flags = O_TMPFILE | O_RDWR, in test_openat2_flags()
222 .how.resolve = 0x1337, .err = -EINVAL }, in test_openat2_flags()
223 { .name = "invalid how.resolve and O_PATH", in test_openat2_flags()
224 .how.flags = O_PATH, in test_openat2_flags()
225 .how.resolve = 0x1337, .err = -EINVAL }, in test_openat2_flags()
243 path = (test->how.flags & O_CREAT) ? "/tmp/ksft.openat2_tmpfile" : "."; in test_openat2_flags()
246 fd = sys_openat2(AT_FDCWD, path, &test->how); in test_openat2_flags()
266 if (test->how.flags & O_CREAT) in test_openat2_flags()
268 if (!(test->how.flags & O_LARGEFILE)) in test_openat2_flags()
270 failed |= (fdflags != test->how.flags); in test_openat2_flags()
280 test->how.flags); in test_openat2_flags()