/external/igt-gpu-tools/tests/ |
D | prime_self_import.c | 57 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 …]
|
D | kms_prop_blob.c | 157 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/ |
D | perf-hwbreak.c | 360 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/ |
D | eventfd2_03.c | 80 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/ |
D | memfd_create01.c | 130 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/ |
D | kcmp02.c | 26 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 …]
|
D | kcmp01.c | 24 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/ |
D | zvector.c | 21 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/ |
D | libsync.h | 51 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/ |
D | libsync.h | 59 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/ |
D | memfd_test.c | 474 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/ |
D | dup2.c | 20 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/ |
D | dup2.c | 20 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/ |
D | redirect-fds.test | 40 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/ |
D | redirect-fds.test | 40 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/ |
D | redirect-fds.test | 40 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/ |
D | poll-cancel-all.c | 103 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 …]
|
D | submit-reuse.c | 22 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/ |
D | fcntl01.c | 48 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()
|
D | fcntl32.c | 36 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/ |
D | fchmodat.c | 14 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/ |
D | threaded.c | 78 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/ |
D | input02.c | 39 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()
|
D | input04.c | 37 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/ |
D | lseek07.c | 24 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()
|