Home
last modified time | relevance | path

Searched refs:O_RDONLY (Results 1 – 25 of 358) sorted by relevance

12345678910>>...15

/linux-6.1.9/tools/testing/selftests/landlock/
Dfs_test.c287 ASSERT_EQ(0, test_open(dir_s1d1, O_RDONLY)); in TEST_F_FORK()
288 ASSERT_EQ(0, test_open(file1_s1d1, O_RDONLY)); in TEST_F_FORK()
289 ASSERT_EQ(0, test_open(file2_s1d1, O_RDONLY)); in TEST_F_FORK()
290 ASSERT_EQ(0, test_open(dir_s1d2, O_RDONLY)); in TEST_F_FORK()
291 ASSERT_EQ(0, test_open(file1_s1d2, O_RDONLY)); in TEST_F_FORK()
292 ASSERT_EQ(0, test_open(file2_s1d2, O_RDONLY)); in TEST_F_FORK()
293 ASSERT_EQ(0, test_open(dir_s1d3, O_RDONLY)); in TEST_F_FORK()
294 ASSERT_EQ(0, test_open(file1_s1d3, O_RDONLY)); in TEST_F_FORK()
296 ASSERT_EQ(0, test_open(dir_s2d1, O_RDONLY)); in TEST_F_FORK()
297 ASSERT_EQ(0, test_open(file1_s2d1, O_RDONLY)); in TEST_F_FORK()
[all …]
Dbase_test.c335 ASSERT_EQ(-1, open("/", O_RDONLY | O_DIRECTORY | O_CLOEXEC)); in TEST()
337 dir_fd = open("/tmp", O_RDONLY | O_DIRECTORY | O_CLOEXEC); in TEST()
347 dir_fd = open("/", O_RDONLY | O_DIRECTORY | O_CLOEXEC); in TEST()
350 dir_fd = open("/tmp", O_RDONLY | O_DIRECTORY | O_CLOEXEC); in TEST()
/linux-6.1.9/tools/testing/selftests/exec/
Dexecveat.c142 int in_fd = open_or_die(src, O_RDONLY); in exe_cp()
194 fd = open(longpath, O_RDONLY); in check_execveat_pathmax()
230 int subdir_dfd = open_or_die("subdir", O_DIRECTORY|O_RDONLY); in run_tests()
232 O_DIRECTORY|O_RDONLY); in run_tests()
233 int dot_dfd = open_or_die(".", O_DIRECTORY|O_RDONLY); in run_tests()
234 int root_dfd = open_or_die("/", O_DIRECTORY|O_RDONLY); in run_tests()
235 int dot_dfd_path = open_or_die(".", O_DIRECTORY|O_RDONLY|O_PATH); in run_tests()
236 int dot_dfd_cloexec = open_or_die(".", O_DIRECTORY|O_RDONLY|O_CLOEXEC); in run_tests()
237 int fd = open_or_die("execveat", O_RDONLY); in run_tests()
238 int fd_path = open_or_die("execveat", O_RDONLY|O_PATH); in run_tests()
[all …]
/linux-6.1.9/tools/testing/selftests/bpf/
Dtest_sysctl.c55 .open_flags = O_RDONLY,
66 .open_flags = O_RDONLY,
77 .open_flags = O_RDONLY,
98 .open_flags = O_RDONLY,
158 .open_flags = O_RDONLY,
179 .open_flags = O_RDONLY,
206 .open_flags = O_RDONLY,
222 .open_flags = O_RDONLY,
264 .open_flags = O_RDONLY,
306 .open_flags = O_RDONLY,
[all …]
/linux-6.1.9/tools/testing/selftests/openat2/
Dopenat2_test.c57 .arg.inner.flags = O_RDONLY, in test_openat2_struct()
61 .arg.inner.flags = O_RDONLY, in test_openat2_struct()
68 .arg.inner.flags = O_RDONLY, .size = 0, .err = -EINVAL }, in test_openat2_struct()
70 .arg.inner.flags = O_RDONLY, in test_openat2_struct()
75 .arg.inner.flags = O_RDONLY, .arg.extra1 = 0xdeadbeef, in test_openat2_struct()
78 .arg.inner.flags = O_RDONLY, .arg.extra2 = 0xfeedcafe, in test_openat2_struct()
81 .arg.inner.flags = O_RDONLY, .arg.extra3 = 0xabad1dea, in test_openat2_struct()
196 .how.flags = O_RDONLY, .how.mode = 0600, .err = -EINVAL }, in test_openat2_flags()
219 .how.flags = O_RDONLY, in test_openat2_flags()
225 .how.flags = O_RDONLY, in test_openat2_flags()
[all …]
/linux-6.1.9/tools/testing/selftests/proc/
Dfd-002-posix-eq.c32 fd0 = open("/", O_DIRECTORY|O_RDONLY); in main()
36 fd1 = open(buf, O_RDONLY); in main()
40 fd2 = open(buf, O_RDONLY); in main()
Dsetns-dcache.c95 nsfd = open(buf, O_RDONLY); in main()
102 (void)open("/proc/net/unix", O_RDONLY); in main()
116 fd = open("/proc/net/unix", O_RDONLY); in main()
Dsetns-sysvipc.c94 nsfd = open(buf, O_RDONLY); in main()
101 (void)open("/proc/sysvipc/shm", O_RDONLY); in main()
115 fd = open("/proc/sysvipc/shm", O_RDONLY); in main()
Dproc-empty-vm.c178 int fd = open(buf, O_RDONLY); in test_proc_pid_maps()
200 int fd = open(buf, O_RDONLY); in test_proc_pid_numa_maps()
223 int fd = open(buf, O_RDONLY); in test_proc_pid_smaps()
278 int fd = open(buf, O_RDONLY); in test_proc_pid_smaps_rollup()
Dfd-003-kthread.c48 dir_fd = open(buf, O_RDONLY|O_DIRECTORY); in kernel_thread_fd()
56 fd = openat(dir_fd, "stat", O_RDONLY); in kernel_thread_fd()
90 fd = openat(dir_fd, "fd", O_RDONLY|O_DIRECTORY); in kernel_thread_fd()
Dproc-pid-vm.c207 fd1 = open(buf, O_RDONLY|O_CLOEXEC); in make_exe()
309 if (open("/", O_RDONLY|O_DIRECTORY|O_PATH) != 0) { in main()
361 fd = open(buf, O_RDONLY); in main()
380 fd = open(buf, O_RDONLY); in main()
436 fd = open(buf, O_RDONLY); in main()
472 fd = open(buf, O_RDONLY); in main()
/linux-6.1.9/tools/testing/selftests/efivarfs/
Dopen-unlink.c20 fd = open(path, O_RDONLY); in set_immutable()
51 fd = open(path, O_RDONLY); in get_immutable()
115 fd = open(path, O_RDONLY); in main()
/linux-6.1.9/samples/timers/
Dhpet_example.c89 fd = open(argv[0], O_RDONLY); in hpet_open_close()
109 fd = open(argv[0], O_RDONLY); in hpet_info()
149 fd = open(argv[0], O_RDONLY); in hpet_poll()
243 fd = open(argv[0], O_RDONLY); in hpet_fasync()
/linux-6.1.9/fs/lockd/
Dsvcsubs.c76 return (lock->fl_type == F_WRLCK) ? O_WRONLY : O_RDONLY; in lock_to_openmode()
169 if (file->f_file[O_RDONLY]) in nlm_delete_file()
170 nlmsvc_ops->fclose(file->f_file[O_RDONLY]); in nlm_delete_file()
191 lock.fl_file = file->f_file[O_RDONLY]; in nlm_unlock_files()
289 if (file->f_file[O_RDONLY]) in nlm_close_files()
290 nlmsvc_ops->fclose(file->f_file[O_RDONLY]); in nlm_close_files()
/linux-6.1.9/tools/testing/selftests/vm/
Dmadv_populate.c145 int fd = open("/proc/self/pagemap", O_RDONLY); in range_is_populated()
159 int fd = open("/proc/self/pagemap", O_RDONLY); in range_is_not_populated()
217 int fd = open("/proc/self/pagemap", O_RDONLY); in range_is_softdirty()
231 int fd = open("/proc/self/pagemap", O_RDONLY); in range_is_not_softdirty()
Dhugepage-vmemmap.c59 fd = open("/proc/self/pagemap", O_RDONLY); in virt_to_pfn()
75 fd = open("/proc/kpageflags", O_RDONLY); in check_page_flags()
/linux-6.1.9/tools/testing/selftests/bpf/prog_tests/
Dd_path.c46 procfd = open("/proc/self/comm", O_RDONLY); in trigger_fstat_events()
49 devfd = open("/dev/urandom", O_RDONLY); in trigger_fstat_events()
52 localfd = open("/tmp/d_path_loadgen.txt", O_CREAT | O_RDONLY, 0644); in trigger_fstat_events()
/linux-6.1.9/tools/perf/util/
Dzlib.c32 input_fd = open(input, O_RDONLY); in gzip_decompress_to_file()
85 int fd = open(input, O_RDONLY); in gzip_is_compressed()
/linux-6.1.9/samples/pidfd/
Dpidfd-metadata.c58 procfd = open(path, O_DIRECTORY | O_RDONLY | O_CLOEXEC); in pidfd_metadata_fd()
105 statusfd = openat(procfd, "status", O_RDONLY | O_CLOEXEC); in main()
/linux-6.1.9/tools/laptop/freefall/
Dfreefall.c42 int fd = open(unload_heads_path, O_RDONLY); in valid_disk()
125 fd = open("/dev/freefall", O_RDONLY); in main()
/linux-6.1.9/tools/testing/selftests/timers/
Drtcpie.c42 fd = open(default_rtc, O_RDONLY); in main()
54 fd = open(rtc, O_RDONLY); in main()
/linux-6.1.9/tools/testing/selftests/powerpc/
Dutils.c34 fd = open("/proc/self/auxv", O_RDONLY); in read_auxv()
149 if ((fd = open(path, O_RDONLY)) < 0) in read_sysfs_file()
171 if ((fd = open(path, O_RDONLY)) < 0) in read_debugfs_file()
/linux-6.1.9/kernel/power/
Duser.c72 if ((filp->f_flags & O_ACCMODE) == O_RDONLY) { in snapshot_open()
75 data->mode = O_RDONLY; in snapshot_open()
125 pm_notifier_call_chain(data->mode == O_RDONLY ? in snapshot_release()
306 if (data->mode != O_RDONLY || !data->frozen || data->ready) { in snapshot_ioctl()
/linux-6.1.9/tools/testing/selftests/filesystems/binderfs/
Dbinderfs_test.c91 fd = open(device_path, O_RDONLY | O_CLOEXEC); in __do_binderfs_test()
114 fd = open(device_path, O_CLOEXEC | O_RDONLY); in __do_binderfs_test()
161 fd = open(device_path, O_CLOEXEC | O_RDONLY); in __do_binderfs_test()
424 fd = open(device_path, O_RDONLY | O_CLOEXEC); in TEST()
441 fds[i] = open(device_path, O_RDONLY | O_CLOEXEC); in TEST()
/linux-6.1.9/tools/testing/selftests/pidfd/
Dpidfd_setns_test.c93 fd = open("/proc/self/ns/time_for_children", O_RDONLY | O_CLOEXEC); in switch_timens()
144 self->nsfds[i] = openat(proc_fd, info->name, O_RDONLY | O_CLOEXEC); in FIXTURE_SETUP()
237 self->nsfds[i] = openat(proc_fd, info->name, O_RDONLY | O_CLOEXEC); in FIXTURE_SETUP()
250 self->child_nsfds1[i] = open(p, O_RDONLY | O_CLOEXEC); in FIXTURE_SETUP()
263 self->child_nsfds2[i] = open(p, O_RDONLY | O_CLOEXEC); in FIXTURE_SETUP()
311 return open(path, O_RDONLY | O_CLOEXEC); in preserve_ns()

12345678910>>...15