Home
last modified time | relevance | path

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

123456789

/tools/testing/selftests/landlock/
Dfs_test.c407 ASSERT_EQ(0, test_open(dir_s1d1, O_RDONLY)); in TEST_F_FORK()
408 ASSERT_EQ(0, test_open(file1_s1d1, O_RDONLY)); in TEST_F_FORK()
409 ASSERT_EQ(0, test_open(file2_s1d1, O_RDONLY)); in TEST_F_FORK()
410 ASSERT_EQ(0, test_open(dir_s1d2, O_RDONLY)); in TEST_F_FORK()
411 ASSERT_EQ(0, test_open(file1_s1d2, O_RDONLY)); in TEST_F_FORK()
412 ASSERT_EQ(0, test_open(file2_s1d2, O_RDONLY)); in TEST_F_FORK()
413 ASSERT_EQ(0, test_open(dir_s1d3, O_RDONLY)); in TEST_F_FORK()
414 ASSERT_EQ(0, test_open(file1_s1d3, O_RDONLY)); in TEST_F_FORK()
416 ASSERT_EQ(0, test_open(dir_s2d1, O_RDONLY)); in TEST_F_FORK()
417 ASSERT_EQ(0, test_open(file1_s2d1, O_RDONLY)); in TEST_F_FORK()
[all …]
Dbase_test.c306 ASSERT_EQ(-1, open("/", O_RDONLY | O_DIRECTORY | O_CLOEXEC)); in TEST()
308 dir_fd = open("/tmp", O_RDONLY | O_DIRECTORY | O_CLOEXEC); in TEST()
318 dir_fd = open("/", O_RDONLY | O_DIRECTORY | O_CLOEXEC); in TEST()
321 dir_fd = open("/tmp", O_RDONLY | O_DIRECTORY | O_CLOEXEC); in TEST()
341 dir_fd = open("/", O_RDONLY | O_DIRECTORY | O_CLOEXEC); in TEST()
354 EXPECT_EQ(-1, open("/", O_RDONLY | O_DIRECTORY | O_CLOEXEC)); in TEST()
368 EXPECT_EQ(-1, open("/", O_RDONLY | O_DIRECTORY | O_CLOEXEC)); in TEST()
387 EXPECT_EQ(-1, open("/", O_RDONLY | O_DIRECTORY | O_CLOEXEC)); in TEST()
399 EXPECT_EQ(-1, open("/", O_RDONLY | O_DIRECTORY | O_CLOEXEC)); in TEST()
/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 …]
/tools/testing/selftests/openat2/
Dopenat2_test.c58 .arg.inner.flags = O_RDONLY, in test_openat2_struct()
62 .arg.inner.flags = O_RDONLY, in test_openat2_struct()
69 .arg.inner.flags = O_RDONLY, .size = 0, .err = -EINVAL }, in test_openat2_struct()
71 .arg.inner.flags = O_RDONLY, in test_openat2_struct()
76 .arg.inner.flags = O_RDONLY, .arg.extra1 = 0xdeadbeef, in test_openat2_struct()
79 .arg.inner.flags = O_RDONLY, .arg.extra2 = 0xfeedcafe, in test_openat2_struct()
82 .arg.inner.flags = O_RDONLY, .arg.extra3 = 0xabad1dea, in test_openat2_struct()
197 .how.flags = O_RDONLY, .how.mode = 0600, .err = -EINVAL }, in test_openat2_flags()
220 .how.flags = O_RDONLY, in test_openat2_flags()
226 .how.flags = O_RDONLY, in test_openat2_flags()
[all …]
/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 …]
/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()
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-empty-vm.c185 int fd = open(buf, O_RDONLY); in test_proc_pid_maps()
207 int fd = open(buf, O_RDONLY); in test_proc_pid_numa_maps()
230 int fd = open(buf, O_RDONLY); in test_proc_pid_smaps()
286 int fd = open(buf, O_RDONLY); in test_proc_pid_smaps_rollup()
Dproc-self-wchan.c27 fd = open("/proc/self/wchan", O_RDONLY); in main()
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()
Dread.c45 fd = openat(dirfd(d), filename, O_RDONLY|O_NONBLOCK); in f_reg()
109 fd = openat(dirfd(d), de->d_name, O_DIRECTORY|O_RDONLY); in f()
/tools/testing/selftests/filesystems/fuse/
Dfuse_test.c98 O_RDONLY | O_CLOEXEC), in bpf_test_trace_maybe()
152 TESTERR(fd = open(filename, O_RDONLY | O_CLOEXEC), fd != -1); in basic_test()
213 TEST(src_fd = open(ft_src, O_DIRECTORY | O_RDONLY | O_CLOEXEC), in bpf_test_real()
226 TESTERR(fd = open(filename, O_RDONLY | O_CLOEXEC), fd != -1); in bpf_test_real()
255 TEST(src_fd = open(ft_src, O_DIRECTORY | O_RDONLY | O_CLOEXEC), in bpf_test_partial()
268 TESTERR(fd = open(filename, O_RDONLY | O_CLOEXEC), fd != -1); in bpf_test_partial()
318 TEST(src_fd = open(ft_src, O_DIRECTORY | O_RDONLY | O_CLOEXEC), in bpf_test_attrs()
362 TEST(src_fd = open(ft_src, O_DIRECTORY | O_RDONLY | O_CLOEXEC), in bpf_test_readdir()
456 TEST(src_fd = open(ft_src, O_DIRECTORY | O_RDONLY | O_CLOEXEC), in bpf_test_redact_readdir()
665 TEST(src_fd = open(ft_src, O_DIRECTORY | O_RDONLY | O_CLOEXEC), in bpf_test_hidden_entries()
[all …]
/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()
/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()
/tools/testing/selftests/filesystems/incfs/
Dincfs_stress.c110 O_RDONLY | O_CLOEXEC); in reader()
187 O_RDONLY | O_CLOEXEC); in test_files()
302 src_dir_fd = open(src_dir, O_RDONLY | O_CLOEXEC); in main()
303 dst_dir_fd = open(dst_dir, O_RDONLY | O_CLOEXEC); in main()
/tools/testing/selftests/mm/
Dmadv_populate.c137 int fd = open("/proc/self/pagemap", O_RDONLY); in range_is_populated()
151 int fd = open("/proc/self/pagemap", O_RDONLY); in range_is_not_populated()
209 int fd = open("/proc/self/pagemap", O_RDONLY); in range_is_softdirty()
223 int fd = open("/proc/self/pagemap", O_RDONLY); in range_is_not_softdirty()
Dhugepage-vmemmap.c55 fd = open("/proc/self/pagemap", O_RDONLY); in virt_to_pfn()
71 fd = open("/proc/kpageflags", O_RDONLY); in check_page_flags()
/tools/testing/selftests/timers/
Drtcpie.c42 fd = open(default_rtc, O_RDONLY); in main()
54 fd = open(rtc, O_RDONLY); in main()
Dclocksource-switch.c47 fd = open("/sys/devices/system/clocksource/clocksource0/available_clocksource", O_RDONLY); in get_clocksources()
79 fd = open("/sys/devices/system/clocksource/clocksource0/current_clocksource", O_RDONLY); in get_cur_clocksource()
/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()
/tools/testing/selftests/timens/
Dprocfs.c42 parent_ns = open(path, O_RDONLY); in init_namespaces()
52 child_ns = open(path, O_RDONLY); in init_namespaces()
/tools/testing/selftests/intel_pstate/
Dmsr.c29 fd = open(msr_file_name, O_RDONLY); in main()
/tools/testing/selftests/bpf/prog_tests/
Dd_path.c57 procfd = open("/proc/self/comm", O_RDONLY); in trigger_fstat_events()
60 devfd = open("/dev/urandom", O_RDONLY); in trigger_fstat_events()
63 localfd = open("/tmp/d_path_loadgen.txt", O_CREAT | O_RDONLY, 0644); in trigger_fstat_events()

123456789