Home
last modified time | relevance | path

Searched refs:dir_fd (Results 1 – 7 of 7) sorted by relevance

/linux/tools/perf/tests/
H A Dtests-scripts.c83 static char *shell_test__description(int dir_fd, const char *name) in shell_test__description()
92 io__init(&io, openat(dir_fd, name, O_RDONLY), buf, sizeof(buf)); in shell_test__description()
133 static bool is_shell_script(int dir_fd, const char *path) in is_shell_script()
141 if (faccessat(dir_fd, path, R_OK | X_OK, 0) == 0) /* Is executable */
148 static bool is_test_script(int dir_fd, const char *name) in strdup_check()
150 return is_shell_script(dir_fd, name); in strdup_check()
182 static void append_script(int dir_fd, const char *name, char *desc, in append_script()
192 snprintf(link, sizeof(link), "/proc/%d/fd/%d", getpid(), dir_fd); in append_script()
238 static void append_scripts_in_dir(int dir_fd, in append_scripts_in_dir()
247 n_dirs = scandirat(dir_fd, " in append_scripts_in_dir()
78 shell_test__description(int dir_fd,const char * name) shell_test__description() argument
121 is_shell_script(int dir_fd,const char * path) is_shell_script() argument
136 is_test_script(int dir_fd,const char * name) is_test_script() argument
170 append_script(int dir_fd,const char * name,char * desc,struct test_suite *** result,size_t * result_sz) append_script() argument
226 append_scripts_in_dir(int dir_fd,struct test_suite *** result,size_t * result_sz) append_scripts_in_dir() argument
274 int dir_fd = shell_tests__dir_fd(); /* Walk dir */ create_script_test_suites() local
[all...]
/linux/tools/testing/selftests/landlock/
H A Dbase_test.c486 int ruleset_fd_tx, dir_fd;
528 dir_fd = open("/tmp", O_RDONLY | O_DIRECTORY | O_CLOEXEC);
529 ASSERT_LE(0, dir_fd);
530 ASSERT_EQ(0, close(dir_fd));
538 dir_fd = open("/", O_RDONLY | O_DIRECTORY | O_CLOEXEC);
539 ASSERT_LE(0, dir_fd);
540 ASSERT_EQ(0, close(dir_fd));
541 dir_fd = open("/tmp", O_RDONLY | O_DIRECTORY | O_CLOEXEC);
542 ASSERT_LE(0, dir_fd);
543 ASSERT_EQ(0, close(dir_fd));
266 int ruleset_fd_tx, dir_fd; TEST() local
335 int ruleset_fd, dir_fd; TEST() local
[all...]
H A Dnet_test.c2525 int ruleset_fd, bind_fd, dir_fd; in TEST_F()
2547 dir_fd = open("/dev", O_RDONLY); in TEST_F()
2548 EXPECT_LE(0, dir_fd); in TEST_F()
2549 EXPECT_EQ(0, close(dir_fd)); in TEST_F()
2551 dir_fd = open("/", O_RDONLY); in TEST_F()
2552 EXPECT_EQ(-1, dir_fd); in TEST_F()
2521 int ruleset_fd, bind_fd, dir_fd; TEST_F() local
H A Dfs_test.c4457 int dir_fd; in TEST_F_FORK()
4467 dir_fd = open("/dev", O_RDONLY); in TEST_F_FORK()
4468 if (dir_fd < 0) in TEST_F_FORK()
4477 EXPECT_EQ(0, test_fionread_ioctl(dir_fd)); in TEST_F_FORK()
4480 EXPECT_EQ(0, ioctl(dir_fd, FIOCLEX)); in TEST_F_FORK()
4481 EXPECT_EQ(0, ioctl(dir_fd, FIONCLEX)); in TEST_F_FORK()
4482 EXPECT_EQ(0, ioctl(dir_fd, FIONBIO, &flag)); in TEST_F_FORK()
4483 EXPECT_EQ(0, ioctl(dir_fd, FIOASYNC, &flag)); in TEST_F_FORK()
4484 EXPECT_EQ(0, ioctl(dir_fd, FIGETBSZ, &flag)); in TEST_F_FORK()
4486 ASSERT_EQ(0, close(dir_fd)); in TEST_F_FORK()
4499 int dir_fd, ruleset_fd; TEST_F_FORK() local
[all...]
/linux/tools/testing/selftests/proc/
H A Dfd-003-kthread.c44 int dir_fd, fd; in kernel_thread_fd() local
48 dir_fd = open(buf, O_RDONLY|O_DIRECTORY); in kernel_thread_fd()
49 if (dir_fd == -1) in kernel_thread_fd()
56 fd = openat(dir_fd, "stat", O_RDONLY); in kernel_thread_fd()
58 close(dir_fd); in kernel_thread_fd()
90 fd = openat(dir_fd, "fd", O_RDONLY|O_DIRECTORY); in kernel_thread_fd()
92 close(dir_fd); in kernel_thread_fd()
/linux/tools/perf/util/
H A Dbpf-filter.c673 int dir_fd, ret = -1; in perf_bpf_filter__pin()
709 dir_fd = open(path, O_PATH); in perf_bpf_filter__pin()
710 if (dir_fd < 0) { in perf_bpf_filter__pin()
712 ret = dir_fd; in perf_bpf_filter__pin()
717 if (fchmodat(dir_fd, "..", 01755, 0) < 0) { in perf_bpf_filter__pin()
724 if (fchmodat(dir_fd, ".", 0755, 0) < 0) { in perf_bpf_filter__pin()
731 if (fchmodat(dir_fd, "perf_sample_filter", 0777, 0) < 0) { in perf_bpf_filter__pin()
736 if (fchmodat(dir_fd, "filters", 0666, 0) < 0) { in perf_bpf_filter__pin()
740 if (fchmodat(dir_fd, "event_hash", 0666, 0) < 0) { in perf_bpf_filter__pin()
744 if (fchmodat(dir_fd, "idx_has in perf_bpf_filter__pin()
677 int dir_fd, ret = -1; perf_bpf_filter__pin() local
[all...]
/linux/tools/perf/ui/browsers/
H A Dscripts.c91 static int check_ev_match(int dir_fd, const char *scriptname, struct perf_session *session) in check_ev_match() argument
101 fd = openat(dir_fd, filename, O_RDONLY); in check_ev_match()