Lines Matching refs:dirfd
66 int dirfd, file; in test_pmu_get() local
77 dirfd = open(dir, O_DIRECTORY); in test_pmu_get()
78 if (dirfd < 0) { in test_pmu_get()
84 if (mkdirat(dirfd, "perf-pmu-test", 0755) < 0) { in test_pmu_get()
88 file = openat(dirfd, "perf-pmu-test/type", O_WRONLY | O_CREAT, 0600); in test_pmu_get()
102 if (mkdirat(dirfd, "perf-pmu-test/format", 0755) < 0) { in test_pmu_get()
113 file = openat(dirfd, name, O_WRONLY | O_CREAT, 0600); in test_pmu_get()
128 if (mkdirat(dirfd, "perf-pmu-test/events", 0755) < 0) { in test_pmu_get()
132 file = openat(dirfd, "perf-pmu-test/events/test-event", O_WRONLY | O_CREAT, 0600); in test_pmu_get()
146 pmu = perf_pmus__add_test_pmu(dirfd, "perf-pmu-test"); in test_pmu_get()
153 if (dirfd >= 0) in test_pmu_get()
154 close(dirfd); in test_pmu_get()