Searched defs:fd2 (Results 1 - 25 of 81) sorted by relevance

1234

/external/compiler-rt/test/tsan/
H A Dfd_dup_race.cc21 int fd2 = open("/dev/random", O_RDONLY); local
22 if (fd == -1 || fd2 == -1)
26 if (dup2(fd2, fd) == -1)
H A Dfd_dup_norace2.cc44 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)
/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/shm_open/
H A D8-1.c38 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/valgrind/memcheck/tests/linux/
H A Dsys-openat.c14 __attribute__((unused)) int fd2 = openat (0x12345678, "/tmp/abc", O_RDONLY); local
H A Dsyscalls-2007.c38 int fd, fd2; local
48 fd2 = eventfd (5, 0);
49 eventfd_read (fd2, &ev);
52 pfd[1].fd = fd2;
/external/linux-kselftest/tools/testing/selftests/kcmp/
H A Dkcmp_test.c22 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/fs/fs_di/
H A Dfrag.c48 int bytes_read = 0, bytes_written = 0, fd1 = -1, fd2 = -1; local
97 fd2 = fileno(fp_frag2);
100 fsync(fd2);
/external/ltp/testcases/kernel/input/
H A Dinput02.c39 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 Dinput04.c37 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 Dinput05.c43 static int fd2; variable
66 if (no_events_queued(fd2))
91 fd2 = open_device();
H A Dinput01.c40 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 Dinput03.c40 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/ltp/testcases/kernel/syscalls/dup2/
H A Ddup203.c61 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) {
/external/ltp/testcases/kernel/syscalls/fcntl/
H A Dfcntl01.c25 * 09/2002 added fd2 array to remove statid fds
48 int fd[10], fd2[10]; local
67 fd2[i] = fd[i];
78 if (fd[2] < fd2[2])
82 if ((fd[4] = fcntl(fd[1], F_DUPFD, fd2[3])) < 0)
83 tst_resm(TFAIL | TERRNO, "fcntl(.., fd2[3]) failed");
85 if (fd[4] < fd2[3])
87 "expect greater than %d", fd[4], fd2[3]);
89 if ((fd[8] = fcntl(fd[1], F_DUPFD, fd2[5])) < 0)
90 tst_resm(TFAIL | TERRNO, "fcntl(.., fd2[
[all...]
/external/ltp/testcases/kernel/syscalls/flock/
H A Dflock03.c127 int fd2; local
131 fd2 = open(FILE_NAME, O_RDWR);
133 if (fd2 == -1) {
139 if (flock(fd2, LOCK_EX | LOCK_NB) != -1) {
156 TEST(flock(fd2, LOCK_EX | LOCK_NB));
167 close(fd2);
H A Dflock06.c89 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/ltp/testcases/kernel/syscalls/kcmp/
H A Dkcmp.h47 int kcmp(int pid1, int pid2, int type, int fd1, int fd2) argument
49 return ltp_syscall(__NR_kcmp, pid1, pid2, type, fd1, fd2);
/external/ltp/testcases/kernel/syscalls/rename/
H A Drename08.c87 char *fd2; member in struct:test_case_t
127 TEST(rename(TC[i].fd, TC[i].fd2));
174 TC[0].fd2 = bad_addr;
/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/mmap/
H A D3-1.c50 int fd2; local
70 fd2 = open(tmpfname2, O_CREAT | O_RDWR | O_EXCL, S_IRUSR | S_IWUSR);
71 if (fd == -1 || fd2 == -1) {
88 if (write(fd2, data, total_size) != total_size) {
110 mmap(pa, size2, PROT_READ | PROT_WRITE, MAP_SHARED | MAP_FIXED, fd2,
130 close(fd2);
/external/valgrind/memcheck/tests/
H A Dfile_locking.c80 int fd2; local
102 fd2 = open_lock_and_map("child", filename);
103 if (fd2 >= 0)
105 close(fd2);
/external/valgrind/none/tests/
H A Dpth_cancel2.c52 int *fd2=(int *)arg; local
57 async_cancel_safe_write(*fd2,buf,amt);
58 async_cancel_safe_read(*fd2,buf,amt);
/external/webrtc/webrtc/base/
H A Dlinuxfdwalk_unittest.cc60 int fd2 = open("/dev/null", O_WRONLY); local
61 EXPECT_LE(0, fd2);
67 EXPECT_TRUE(fds.insert(fd2).second);
72 EXPECT_EQ(0, close(fd2));
/external/clang/test/CXX/special/class.inhctor/
H A Dp3.cpp25 D2 fd2() { return 1; } // expected-error {{no viable conversion}} function
/external/kernel-headers/original/uapi/linux/
H A Dsync_file.h20 * @fd2: file descriptor of second fence
27 __s32 fd2; member in struct:sync_merge_data
82 * the sync_pts in both the calling fd and sync_merge_data.fd2. Returns the
/external/linux-kselftest/tools/testing/selftests/powerpc/context_switch/
H A Dcp_abort.c70 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));

Completed in 581 milliseconds

1234