/external/compiler-rt/test/tsan/ |
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)
|
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)
|
/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/shm_open/ |
8-1.c | 37 int fd1, fd2; local 46 fd2 = shm_open(SHM_NAME, O_RDWR | O_CREAT, S_IRUSR | S_IWUSR); 47 if (fd2 == -1) { 56 if (fd2 == (fd1 + 1)) {
|
/external/ltp/testcases/kernel/syscalls/flock/ |
flock06.c | 24 int fd1, fd2; local 33 fd2 = SAFE_OPEN("testfile", O_RDWR); 34 TEST(flock(fd2, LOCK_EX | LOCK_NB)); 46 TEST(flock(fd2, LOCK_EX | LOCK_NB)); 53 SAFE_CLOSE(fd2);
|
flock03.c | 26 int fd2; local 29 fd2 = SAFE_OPEN("testfile", O_RDWR); 30 if (flock(fd2, LOCK_EX | LOCK_NB) != -1) 42 TEST(flock(fd2, LOCK_EX | LOCK_NB)); 52 SAFE_CLOSE(fd2);
|
flock04.c | 48 int fd2; local 52 fd2 = SAFE_OPEN("testfile", O_RDWR); 53 TEST(flock(fd2, tc->operation)); 57 SAFE_CLOSE(fd2); 75 SAFE_CLOSE(fd2);
|
/external/linux-kselftest/tools/testing/selftests/proc/ |
fd-002-posix-eq.c | 27 int fd0, fd1, fd2; local 40 fd2 = open(buf, O_RDONLY); 41 assert(fd2 >= 0); 47 rv = fstat(fd2, &st2);
|
/external/libdrm/ |
libsync.h | 51 int32_t fd2; member in struct:sync_merge_data 86 static inline int sync_merge(const char *name, int fd1, int fd2) 91 data.fd2 = fd2; 104 /* accumulate fd2 into fd1. If *fd1 is not a valid fd then dup fd2, 121 static inline int sync_accumulate(const char *name, int *fd1, int fd2) 125 assert(fd2 >= 0); 128 *fd1 = dup(fd2); 132 ret = sync_merge(name, *fd1, fd2); [all...] |
/external/linux-kselftest/tools/testing/selftests/kcmp/ |
kcmp_test.c | 23 static long sys_kcmp(int pid1, int pid2, int type, unsigned long fd1, unsigned long fd2) 25 return syscall(__NR_kcmp, pid1, pid2, type, fd1, fd2); 37 int fd1, fd2; local 91 fd2 = open(kpath, O_RDWR); 92 if (fd2 < 0) { 102 sys_kcmp(pid1, pid2, KCMP_FILE, fd1, fd2),
|
/external/linux-kselftest/tools/testing/selftests/net/ |
reuseaddr_conflict.c | 89 int fd1, fd2; local 104 fd2 = open_port(0, 1); 105 if (fd2 >= 0)
|
/external/ltp/testcases/kernel/fs/fs_di/ |
frag.c | 48 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/ |
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)");
|
input02.c | 39 static int fd2; variable 55 fd2 = open_device(); 64 if (no_events_queued(fd2, 0)) 68 SAFE_CLOSE(NULL, fd2); 92 SAFE_IOCTL(NULL, fd2, EVIOCGRAB, 1); 100 SAFE_CLOSE(NULL, fd2);
|
input04.c | 37 static int fd, fd2; variable 60 if (no_events_queued(fd2, 1)) 84 fd2 = open_device(); 99 if (fd2 > 0 && close(fd2)) 100 tst_resm(TWARN | TERRNO, "close(fd2)");
|
input05.c | 43 static int fd2; variable 66 if (no_events_queued(fd2, 1)) 91 fd2 = open_device();
|
/external/ltp/testcases/kernel/syscalls/dup2/ |
dup203.c | 62 int fd0, fd1, fd2, rval; local 104 if ((fd2 = TEST_RETURN) == -1) { 107 if (fd1 != fd2) { 113 if (read(fd2, buf, sizeof(buf)) == -1) 122 close(fd2); 143 if ((fd2 = creat(filename1, 0666)) == -1) { 148 rval = fd2; 151 TEST(dup2(fd0, fd2)); 156 if (fd1 != fd2) {
|
/external/ltp/testcases/kernel/syscalls/fchmod/ |
fchmod06.c | 35 static int fd2; variable 44 {&fd2, 0644, EBADF}, 76 fd2 = SAFE_OPEN("tfile_2", O_RDWR | O_CREAT, 0666); 77 SAFE_CLOSE(fd2);
|
/external/ltp/testcases/kernel/syscalls/fcntl/ |
fcntl01.c | 25 * 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[5]) failed") [all...] |
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/flistxattr/ |
flistxattr02.c | 47 static int fd2 = -1; variable 55 {&fd2, 20, EBADF}
|
/external/ltp/testcases/kernel/syscalls/rename/ |
rename08.c | 87 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/ |
3-1.c | 49 int fd2; local 69 fd2 = open(tmpfname2, O_CREAT | O_RDWR | O_EXCL, S_IRUSR | S_IWUSR); 70 if (fd == -1 || fd2 == -1) { 87 if (write(fd2, data, total_size) != total_size) { 109 mmap(pa, size2, PROT_READ | PROT_WRITE, MAP_SHARED | MAP_FIXED, fd2, 129 close(fd2);
|
/external/mesa3d/src/gallium/winsys/freedreno/drm/ |
freedreno_drm_winsys.c | 79 int fd2 = pointer_to_intptr(key2); local 82 fstat(fd2, &stat2);
|
/external/webrtc/webrtc/base/ |
linuxfdwalk_unittest.cc | 60 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));
|
/bionic/libc/kernel/uapi/linux/ |
sync_file.h | 25 __s32 fd2; member in struct:sync_merge_data
|