/external/ltp/testcases/kernel/syscalls/eventfd2/ |
H A D | eventfd2_03.c | 80 static void sem_player(int fd1, int fd2) argument 85 fprintf(stdout, "[%u] waiting on %d\n", getpid(), fd2); 86 xsem_wait(fd2); 91 fprintf(stdout, "[%u] waiting on %d\n", getpid(), fd2); 92 xsem_wait(fd2); 97 fprintf(stdout, "[%u] waiting 5 times on %d\n", getpid(), fd2); 98 xsem_wait(fd2); 99 xsem_wait(fd2); 100 xsem_wait(fd2); 101 xsem_wait(fd2); 112 int c, fd1, fd2, status; local [all...] |
/external/ltp/testcases/kernel/input/ |
H A D | input02.c | 39 static int fd2; variable 55 fd2 = open_device(); 64 if (no_events_queued(fd2)) 68 SAFE_CLOSE(NULL, fd2); 92 SAFE_IOCTL(NULL, fd2, EVIOCGRAB, 1); 100 SAFE_CLOSE(NULL, fd2);
|
H A D | input04.c | 37 static int fd, fd2; variable 60 if (no_events_queued(fd2)) 84 fd2 = open_device(); 99 if (fd2 > 0 && close(fd2)) 100 tst_resm(TWARN | TERRNO, "close(fd2)");
|
H A D | input06.c | 39 static int fd2; variable 89 fd2 = open_device(); 90 SAFE_IOCTL(NULL, fd2, EVIOCGRAB, 1); 136 rd = read(fd2, iev, sizeof(iev)); 156 rd = read(fd2, iev, sizeof(iev)); 167 if (fd2 > 0 && close(fd2)) 168 tst_resm(TWARN | TERRNO, "close(fd2) failed");
|
H A D | input01.c | 40 static int fd2; variable 85 fd2 = open_device(); 107 rd = read(fd2, iev, sizeof(iev)); 183 if (fd2 > 0 && close(fd2)) 184 tst_resm(TWARN | TERRNO, "close(fd2)");
|
H A D | input03.c | 40 static int fd, fd2; variable 90 fd2 = SAFE_OPEN(NULL, "/dev/input/mice", O_RDONLY); 115 rd = read(fd2, buf, sizeof(buf)); 141 if (fd2 > 0 && close(fd2)) 142 tst_resm(TWARN, "close(fd2) failed");
|
/external/strace/tests/ |
H A D | redirect-fds.test | 39 fd2="$LOG.fd2" 61 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/ |
H A D | redirect-fds.test | 39 fd2="$LOG.fd2" 61 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/ |
H A D | redirect-fds.test | 39 fd2="$LOG.fd2" 61 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/compiler-rt/test/tsan/ |
H A D | fd_dup_norace2.cc | 44 int fd2 = open("/dev/urandom", O_RDONLY); local 45 if (fd == -1 || fd2 == -1) 49 if (dup2(fd2, fd) == -1) 54 if (close(fd2) == -1)
|
H A D | fd_dup_race.cc | 21 int fd2 = open("/dev/random", O_RDONLY); local 22 if (fd == -1 || fd2 == -1) 26 if (dup2(fd2, fd) == -1)
|
/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/shm_open/ |
H A D | 8-1.c | 38 int fd1, fd2; local 47 fd2 = shm_open(SHM_NAME, O_RDWR | O_CREAT, S_IRUSR | S_IWUSR); 48 if (fd2 == -1) { 57 if (fd2 == (fd1 + 1)) {
|
/external/ltp/testcases/kernel/syscalls/kcmp/ |
H A D | kcmp02.c | 40 static int fd2; variable 56 int *fd2; member in struct:test_case 59 {&pid1, &pid_unused, KCMP_FILE, &fd1, &fd2, ESRCH}, 60 {&pid1, &pid1, KCMP_TYPES + 1, &fd1, &fd2, EINVAL}, 61 {&pid1, &pid1, -1, &fd1, &fd2, EINVAL}, 62 {&pid1, &pid1, INT_MIN, &fd1, &fd2, EINVAL}, 63 {&pid1, &pid1, INT_MAX, &fd1, &fd2, EINVAL}, 96 *(test->fd1), *(test->fd2))); 125 fd2 = SAFE_OPEN(cleanup, TEST_FILE2, O_CREAT | O_RDWR | O_TRUNC); 134 if (fd2 > [all...] |
H A D | kcmp.h | 47 int kcmp(int pid1, int pid2, int type, int fd1, int fd2) argument 49 return ltp_syscall(__NR_kcmp, pid1, pid2, type, fd1, fd2);
|
H A D | kcmp01.c | 39 static int fd2; variable 51 int *fd2; member in struct:test_case 55 {&pid2, &pid2, KCMP_FILE, &fd1, &fd2, 0}, 57 {&pid1, &pid2, KCMP_FILE, &fd1, &fd2, 0}, 100 fd2 = dup(fd1); 104 *(test->fd1), *(test->fd2))); 123 if (fd2 > 0 && close(fd2) < 0) 124 tst_resm(TWARN | TERRNO, "close fd2 failed"); 125 fd2 [all...] |
/external/bison/lib/ |
H A D | fseterr.c | 59 int fd2; 64 fd2 = dup (fd); 65 if (fd2 >= 0) 70 if (dup2 (fd2, fd) < 0) 73 close (fd2);
|
/external/linux-kselftest/tools/testing/selftests/kcmp/ |
H A D | kcmp_test.c | 22 static long sys_kcmp(int pid1, int pid2, int type, int fd1, int fd2) argument 24 return syscall(__NR_kcmp, pid1, pid2, type, fd1, fd2); 31 int fd1, fd2; local 52 fd2 = open(kpath, O_RDWR, 0644); 53 if (fd2 < 0) { 63 sys_kcmp(pid1, pid2, KCMP_FILE, fd1, fd2),
|
/external/ltp/testcases/kernel/syscalls/fcntl/ |
H A D | fcntl32.c | 36 static int fd2; variable 102 fd2 = SAFE_OPEN(cleanup, "file", test_cases[i].fd2_flag); 124 SAFE_CLOSE(cleanup, fd2); 125 fd2 = 0; 133 if (fd2 > 0 && close(fd2))
|
/external/ltp/testcases/kernel/syscalls/flock/ |
H A D | flock06.c | 89 int fd1, fd2; local 106 fd2 = open(filename, O_RDWR); 107 if (fd2 == -1) 111 TEST(flock(fd2, LOCK_EX | LOCK_NB)); 123 TEST(flock(fd2, LOCK_EX | LOCK_NB)); 129 close(fd2);
|
/external/libdrm/tests/nouveau/ |
H A D | threaded.c | 78 int err, fd, fd2; local 88 fd2 = drmOpenWithType("nouveau", NULL, DRM_NODE_RENDER); 94 fd2 = open(device, O_RDWR); 96 fd2 = fd = -errno; 104 if (fd2 < 0) { 122 err = nouveau_device_wrap(fd2, 0, &nvdev2); 144 close(fd2); 147 drmClose(fd2);
|
/external/linux-kselftest/tools/testing/selftests/powerpc/context_switch/ |
H A D | cp_abort.c | 70 int fd1[2], fd2[2], pid; local 84 FAIL_IF(pipe(fd1) || pipe(fd2)); 92 FAIL_IF((read(fd2[READ_FD], &c, 1)) != 1); 100 FAIL_IF((write(fd2[WRITE_FD], &c, 1) != 1));
|
/external/valgrind/memcheck/tests/linux/ |
H A D | syscalls-2007.c | 38 int fd, fd2; local 48 fd2 = eventfd (5, 0); 49 eventfd_read (fd2, &ev); 52 pfd[1].fd = fd2;
|
/external/ltp/testcases/kernel/syscalls/preadv/ |
H A D | preadv02.c | 49 static int fd2; variable 80 {&fd2, rd_iovec2, 1, 0, EBADF}, 109 fd2 = SAFE_OPEN("file2", O_WRONLY | O_CREAT, 0644); 119 if (fd2 > 0 && close(fd2))
|
/external/ltp/testcases/kernel/syscalls/pwritev/ |
H A D | pwritev02.c | 47 static int fd2; variable 77 {&fd2, wr_iovec2, 1, 0, EBADF}, 104 fd2 = SAFE_OPEN("file", O_RDONLY | O_CREAT, 0644); 113 if (fd2 > 0 && close(fd2))
|
/external/ltp/testcases/kernel/syscalls/dup2/ |
H A D | dup203.c | 61 int fd0, fd1, fd2, rval; local 105 if ((fd2 = TEST_RETURN) == -1) { 108 if (fd1 != fd2) { 114 if (read(fd2, buf, sizeof(buf)) == -1) 123 close(fd2); 144 if ((fd2 = creat(filename1, 0666)) == -1) { 148 if (close(fd2) == -1) { 152 TEST(dup2(fd0, fd2)); 157 if (fd1 != fd2) {
|