Searched defs:fd1 (Results 1 - 25 of 62) sorted by relevance

123

/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/shm_open/
H A D8-1.c38 int fd1, fd2; local
41 fd1 = mkstemp(path);
42 if (fd1 == -1) {
57 if (fd2 == (fd1 + 1)) {
/external/valgrind/memcheck/tests/linux/
H A Dsys-openat.c12 __attribute__((unused)) int fd1 = openat (dfd, "abc", O_RDONLY); local
/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
34 fd1 = open(kpath, O_RDWR | O_CREAT | O_TRUNC, 0644);
37 if (fd1 < 0) {
63 sys_kcmp(pid1, pid2, KCMP_FILE, fd1, fd2),
75 ret = sys_kcmp(pid1, pid2, KCMP_FILE, fd1, fd1);
/external/ltp/testcases/kernel/fs/fs_di/
H A Dfrag.c48 int bytes_read = 0, bytes_written = 0, fd1 = -1, fd2 = -1; local
96 fd1 = fileno(fp_frag1);
99 fsync(fd1);
/external/ltp/testcases/kernel/syscalls/dup2/
H A Ddup203.c61 int fd0, fd1, fd2, rval; local
88 if ((fd1 = creat(filename1, 0666)) == -1)
90 if (write(fd1, filename1, strlen(filename1)) == -1)
98 if (close(fd1) == -1)
99 tst_brkm(TBROK, cleanup, "close(2) fd1 failed");
100 if ((fd1 = open(filename1, O_RDONLY)) == -1)
103 TEST(dup2(fd0, fd1));
108 if (fd1 != fd2) {
122 close(fd1);
154 if ((fd1
[all...]
H A Ddup201.c78 int fd, fd1; variable
141 for (j = fd1; j < maxfd; j++) {
/external/ltp/testcases/kernel/syscalls/flock/
H A Dflock04.c86 int fd, fd1, status; variable
109 fd1 = open(filename, O_RDONLY);
110 retval = flock(fd1, LOCK_SH | LOCK_NB);
130 fd1 = open(filename, O_RDWR);
131 retval = flock(fd1, LOCK_EX | LOCK_NB);
149 close(fd1);
H A Dflock05.c86 int fd, fd1, status; variable
111 fd1 = open(filename, O_RDWR);
112 retval = flock(fd1, LOCK_SH | LOCK_NB);
132 fd1 = open(filename, O_RDWR);
133 retval = flock(fd1, LOCK_EX | LOCK_NB);
157 close(fd1);
H A Dflock06.c89 int fd1, fd2; local
94 fd1 = open(filename, O_RDWR);
95 if (fd1 == -1)
99 TEST(flock(fd1, LOCK_EX | LOCK_NB));
117 TEST(flock(fd1, LOCK_UN));
119 tst_resm(TFAIL | TTERRNO, "Failed to unlock fd1");
121 tst_resm(TPASS, "Unlocked fd1");
128 close(fd1);
/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);
H A Dkcmp01.c38 static int fd1; variable
50 int *fd1; member in struct:test_case
54 {&pid1, &pid1, KCMP_FILE, &fd1, &fd1, 0},
55 {&pid2, &pid2, KCMP_FILE, &fd1, &fd2, 0},
56 {&pid1, &pid2, KCMP_FILE, &fd1, &fd1, 0},
57 {&pid1, &pid2, KCMP_FILE, &fd1, &fd2, 0},
58 {&pid1, &pid2, KCMP_FILE, &fd1, &fd3, 1},
100 fd2 = dup(fd1);
[all...]
H A Dkcmp02.c39 static int fd1; variable
55 int *fd1; 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},
64 {&pid1, &pid1, KCMP_FILE, &fd1, &fd_fake, EBADF}
96 *(test->fd1), *(test->fd2)));
124 fd1
[all...]
/external/valgrind/memcheck/tests/
H A Dfile_locking.c79 int fd1; local
89 if ((fd1 = open_lock_and_map("parent", filename)) >= 0)
122 close(fd1);
/external/webrtc/webrtc/base/
H A Dlinuxfdwalk_unittest.cc58 int fd1 = open("/dev/null", O_RDONLY); local
59 EXPECT_LE(0, fd1);
66 EXPECT_TRUE(fds.insert(fd1).second);
71 EXPECT_EQ(0, close(fd1));
/external/clang/test/CXX/special/class.inhctor/
H A Dp3.cpp15 D1 fd1() { return 1; } function
/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));
91 FAIL_IF((write(fd1[WRITE_FD], &c, 1)) != 1);
98 FAIL_IF((read(fd1[READ_FD], &c, 1)) != 1);
/external/ltp/testcases/kernel/syscalls/fcntl/
H A Dfcntl32.c35 static int fd1; variable
101 fd1 = SAFE_OPEN(cleanup, "file", test_cases[i].fd1_flag);
104 TEST(fcntl(fd1, F_SETLEASE, F_WRLCK));
122 SAFE_CLOSE(cleanup, fd1);
123 fd1 = 0;
130 if (fd1 > 0 && close(fd1))
/external/ltp/testcases/kernel/syscalls/rename/
H A Drename10.c83 char *fd1; member in struct:test_case_t
120 TEST(rename(TC[i].fd1, TC[i].fd2));
/external/libchrome/base/posix/
H A Dfile_descriptor_shuffle_unittest.cc26 fd1(in_fd1),
32 other.fd1 == fd1 &&
37 int fd1; member in struct:base::Action
/external/ltp/testcases/kernel/io/direct_io/
H A Ddiotest1.c57 static int fd1, fd2; variable
71 if (fd1 > 0)
72 close(fd1);
129 fd1 = SAFE_OPEN(cleanup, infile, O_DIRECT | O_RDWR | O_CREAT, 0666);
140 SAFE_WRITE(cleanup, 1, fd1, buf, bufsize);
145 SAFE_LSEEK(cleanup, fd1, offset, SEEK_SET);
147 while ((n = read(fd1, buf, bufsize)) > 0) {
153 SAFE_LSEEK(cleanup, fd1, offset, SEEK_SET);
/external/ltp/testcases/kernel/syscalls/eventfd2/
H A Deventfd2_03.c80 static void sem_player(int fd1, int fd2) argument
82 fprintf(stdout, "[%u] posting 1 on %d\n", getpid(), fd1);
83 xsem_post(fd1, 1);
88 fprintf(stdout, "[%u] posting 1 on %d\n", getpid(), fd1);
89 xsem_post(fd1, 1);
94 fprintf(stdout, "[%u] posting 5 on %d\n", getpid(), fd1);
95 xsem_post(fd1, 5);
112 int c, fd1, fd2, status; local
127 if ((fd1 = eventfd2(0, EFD_SEMLIKE)) == -1 ||
133 sem_player(fd1, fd
[all...]
/external/ltp/testcases/kernel/syscalls/fchmod/
H A Dfchmod06.c46 static int fd1; variable
58 {"EPERM", &fd1, 0644, EPERM},
151 fd1 = SAFE_OPEN(cleanup, "tfile_1", O_RDWR | O_CREAT, 0666);
167 if (fd1 > 0 && close(fd1))
168 tst_resm(TWARN | TERRNO, "close(fd1) failed");
171 tst_resm(TWARN | TERRNO, "close(fd1) failed");
/external/ltp/testcases/kernel/syscalls/fchown/
H A Dfchown02.c51 static int fd1; variable
62 {&fd1, TESTFILE1, "Setuid/Setgid bits cleared", 700, 701, 1},
143 fd1 = SAFE_OPEN(cleanup, TESTFILE1, O_RDWR | O_CREAT, FILE_MODE);
151 if (fd1 > 0 && close(fd1))
152 tst_resm(TWARN | TERRNO, "Failed to close fd1");
H A Dfchown04.c52 static int fd1; variable
62 {&fd1, EPERM},
114 fd1 = SAFE_OPEN(cleanup, "tfile_1", O_RDWR | O_CREAT, 0666);
161 if (fd1 > 0 && close(fd1))
162 tst_resm(TWARN | TERRNO, "Failed to close fd1");
/external/ltp/testcases/kernel/syscalls/ioctl/
H A Dioctl01.c68 static int fd, fd1; variable
93 &fd1, TCGETA, &termio, ENOTTY},
172 fd1 = open("x", O_CREAT, 0777);
173 if (fd1 == -1)
179 close(fd1);

Completed in 524 milliseconds

123