/linux/tools/perf/tests/ |
H A D | tests-scripts.c | 78 static char *shell_test__description(int dir_fd, const char *name) in shell_test__description() argument 84 io__init(&io, openat(dir_fd, name, O_RDONLY), buf, sizeof(buf)); in shell_test__description() 121 static bool is_shell_script(int dir_fd, const char *path) in is_shell_script() argument 129 if (faccessat(dir_fd, path, R_OK | X_OK, 0) == 0) /* Is executable */ in is_shell_script() 136 static bool is_test_script(int dir_fd, const char *name) in is_test_script() argument 138 return is_shell_script(dir_fd, name); in is_test_script() 170 static void append_script(int dir_fd, const char *name, char *desc, in append_script() argument 180 snprintf(link, sizeof(link), "/proc/%d/fd/%d", getpid(), dir_fd); in append_script() 226 static void append_scripts_in_dir(int dir_fd, in append_scripts_in_dir() argument 235 n_dirs = scandirat(dir_fd, " in append_scripts_in_dir() 274 int dir_fd = shell_tests__dir_fd(); /* Walk dir */ create_script_test_suites() local [all...] |
/linux/tools/testing/selftests/proc/ |
H A D | fd-003-kthread.c | 44 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/testing/selftests/landlock/ |
H A D | base_test.c | 392 int ruleset_fd_tx, dir_fd; in TEST() local 434 dir_fd = open("/tmp", O_RDONLY | O_DIRECTORY | O_CLOEXEC); in TEST() 435 ASSERT_LE(0, dir_fd); in TEST() 436 ASSERT_EQ(0, close(dir_fd)); in TEST() 444 dir_fd = open("/", O_RDONLY | O_DIRECTORY | O_CLOEXEC); in TEST() 445 ASSERT_LE(0, dir_fd); in TEST() 446 ASSERT_EQ(0, close(dir_fd)); in TEST() 447 dir_fd = open("/tmp", O_RDONLY | O_DIRECTORY | O_CLOEXEC); in TEST() 448 ASSERT_LE(0, dir_fd); in TEST() 449 ASSERT_EQ(0, close(dir_fd)); in TEST() 461 int ruleset_fd, dir_fd; TEST() local [all...] |
H A D | fs_test.c | 4487 int dir_fd, ruleset_fd; in TEST_F_FORK() local 4500 dir_fd = open("/dev", O_RDONLY); in TEST_F_FORK() 4501 if (dir_fd < 0) in TEST_F_FORK() 4510 EXPECT_EQ(0, test_fionread_ioctl(dir_fd)); in TEST_F_FORK() 4513 EXPECT_EQ(0, ioctl(dir_fd, FIOCLEX)); in TEST_F_FORK() 4514 EXPECT_EQ(0, ioctl(dir_fd, FIONCLEX)); in TEST_F_FORK() 4515 EXPECT_EQ(0, ioctl(dir_fd, FIONBIO, &flag)); in TEST_F_FORK() 4516 EXPECT_EQ(0, ioctl(dir_fd, FIOASYNC, &flag)); in TEST_F_FORK() 4517 EXPECT_EQ(0, ioctl(dir_fd, FIGETBSZ, &flag)); in TEST_F_FORK() 4519 ASSERT_EQ(0, close(dir_fd)); in TEST_F_FORK() [all...] |
/linux/tools/perf/util/ |
H A D | bpf-filter.c | 672 int dir_fd, ret = -1; in perf_bpf_filter__pin() local 708 dir_fd = open(path, O_PATH); in perf_bpf_filter__pin() 709 if (dir_fd < 0) { in perf_bpf_filter__pin() 711 ret = dir_fd; in perf_bpf_filter__pin() 716 if (fchmodat(dir_fd, "..", 01755, 0) < 0) { in perf_bpf_filter__pin() 723 if (fchmodat(dir_fd, ".", 0755, 0) < 0) { in perf_bpf_filter__pin() 730 if (fchmodat(dir_fd, "perf_sample_filter", 0777, 0) < 0) { in perf_bpf_filter__pin() 735 if (fchmodat(dir_fd, "filters", 0666, 0) < 0) { in perf_bpf_filter__pin() 739 if (fchmodat(dir_fd, "event_hash", 0666, 0) < 0) { in perf_bpf_filter__pin() 743 if (fchmodat(dir_fd, "idx_has in perf_bpf_filter__pin() [all...] |
H A D | path.c | 71 bool is_directory_at(int dir_fd, const char *path) in is_directory_at() argument 75 if (fstatat(dir_fd, path, &st, /*flags=*/0)) in is_directory_at()
|
H A D | path.h | 15 bool is_directory_at(int dir_fd, const char *path);
|
/linux/tools/perf/ui/browsers/ |
H A D | scripts.c | 91 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()
|