Home
last modified time | relevance | path

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

12345

/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/kcmp/
Dkcmp02.c40 static int fd2; variable
56 int *fd2; member
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))); in kcmp_verify()
125 fd2 = SAFE_OPEN(cleanup, TEST_FILE2, O_CREAT | O_RDWR | O_TRUNC); in setup()
134 if (fd2 > 0 && close(fd2) < 0) in cleanup()
Dkcmp01.c39 static int fd2; variable
51 int *fd2; member
55 {&pid2, &pid2, KCMP_FILE, &fd1, &fd2, 0},
57 {&pid1, &pid2, KCMP_FILE, &fd1, &fd2, 0},
100 fd2 = dup(fd1); in do_child()
104 *(test->fd1), *(test->fd2))); in do_child()
123 if (fd2 > 0 && close(fd2) < 0) in cleanup_child()
125 fd2 = 0; in cleanup_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/linux-kselftest/tools/testing/selftests/memfd/
Dmemfd_test.c391 int r, fd2; in mfd_assert_shrink() local
401 fd2 = mfd_assert_open(fd, in mfd_assert_shrink()
404 close(fd2); in mfd_assert_shrink()
734 int fd, fd2; in test_share_dup() local
741 fd2 = mfd_assert_dup(fd); in test_share_dup()
742 mfd_assert_has_seals(fd2, 0); in test_share_dup()
746 mfd_assert_has_seals(fd2, F_SEAL_WRITE); in test_share_dup()
748 mfd_assert_add_seals(fd2, F_SEAL_SHRINK); in test_share_dup()
750 mfd_assert_has_seals(fd2, F_SEAL_WRITE | F_SEAL_SHRINK); in test_share_dup()
754 mfd_assert_has_seals(fd2, F_SEAL_WRITE | F_SEAL_SHRINK | F_SEAL_SEAL); in test_share_dup()
[all …]
/external/strace/tests-mx32/
Dredirect-fds.test39 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/
Dredirect-fds.test39 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/
Dredirect-fds.test39 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/ltp/testcases/kernel/syscalls/dup2/
Ddup203.c61 int fd0, fd1, fd2, rval; in main() local
105 if ((fd2 = TEST_RETURN) == -1) { in main()
108 if (fd1 != fd2) { in main()
114 if (read(fd2, buf, sizeof(buf)) == -1) in main()
123 close(fd2); in main()
144 if ((fd2 = creat(filename1, 0666)) == -1) { in main()
148 if (close(fd2) == -1) { in main()
152 TEST(dup2(fd0, fd2)); in main()
157 if (fd1 != fd2) { in main()
/external/ltp/testcases/kernel/syscalls/fcntl/
Dfcntl01.c48 int fd[10], fd2[10]; in main() local
67 fd2[i] = fd[i]; in main()
78 if (fd[2] < fd2[2]) in main()
82 if ((fd[4] = fcntl(fd[1], F_DUPFD, fd2[3])) < 0) in main()
85 if (fd[4] < fd2[3]) in main()
87 "expect greater than %d", fd[4], fd2[3]); in main()
89 if ((fd[8] = fcntl(fd[1], F_DUPFD, fd2[5])) < 0) in main()
92 if (fd[8] != fd2[5]) in main()
94 "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/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)) 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()
Dinput06.c39 static int fd2; variable
89 fd2 = open_device(); in setup()
90 SAFE_IOCTL(NULL, fd2, EVIOCGRAB, 1); in setup()
136 rd = read(fd2, iev, sizeof(iev)); in check_events()
156 rd = read(fd2, iev, sizeof(iev)); in check_events()
167 if (fd2 > 0 && close(fd2)) in cleanup()
Dinput04.c37 static int fd, fd2; variable
60 if (no_events_queued(fd2)) in main()
84 fd2 = open_device(); in setup()
99 if (fd2 > 0 && close(fd2)) in cleanup()
/external/ltp/testcases/kernel/syscalls/flock/
Dflock06.c89 int fd1, fd2; in main() local
106 fd2 = open(filename, O_RDWR); in main()
107 if (fd2 == -1) in main()
111 TEST(flock(fd2, LOCK_EX | LOCK_NB)); in main()
123 TEST(flock(fd2, LOCK_EX | LOCK_NB)); in main()
129 close(fd2); in main()
Dflock03.c127 int fd2; in childfunc() local
131 fd2 = open(FILE_NAME, O_RDWR); in childfunc()
133 if (fd2 == -1) { in childfunc()
139 if (flock(fd2, LOCK_EX | LOCK_NB) != -1) { in childfunc()
156 TEST(flock(fd2, LOCK_EX | LOCK_NB)); in childfunc()
167 close(fd2); in childfunc()
/external/linux-kselftest/tools/testing/selftests/kcmp/
Dkcmp_test.c22 static long sys_kcmp(int pid1, int pid2, int type, int fd1, int fd2) in sys_kcmp() argument
24 return syscall(__NR_kcmp, pid1, pid2, type, fd1, fd2); in sys_kcmp()
31 int fd1, fd2; in main() local
52 fd2 = open(kpath, O_RDWR, 0644); in main()
53 if (fd2 < 0) { in main()
63 sys_kcmp(pid1, pid2, KCMP_FILE, fd1, fd2), in main()
/external/bison/lib/
Dfseterr.c59 int fd2; in fseterr()
64 fd2 = dup (fd); in fseterr()
65 if (fd2 >= 0) in fseterr()
70 if (dup2 (fd2, fd) < 0) in fseterr()
73 close (fd2); in fseterr()
/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/mmap/
D3-1.c50 int fd2; in main() local
70 fd2 = open(tmpfname2, O_CREAT | O_RDWR | O_EXCL, S_IRUSR | S_IWUSR); in main()
71 if (fd == -1 || fd2 == -1) { in main()
88 if (write(fd2, data, total_size) != total_size) { in main()
110 mmap(pa, size2, PROT_READ | PROT_WRITE, MAP_SHARED | MAP_FIXED, fd2, in main()
130 close(fd2); in main()
/external/ltp/testcases/kernel/io/direct_io/
Ddiotest1.c57 static int fd1, fd2; variable
73 if (fd2 > 0) in cleanup()
74 close(fd2); in cleanup()
130 fd2 = SAFE_OPEN(cleanup, outfile, O_DIRECT | O_RDWR | O_CREAT, 0666); in main()
148 SAFE_LSEEK(cleanup, fd2, offset, SEEK_SET); in main()
150 SAFE_WRITE(cleanup, 1, fd2, buf, n); in main()
/external/valgrind/none/tests/
Dfdleak_cmsg.c38 int s, fd1, fd2; in server() local
42 fd2 = DO( open(fileb, O_RDWR | O_CREAT | O_TRUNC, 0750) ); in server()
72 ((int *)CMSG_DATA(cmsg))[1] = fd2; in server()
86 int s, fd1 = -1, fd2 = -1, size, count = 0, ret; in client() local
136 fd2 = ((int *)CMSG_DATA(cmsg))[1]; in client()
143 if (fd2 != -1) write(fd2, "Yeah 2\n", 8); in client()
/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/shm_open/
D8-1.c38 int fd1, fd2; in main() local
47 fd2 = shm_open(SHM_NAME, O_RDWR | O_CREAT, S_IRUSR | S_IWUSR); in main()
48 if (fd2 == -1) { in main()
57 if (fd2 == (fd1 + 1)) { in main()
/external/compiler-rt/test/tsan/
Dfd_dup_norace2.cc44 int fd2 = open("/dev/urandom", O_RDONLY); in main() local
45 if (fd == -1 || fd2 == -1) in main()
49 if (dup2(fd2, fd) == -1) in main()
54 if (close(fd2) == -1) in main()
/external/clang/test/CodeGen/
Dzvector.c20 volatile vector double fd, fd2; variable
58 fd = fd2; in test_assign()
95 fd = +fd2; in test_pos()
116 fd = -fd2; in test_neg()
153 ++fd2; in test_preinc()
190 fd2++; in test_postinc()
227 --fd2; in test_predec()
264 fd2--; in test_postdec()
374 fd = fd + fd2; in test_add()
452 fd += fd2; in test_add_assign()
[all …]

12345