Home
last modified time | relevance | path

Searched refs:fd2 (Results 1 – 25 of 175) sorted by relevance

1234567

/external/igt-gpu-tools/tests/
Dprime_self_import.c57 check_bo(int fd1, uint32_t handle1, int fd2, uint32_t handle2) in check_bo() argument
64 ptr2 = gem_mmap__cpu(fd2, handle2, 0, BO_SIZE, PROT_READ | PROT_WRITE); in check_bo()
67 gem_set_domain(fd2, handle2, I915_GEM_DOMAIN_CPU, I915_GEM_DOMAIN_CPU); in check_bo()
86 int fd1, fd2; in test_with_fd_dup() local
93 fd2 = drm_open_driver(DRIVER_INTEL); in test_with_fd_dup()
102 handle_import = prime_fd_to_handle(fd2, dma_buf_fd2); in test_with_fd_dup()
103 check_bo(fd2, handle_import, fd2, handle_import); in test_with_fd_dup()
106 check_bo(fd2, handle_import, fd2, handle_import); in test_with_fd_dup()
109 close(fd2); in test_with_fd_dup()
114 int fd1, fd2; in test_with_two_bos() local
[all …]
Dkms_prop_blob.c157 int fd2; in test_lifetime() local
160 fd2 = drm_open_driver(DRIVER_ANY); in test_lifetime()
161 igt_assert_fd(fd2); in test_lifetime()
166 igt_assert_eq(validate_prop(fd2, prop_id), 0); in test_lifetime()
169 igt_assert_eq(destroy_prop(fd2, prop_id), EPERM); in test_lifetime()
172 prop_id2 = create_prop(fd2); in test_lifetime()
173 igt_assert_eq(validate_prop(fd2, prop_id2), 0); in test_lifetime()
174 igt_assert_eq(destroy_prop(fd2, prop_id2), 0); in test_lifetime()
175 igt_assert_eq(validate_prop(fd2, prop_id2), ENOENT); in test_lifetime()
179 prop_id2 = create_prop(fd2); in test_lifetime()
[all …]
/external/linux-kselftest/tools/testing/selftests/powerpc/ptrace/
Dperf-hwbreak.c360 int fd1, fd2; in test_process_multi_diff_addr() local
370 fd2 = perf_process_event_open(HW_BREAKPOINT_RW, (__u64)&b, (__u64)sizeof(b)); in test_process_multi_diff_addr()
371 if (fd2 < 0) { in test_process_multi_diff_addr()
378 ioctl(fd2, PERF_EVENT_IOC_RESET); in test_process_multi_diff_addr()
380 ioctl(fd2, PERF_EVENT_IOC_ENABLE); in test_process_multi_diff_addr()
383 ioctl(fd2, PERF_EVENT_IOC_DISABLE); in test_process_multi_diff_addr()
387 res = read(fd2, &breaks2, sizeof(breaks2)); in test_process_multi_diff_addr()
391 close(fd2); in test_process_multi_diff_addr()
405 int fd1, fd2; in test_process_multi_same_addr() local
415 fd2 = perf_process_event_open(HW_BREAKPOINT_RW, (__u64)&a, (__u64)sizeof(a)); in test_process_multi_same_addr()
[all …]
/external/ltp/testcases/kernel/syscalls/eventfd2/
Deventfd2_03.c80 static void sem_player(int fd1, int fd2) in sem_player() argument
85 fprintf(stdout, "[%u] waiting on %d\n", getpid(), fd2); in sem_player()
86 xsem_wait(fd2); in sem_player()
91 fprintf(stdout, "[%u] waiting on %d\n", getpid(), fd2); in sem_player()
92 xsem_wait(fd2); in sem_player()
97 fprintf(stdout, "[%u] waiting 5 times on %d\n", getpid(), fd2); in sem_player()
98 xsem_wait(fd2); in sem_player()
99 xsem_wait(fd2); in sem_player()
100 xsem_wait(fd2); in sem_player()
101 xsem_wait(fd2); in sem_player()
[all …]
/external/ltp/testcases/kernel/syscalls/memfd_create/
Dmemfd_create01.c130 int fd2; in test_share_dup() local
134 fd2 = SAFE_DUP(fd); in test_share_dup()
135 CHECK_MFD_HAS_SEALS(fd2, 0); in test_share_dup()
139 CHECK_MFD_HAS_SEALS(fd2, F_SEAL_WRITE); in test_share_dup()
141 CHECK_MFD_ADD_SEALS(fd2, F_SEAL_SHRINK); in test_share_dup()
143 CHECK_MFD_HAS_SEALS(fd2, F_SEAL_WRITE | F_SEAL_SHRINK); in test_share_dup()
147 CHECK_MFD_HAS_SEALS(fd2, F_SEAL_WRITE | F_SEAL_SHRINK | F_SEAL_SEAL); in test_share_dup()
150 CHECK_MFD_FAIL_ADD_SEALS(fd2, F_SEAL_GROW); in test_share_dup()
152 CHECK_MFD_FAIL_ADD_SEALS(fd2, F_SEAL_SEAL); in test_share_dup()
154 SAFE_CLOSE(fd2); in test_share_dup()
[all …]
/external/ltp/testcases/kernel/syscalls/kcmp/
Dkcmp02.c26 static int fd2; variable
41 int *fd2; member
44 {&pid1, &pid_unused, KCMP_FILE, &fd1, &fd2, ESRCH},
45 {&pid1, &pid1, KCMP_TYPES + 1, &fd1, &fd2, EINVAL},
46 {&pid1, &pid1, -1, &fd1, &fd2, EINVAL},
47 {&pid1, &pid1, INT_MIN, &fd1, &fd2, EINVAL},
48 {&pid1, &pid1, INT_MAX, &fd1, &fd2, EINVAL},
58 fd2 = SAFE_OPEN(TEST_FILE2, O_CREAT | O_RDWR | O_TRUNC, 0644); in setup()
66 if (fd2 > 0) in cleanup()
67 SAFE_CLOSE(fd2); in cleanup()
[all …]
Dkcmp01.c24 static int fd2; variable
34 int *fd2; member
38 {&pid2, &pid2, KCMP_FILE, &fd1, &fd2, 0},
40 {&pid1, &pid2, KCMP_FILE, &fd1, &fd2, 0},
61 fd2 = dup(fd1); in do_child()
62 if (fd2 == -1) { in do_child()
69 *(test->fd1), *(test->fd2))); in do_child()
71 SAFE_CLOSE(fd2); in do_child()
/external/clang/test/Sema/
Dzvector.c21 vector double fd, fd2; variable
61 fd = fd2; in foo()
80 sc = fd2; // expected-error {{incompatible type}} in foo()
90 uc = fd2; // expected-error {{incompatible type}} in foo()
100 bc = fd2; // expected-error {{incompatible type}} in foo()
125 ul = (vector unsigned long long)fd2; in foo()
134 uc = (vector unsigned char)fd2; in foo()
138 us = (vector unsigned short)fd2; in foo()
142 ui = (vector unsigned int)fd2; in foo()
169 ++fd2; in foo()
[all …]
/external/libdrm/
Dlibsync.h51 int32_t fd2; member
86 static inline int sync_merge(const char *name, int fd1, int fd2) in sync_merge() argument
91 data.fd2 = fd2; in sync_merge()
121 static inline int sync_accumulate(const char *name, int *fd1, int fd2) in sync_accumulate() argument
125 assert(fd2 >= 0); in sync_accumulate()
128 *fd1 = dup(fd2); in sync_accumulate()
132 ret = sync_merge(name, *fd1, fd2); in sync_accumulate()
/external/mesa3d/src/util/
Dlibsync.h59 int32_t fd2;
94 static inline int sync_merge(const char *name, int fd1, int fd2)
99 data.fd2 = fd2;
131 static inline int sync_accumulate(const char *name, int *fd1, int fd2) in sync_accumulate() argument
135 assert(fd2 >= 0); in sync_accumulate()
138 *fd1 = dup(fd2); in sync_accumulate()
142 ret = sync_merge(name, *fd1, fd2); in sync_accumulate()
/external/linux-kselftest/tools/testing/selftests/memfd/
Dmemfd_test.c474 int r, fd2; in mfd_assert_shrink() local
484 fd2 = mfd_assert_open(fd, in mfd_assert_shrink()
487 close(fd2); in mfd_assert_shrink()
771 int fd, fd2; in test_seal_future_write() local
792 fd2 = mfd_assert_reopen_fd(fd); in test_seal_future_write()
794 mfd_assert_read(fd2); in test_seal_future_write()
795 mfd_assert_read_shared(fd2); in test_seal_future_write()
796 mfd_fail_write(fd2); in test_seal_future_write()
801 close(fd2); in test_seal_future_write()
889 int fd, fd2; in test_share_dup() local
[all …]
/external/python/cpython3/Python/
Ddup2.c20 dup2(int fd1, int fd2) in dup2() argument
22 if (fd1 != fd2) { in dup2()
25 if (fcntl(fd2, F_GETFL) >= 0) in dup2()
26 close(fd2); in dup2()
27 if (fcntl(fd1, F_DUPFD, fd2) < 0) in dup2()
30 return fd2; in dup2()
/external/python/cpython2/Python/
Ddup2.c20 dup2(int fd1, int fd2) in dup2() argument
22 if (fd1 != fd2) { in dup2()
25 if (fcntl(fd2, F_GETFL) >= 0) in dup2()
26 close(fd2); in dup2()
27 if (fcntl(fd1, F_DUPFD, fd2) < 0) in dup2()
30 return fd2; in dup2()
/external/strace/tests/
Dredirect-fds.test40 fd2="$LOG.fd2"
51 rm -f "$LOG" "$fd0" "$fd1" "$fd2"
64 check_fd "$fd0" "$fd1" "$fd2"
65 check_fd '' "$fd1" "$fd2"
66 check_fd "$fd0" '' "$fd2"
68 check_fd '' '' "$fd2"
/external/strace/tests-mx32/
Dredirect-fds.test40 fd2="$LOG.fd2"
51 rm -f "$LOG" "$fd0" "$fd1" "$fd2"
64 check_fd "$fd0" "$fd1" "$fd2"
65 check_fd '' "$fd1" "$fd2"
66 check_fd "$fd0" '' "$fd2"
68 check_fd '' '' "$fd2"
/external/strace/tests-m32/
Dredirect-fds.test40 fd2="$LOG.fd2"
51 rm -f "$LOG" "$fd0" "$fd1" "$fd2"
64 check_fd "$fd0" "$fd1" "$fd2"
65 check_fd '' "$fd1" "$fd2"
66 check_fd "$fd0" '' "$fd2"
68 check_fd '' '' "$fd2"
/external/liburing/test/
Dpoll-cancel-all.c103 int ret, i, fd2[2]; in test2() local
105 if (pipe(fd2) < 0) { in test2()
120 io_uring_prep_poll_add(sqe, fd2[0], POLLIN); in test2()
205 sqe->fd = fd2[0]; in test2()
241 close(fd2[0]); in test2()
242 close(fd2[1]); in test2()
245 close(fd2[0]); in test2()
246 close(fd2[1]); in test2()
254 int ret, i, fd2[2]; in test3() local
256 if (pipe(fd2) < 0) { in test3()
[all …]
Dsubmit-reuse.c22 int fd1, fd2; member
32 posix_fadvise(data->fd2, 0, FILE_SIZE, POSIX_FADV_DONTNEED); in flusher()
134 int fd1, fd2, ret, i; in test_reuse() local
170 fd2 = open(".reuse.2", O_RDONLY); in test_reuse()
172 if (fd2 < 0) { in test_reuse()
178 data.fd2 = fd2; in test_reuse()
190 ret = prep(fd2, str2, split, async); in test_reuse()
207 close(fd2); in test_reuse()
/external/ltp/testcases/kernel/syscalls/fcntl/
Dfcntl01.c48 int fd[10], fd2[10]; in main() local
68 fd2[i] = fd[i]; in main()
79 if (fd[2] < fd2[2]) in main()
83 if ((fd[4] = fcntl(fd[1], F_DUPFD, fd2[3])) < 0) in main()
86 if (fd[4] < fd2[3]) in main()
88 "expect greater than %d", fd[4], fd2[3]); in main()
90 if ((fd[8] = fcntl(fd[1], F_DUPFD, fd2[5])) < 0) in main()
93 if (fd[8] != fd2[5]) in main()
95 "got %d, expected %d", fd[8], fd2[5]); in main()
Dfcntl32.c36 static int fd2; variable
102 fd2 = SAFE_OPEN(cleanup, "file", test_cases[i].fd2_flag); in verify_fcntl()
124 SAFE_CLOSE(cleanup, fd2); in verify_fcntl()
125 fd2 = 0; in verify_fcntl()
133 if (fd2 > 0 && close(fd2)) in cleanup()
/external/musl/src/stat/
Dfchmodat.c14 int ret, fd2; in fchmodat() local
22 if ((fd2 = __syscall(SYS_openat, fd, path, O_RDONLY|O_PATH|O_NOFOLLOW|O_NOCTTY|O_CLOEXEC)) < 0) { in fchmodat()
23 if (fd2 == -ELOOP) in fchmodat()
25 return __syscall_ret(fd2); in fchmodat()
28 __procfdname(proc, fd2); in fchmodat()
35 __syscall(SYS_close, fd2); in fchmodat()
/external/libdrm/tests/nouveau/
Dthreaded.c78 int err, fd, fd2; in main() local
88 fd2 = drmOpenWithType("nouveau", NULL, DRM_NODE_RENDER); in main()
94 fd2 = open(device, O_RDWR); in main()
96 fd2 = fd = -errno; in main()
104 if (fd2 < 0) { in main()
122 err = nouveau_device_wrap(fd2, 0, &nvdev2); in main()
144 close(fd2); in main()
147 drmClose(fd2); in main()
/external/ltp/testcases/kernel/input/
Dinput02.c39 static int fd2; variable
55 fd2 = open_device(); in main()
64 if (no_events_queued(fd2, 0)) in main()
68 SAFE_CLOSE(NULL, fd2); in main()
92 SAFE_IOCTL(NULL, fd2, EVIOCGRAB, 1); in send_information()
100 SAFE_CLOSE(NULL, fd2); in send_information()
Dinput04.c37 static int fd, fd2; variable
60 if (no_events_queued(fd2, 1)) in main()
84 fd2 = open_device(); in setup()
99 if (fd2 > 0 && close(fd2)) in cleanup()
/external/ltp/testcases/kernel/syscalls/lseek/
Dlseek07.c24 static int fd1, fd2; variable
34 {&fd2, TFILE2, 2, 2, 7, "abijkfg"},
78 fd2 = SAFE_OPEN(TFILE2, O_RDWR | O_CREAT, 0644); in setup()
81 SAFE_WRITE(SAFE_WRITE_ALL, fd2, WR_STR1, sizeof(WR_STR1) - 1); in setup()
89 if (fd2 > 0) in cleanup()
90 SAFE_CLOSE(fd2); in cleanup()

1234567