Searched refs:dir_fd (Results 1 - 6 of 6) sorted by relevance
/linux-master/tools/perf/tests/ |
H A D | tests-scripts.c | 49 static char *shell_test__description(int dir_fd, const char *name) argument 55 io__init(&io, openat(dir_fd, name, O_RDONLY), buf, sizeof(buf)); 92 static bool is_shell_script(int dir_fd, const char *path) argument 100 if (faccessat(dir_fd, path, R_OK | X_OK, 0) == 0) /* Is executable */ 107 static bool is_test_script(int dir_fd, const char *name) argument 109 return is_shell_script(dir_fd, name); 141 static void append_script(int dir_fd, const char *name, char *desc, argument 150 snprintf(link, sizeof(link), "/proc/%d/fd/%d", getpid(), dir_fd); 192 static void append_scripts_in_dir(int dir_fd, argument 201 n_dirs = scandirat(dir_fd, " 237 int dir_fd = shell_tests__dir_fd(); /* Walk dir */ local [all...] |
/linux-master/tools/testing/selftests/proc/ |
H A D | fd-003-kthread.c | 44 int dir_fd, fd; local 48 dir_fd = open(buf, O_RDONLY|O_DIRECTORY); 49 if (dir_fd == -1) 56 fd = openat(dir_fd, "stat", O_RDONLY); 58 close(dir_fd); 90 fd = openat(dir_fd, "fd", O_RDONLY|O_DIRECTORY); 92 close(dir_fd);
|
/linux-master/tools/testing/selftests/landlock/ |
H A D | base_test.c | 265 int ruleset_fd_tx, dir_fd; local 307 dir_fd = open("/tmp", O_RDONLY | O_DIRECTORY | O_CLOEXEC); 308 ASSERT_LE(0, dir_fd); 309 ASSERT_EQ(0, close(dir_fd)); 317 dir_fd = open("/", O_RDONLY | O_DIRECTORY | O_CLOEXEC); 318 ASSERT_LE(0, dir_fd); 319 ASSERT_EQ(0, close(dir_fd)); 320 dir_fd = open("/tmp", O_RDONLY | O_DIRECTORY | O_CLOEXEC); 321 ASSERT_LE(0, dir_fd); 322 ASSERT_EQ(0, close(dir_fd)); [all...] |
H A D | net_test.c | 1543 int ruleset_fd, bind_fd, dir_fd; local 1565 dir_fd = open("/dev", O_RDONLY); 1566 EXPECT_LE(0, dir_fd); 1567 EXPECT_EQ(0, close(dir_fd)); 1569 dir_fd = open("/", O_RDONLY); 1570 EXPECT_EQ(-1, dir_fd);
|
/linux-master/tools/perf/util/ |
H A D | print-events.c | 81 int dir_fd; local 89 dir_fd = openat(events_fd, sys_dirent->d_name, O_PATH); 90 if (dir_fd < 0) 105 evt_fd = openat(dir_fd, evt_path, O_RDONLY); 126 close(dir_fd);
|
H A D | pmu.c | 605 int fd, dir_fd; local 612 dir_fd = open(path, O_DIRECTORY); 613 if (dir_fd == -1) { 618 event_dir = fdopendir(dir_fd); 620 close (dir_fd); 637 fd = openat(dir_fd, name, O_RDONLY); 655 close (dir_fd);
|
Completed in 136 milliseconds