/external/linux-kselftest/tools/testing/selftests/powerpc/ptrace/ |
D | perf-hwbreak.c | 360 int fd1, fd2; in test_process_multi_diff_addr() local 364 fd1 = perf_process_event_open(HW_BREAKPOINT_RW, (__u64)&a, (__u64)sizeof(a)); in test_process_multi_diff_addr() 365 if (fd1 < 0) { in test_process_multi_diff_addr() 372 close(fd1); in test_process_multi_diff_addr() 377 ioctl(fd1, PERF_EVENT_IOC_RESET); in test_process_multi_diff_addr() 379 ioctl(fd1, PERF_EVENT_IOC_ENABLE); in test_process_multi_diff_addr() 382 ioctl(fd1, PERF_EVENT_IOC_DISABLE); in test_process_multi_diff_addr() 385 res = read(fd1, &breaks1, sizeof(breaks1)); in test_process_multi_diff_addr() 390 close(fd1); in test_process_multi_diff_addr() 405 int fd1, fd2; in test_process_multi_same_addr() local [all …]
|
/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 63 ptr1 = gem_mmap__cpu(fd1, handle1, 0, BO_SIZE, PROT_READ | PROT_WRITE); in check_bo() 66 gem_set_domain(fd1, handle1, I915_GEM_DOMAIN_CPU, I915_GEM_DOMAIN_CPU); in check_bo() 86 int fd1, fd2; in test_with_fd_dup() local 92 fd1 = drm_open_driver(DRIVER_INTEL); in test_with_fd_dup() 95 handle = gem_create(fd1, BO_SIZE); in test_with_fd_dup() 97 dma_buf_fd1 = prime_handle_to_fd(fd1, handle); in test_with_fd_dup() 98 gem_close(fd1, handle); in test_with_fd_dup() 108 close(fd1); in test_with_fd_dup() 114 int fd1, fd2; in test_with_two_bos() local [all …]
|
/external/ltp/testcases/kernel/syscalls/kcmp/ |
D | kcmp01.c | 23 static int fd1; variable 33 int *fd1; member 37 {&pid1, &pid1, KCMP_FILE, &fd1, &fd1, 0}, 38 {&pid2, &pid2, KCMP_FILE, &fd1, &fd2, 0}, 39 {&pid1, &pid2, KCMP_FILE, &fd1, &fd1, 0}, 40 {&pid1, &pid2, KCMP_FILE, &fd1, &fd2, 0}, 41 {&pid1, &pid2, KCMP_FILE, &fd1, &fd3, 1}, 46 fd1 = SAFE_OPEN(TEST_FILE, O_CREAT | O_RDWR | O_TRUNC, 0666); in setup() 51 if (fd1 > 0) in cleanup() 52 SAFE_CLOSE(fd1); in cleanup() [all …]
|
D | kcmp02.c | 25 static int fd1; variable 40 int *fd1; 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}, 49 {&pid1, &pid1, KCMP_FILE, &fd1, &fd_fake, EBADF} 57 fd1 = SAFE_OPEN(TEST_FILE, O_CREAT | O_RDWR | O_TRUNC, 0644); in setup() 63 if (fd1 > 0) in cleanup() [all …]
|
/external/ltp/testcases/kernel/syscalls/eventfd2/ |
D | eventfd2_03.c | 80 static void sem_player(int fd1, int fd2) in sem_player() argument 82 fprintf(stdout, "[%u] posting 1 on %d\n", getpid(), fd1); in sem_player() 83 xsem_post(fd1, 1); in sem_player() 88 fprintf(stdout, "[%u] posting 1 on %d\n", getpid(), fd1); in sem_player() 89 xsem_post(fd1, 1); in sem_player() 94 fprintf(stdout, "[%u] posting 5 on %d\n", getpid(), fd1); in sem_player() 95 xsem_post(fd1, 5); in sem_player() 112 int c, fd1, fd2, status; in main() local 122 if ((fd1 = eventfd2(0, EFD_SEMLIKE)) == -1 || in main() 128 sem_player(fd1, fd2); in main() [all …]
|
/external/linux-kselftest/tools/testing/selftests/bpf/prog_tests/ |
D | udp_limit.c | 13 int fd1 = -1, fd2 = -1; in test_udp_limit() local 34 fd1 = socket(AF_INET, SOCK_DGRAM, 0); in test_udp_limit() 35 if (CHECK(fd1 < 0, "fd1", "errno %d", errno)) in test_udp_limit() 43 close(fd1); in test_udp_limit() 44 fd1 = -1; in test_udp_limit() 46 fd1 = socket(AF_INET, SOCK_DGRAM, 0); in test_udp_limit() 47 if (CHECK(fd1 < 0, "fd1-again", "errno %d", errno)) in test_udp_limit() 67 if (fd1 >= 0) in test_udp_limit() 68 close(fd1); in test_udp_limit()
|
/external/ltp/testcases/kernel/syscalls/pwritev/ |
D | pwritev02.c | 38 static int fd1; variable 64 {&fd1, wr_iovec1, 1, 0, EINVAL}, 65 {&fd1, wr_iovec2, -1, 0, EINVAL}, 66 {&fd1, wr_iovec2, 1, -1, EINVAL}, 67 {&fd1, wr_iovec3, 1, 0, EFAULT}, 94 fd1 = SAFE_OPEN("file", O_RDWR | O_CREAT, 0644); in setup() 95 SAFE_FTRUNCATE(fd1, getpagesize()); in setup() 102 if (fd1 > 0) in cleanup() 103 SAFE_CLOSE(fd1); in cleanup()
|
/external/ltp/testcases/kernel/syscalls/pwritev2/ |
D | pwritev202.c | 30 static int fd1; variable 57 {&fd1, wr_iovec1, 1, 0, 0, EINVAL}, 58 {&fd1, wr_iovec2, -1, 0, 0, EINVAL}, 59 {&fd1, wr_iovec2, 1, 1, -1, EOPNOTSUPP}, 60 {&fd1, wr_iovec3, 1, 0, 0, EFAULT}, 88 fd1 = SAFE_OPEN("file1", O_RDWR | O_CREAT, 0644); in setup() 89 SAFE_FTRUNCATE(fd1, getpagesize()); in setup() 98 if (fd1 > 0) in cleanup() 99 SAFE_CLOSE(fd1); in cleanup()
|
/external/ltp/testcases/kernel/syscalls/preadv/ |
D | preadv02.c | 40 static int fd1; variable 67 {&fd1, rd_iovec1, 1, 0, EINVAL}, 68 {&fd1, rd_iovec2, -1, 0, EINVAL}, 69 {&fd1, rd_iovec2, 1, -1, EINVAL}, 70 {&fd1, rd_iovec3, 1, 0, EFAULT}, 99 fd1 = SAFE_OPEN("file1", O_RDWR | O_CREAT, 0644); in setup() 100 SAFE_FTRUNCATE(fd1, getpagesize()); in setup() 108 if (fd1 > 0) in cleanup() 109 SAFE_CLOSE(fd1); in cleanup()
|
/external/ltp/testcases/kernel/syscalls/preadv2/ |
D | preadv202.c | 32 static int fd1; variable 60 {&fd1, rd_iovec1, 1, 0, 0, EINVAL}, 61 {&fd1, rd_iovec2, -1, 0, 0, EINVAL}, 62 {&fd1, rd_iovec2, 1, 1, -1, EOPNOTSUPP}, 63 {&fd1, rd_iovec3, 1, 0, 0, EFAULT}, 92 fd1 = SAFE_OPEN("file1", O_RDWR | O_CREAT, 0644); in setup() 93 SAFE_FTRUNCATE(fd1, getpagesize()); in setup() 103 if (fd1 > 0) in cleanup() 104 SAFE_CLOSE(fd1); in cleanup()
|
/external/libdrm/ |
D | libsync.h | 86 static inline int sync_merge(const char *name, int fd1, int fd2) in sync_merge() argument 95 ret = ioctl(fd1, SYNC_IOC_MERGE, &data); in sync_merge() 121 static inline int sync_accumulate(const char *name, int *fd1, int fd2) in sync_accumulate() argument 127 if (*fd1 < 0) { in sync_accumulate() 128 *fd1 = dup(fd2); in sync_accumulate() 132 ret = sync_merge(name, *fd1, fd2); in sync_accumulate() 138 close(*fd1); in sync_accumulate() 139 *fd1 = ret; in sync_accumulate()
|
/external/mesa3d/src/util/ |
D | libsync.h | 94 static inline int sync_merge(const char *name, int fd1, int fd2) 103 ret = ioctl(fd1, SYNC_IOC_MERGE, &data); 131 static inline int sync_accumulate(const char *name, int *fd1, int fd2) in sync_accumulate() argument 137 if (*fd1 < 0) { in sync_accumulate() 138 *fd1 = dup(fd2); in sync_accumulate() 142 ret = sync_merge(name, *fd1, fd2); in sync_accumulate() 148 close(*fd1); in sync_accumulate() 149 *fd1 = ret; in sync_accumulate()
|
/external/linux-kselftest/tools/testing/selftests/net/ |
D | reuseaddr_conflict.c | 89 int fd1, fd2; in main() local 96 fd1 = open_port(0, 1); in main() 97 if (fd1 >= 0) in main() 100 fd1 = open_port(1, 1); in main() 101 if (fd1 < 0) in main() 107 close(fd1); in main() 109 fd1 = open_port(0, 1); in main() 110 if (fd1 >= 0) in main()
|
/external/ltp/testcases/kernel/syscalls/dup2/ |
D | dup203.c | 23 static int fd0 = -1, fd1 = -1; variable 46 fd1 = SAFE_CREAT(filename1, 0666); in run() 47 SAFE_WRITE(SAFE_WRITE_ALL, fd1, filename1, strlen(filename1)); in run() 54 rval = fd1; in run() 58 TEST(dup2(fd0, fd1)); in run() 64 if (fd1 != fd2) { in run() 84 SAFE_CLOSE(fd1); in run() 101 close(fd1); in cleanup()
|
/external/ltp/testcases/kernel/io/direct_io/ |
D | diotest1.c | 57 static int fd1, fd2; variable 71 if (fd1 > 0) in cleanup() 72 close(fd1); in cleanup() 129 fd1 = SAFE_OPEN(cleanup, infile, O_DIRECT | O_RDWR | O_CREAT, 0666); in main() 140 SAFE_WRITE(cleanup, SAFE_WRITE_ALL, fd1, buf, bufsize); in main() 145 SAFE_LSEEK(cleanup, fd1, offset, SEEK_SET); in main() 147 while ((n = read(fd1, buf, bufsize)) > 0) { in main() 153 SAFE_LSEEK(cleanup, fd1, offset, SEEK_SET); in main()
|
/external/strace/tests/ |
D | redirect-fds.test | 39 fd1="$LOG.fd1" 51 rm -f "$LOG" "$fd0" "$fd1" "$fd2" 64 check_fd "$fd0" "$fd1" "$fd2" 65 check_fd '' "$fd1" "$fd2" 67 check_fd "$fd0" "$fd1" '' 69 check_fd '' "$fd1" ''
|
/external/strace/tests-mx32/ |
D | redirect-fds.test | 39 fd1="$LOG.fd1" 51 rm -f "$LOG" "$fd0" "$fd1" "$fd2" 64 check_fd "$fd0" "$fd1" "$fd2" 65 check_fd '' "$fd1" "$fd2" 67 check_fd "$fd0" "$fd1" '' 69 check_fd '' "$fd1" ''
|
/external/strace/tests-m32/ |
D | redirect-fds.test | 39 fd1="$LOG.fd1" 51 rm -f "$LOG" "$fd0" "$fd1" "$fd2" 64 check_fd "$fd0" "$fd1" "$fd2" 65 check_fd '' "$fd1" "$fd2" 67 check_fd "$fd0" "$fd1" '' 69 check_fd '' "$fd1" ''
|
/external/linux-kselftest/tools/testing/selftests/kcmp/ |
D | kcmp_test.c | 23 static long sys_kcmp(int pid1, int pid2, int type, unsigned long fd1, unsigned long fd2) in sys_kcmp() argument 25 return syscall(__NR_kcmp, pid1, pid2, type, fd1, fd2); in sys_kcmp() 37 int fd1, fd2; in main() local 42 fd1 = open(kpath, O_RDWR | O_CREAT | O_TRUNC, 0644); in main() 45 if (fd1 < 0) { in main() 102 sys_kcmp(pid1, pid2, KCMP_FILE, fd1, fd2), in main() 114 ret = sys_kcmp(pid1, pid2, KCMP_FILE, fd1, fd1); in main()
|
/external/ltp/testcases/kernel/syscalls/flistxattr/ |
D | flistxattr02.c | 36 static int fd1; variable 44 {&fd1, 1, ERANGE}, 73 fd1 = SAFE_OPEN("testfile", O_RDWR | O_CREAT, 0644); in setup() 75 SAFE_FSETXATTR(fd1, SECURITY_KEY, VALUE, VALUE_SIZE, XATTR_CREATE); in setup() 80 if (fd1 > 0) in cleanup() 81 SAFE_CLOSE(fd1); in cleanup()
|
/external/ltp/testcases/kernel/syscalls/fcntl/ |
D | fcntl32.c | 35 static int fd1; variable 101 fd1 = SAFE_OPEN(cleanup, "file", test_cases[i].fd1_flag); in verify_fcntl() 104 TEST(fcntl(fd1, F_SETLEASE, F_WRLCK)); in verify_fcntl() 122 SAFE_CLOSE(cleanup, fd1); in verify_fcntl() 123 fd1 = 0; in verify_fcntl() 130 if (fd1 > 0 && close(fd1)) in cleanup()
|
/external/linux-kselftest/tools/testing/selftests/core/ |
D | close_range_test.c | 388 int fd1, fd2, fd3, flags, ret, status; in TEST() local 396 fd1 = open("/dev/null", O_RDWR); in TEST() 397 EXPECT_GT(fd1, 0); in TEST() 399 fd2 = dup2(fd1, 1000); in TEST() 415 flags = fcntl(fd1, F_GETFD); in TEST() 423 fd3 = dup2(fd1, 42); in TEST() 445 flags = fcntl(fd1, F_GETFD); in TEST() 453 fd3 = dup2(fd1, 42); in TEST() 460 EXPECT_EQ(close(fd1), 0); in TEST() 470 int i, fd1, fd2, fd3, flags, ret, status; in TEST() local [all …]
|
/external/liburing/test/ |
D | submit-reuse.c | 22 int fd1, fd2; member 31 posix_fadvise(data->fd1, 0, FILE_SIZE, POSIX_FADV_DONTNEED); in flusher() 134 int fd1, fd2, ret, i; in test_reuse() local 161 fd1 = open(fname1, O_RDONLY); in test_reuse() 164 if (fd1 < 0) { in test_reuse() 177 data.fd1 = fd1; in test_reuse() 185 ret = prep(fd1, str1, split, async); in test_reuse() 208 close(fd1); in test_reuse()
|
/external/ltp/testcases/kernel/syscalls/lseek/ |
D | lseek07.c | 24 static int fd1, fd2; variable 33 {&fd1, TFILE1, 7, 7, 10, "abcdefgijk"}, 77 fd1 = SAFE_OPEN(TFILE1, O_RDWR | O_CREAT, 0644); in setup() 80 SAFE_WRITE(SAFE_WRITE_ALL, fd1, WR_STR1, sizeof(WR_STR1) - 1); in setup() 86 if (fd1 > 0) in cleanup() 87 SAFE_CLOSE(fd1); in cleanup()
|
/external/ltp/testcases/kernel/syscalls/flock/ |
D | flock06.c | 24 int fd1, fd2; in verify_flock() local 26 fd1 = SAFE_OPEN("testfile", O_RDWR); in verify_flock() 27 TEST(flock(fd1, LOCK_EX | LOCK_NB)); in verify_flock() 40 TEST(flock(fd1, LOCK_UN)); in verify_flock() 52 SAFE_CLOSE(fd1); in verify_flock()
|