HomeSort by relevance Sort by last modified time
    Searched defs:fd (Results 401 - 425 of 3995) sorted by null

<<11121314151617181920>>

  /external/ltp/testcases/kernel/syscalls/dup/
dup04.c 130 int fd[2]; variable
144 TEST(dup(fd[0]));
152 fd[0], TEST_RETURN);
157 TEST(dup(fd[1]));
165 fd[1], TEST_RETURN);
179 fd[0] = -1;
187 SAFE_PIPE(cleanup, fd);
dup05.c 128 int fd; variable
142 TEST(dup(fd));
161 fd = -1;
171 if ((fd = open(Fname, O_RDWR, 0700)) == -1)
177 if (fd != -1)
178 if (close(fd) == -1)
  /external/ltp/testcases/kernel/syscalls/eventfd2/
eventfd2_01.c 85 int fd, coe; local
95 fd = ltp_syscall(__NR_eventfd2, 1, 0);
96 if (fd == -1) {
99 coe = fcntl(fd, F_GETFD);
106 close(fd);
108 fd = ltp_syscall(__NR_eventfd2, 1, EFD_CLOEXEC);
109 if (fd == -1) {
112 coe = fcntl(fd, F_GETFD);
120 close(fd);
eventfd2_02.c 82 int fd, fl; local
93 fd = ltp_syscall(__NR_eventfd2, 1, 0);
94 if (fd == -1) {
97 fl = fcntl(fd, F_GETFL);
104 close(fd);
106 fd = ltp_syscall(__NR_eventfd2, 1, EFD_NONBLOCK);
107 if (fd == -1) {
110 fl = fcntl(fd, F_GETFL);
118 close(fd);
  /external/ltp/testcases/kernel/syscalls/fallocate/
fallocate05.c 34 static int fd; variable
41 fd = SAFE_OPEN(MNTPOINT "/test_file", O_WRONLY | O_CREAT);
43 if (fallocate(fd, 0, 0, FALLOCATE_SIZE)) {
46 SAFE_CLOSE(fd);
51 "fallocate(fd, 0, 0, %i)", FALLOCATE_SIZE);
56 ret = write(fd, buf, sizeof(buf));
63 ret = fallocate(fd, 0, FALLOCATE_SIZE, FALLOCATE_SIZE);
72 ret = fallocate(fd, FALLOC_FL_PUNCH_HOLE, 0, FALLOCATE_SIZE);
81 ret = write(fd, buf, 10);
87 SAFE_CLOSE(fd);
    [all...]
  /external/ltp/testcases/kernel/syscalls/fchmod/
fchmod01.c 123 int fd; variable
138 TEST(fchmod(fd, 0700));
164 if ((fd = open(fname, O_RDWR | O_CREAT, 0700)) == -1)
166 else if (write(fd, buf, strlen(buf)) == -1)
176 if (close(fd) == -1)
  /external/ltp/testcases/kernel/syscalls/fcntl/
fcntl02.c 47 static int fd; variable
56 TEST(fcntl(fd, F_DUPFD, min_fd));
78 fd = SAFE_OPEN(fname, O_RDWR | O_CREAT, 0700);
83 if (fd > 0)
84 SAFE_CLOSE(fd);
fcntl05.c 128 int fd; variable
144 TEST(fcntl(fd, F_GETLK, &flocks));
169 if ((fd = open(fname, O_RDWR | O_CREAT, 0700)) == -1)
181 if (close(fd) == -1)
fcntl09.c 128 int fd; variable
159 TEST(fcntl(fd, F_SETLK, &flocks));
180 TEST(fcntl(fd, F_SETLK, &flocks));
214 if ((fd = creat(fname, 0644)) == -1) {
218 } else if (close(fd) == -1) {
221 } else if ((fd = open(fname, O_RDWR, 0700)) == -1) {
239 if (close(fd) == -1) {
fcntl10.c 128 int fd; variable
159 TEST(fcntl(fd, F_SETLKW, &flocks));
178 TEST(fcntl(fd, F_SETLKW, &flocks));
213 if ((fd = creat(fname, 0644)) == -1) {
217 } else if (close(fd) == -1) {
220 } else if ((fd = open(fname, O_RDWR, 0700)) == -1) {
240 if (close(fd) == -1) {
fcntl23.c 104 int fd; variable
136 TEST(fcntl(fd, F_SETLEASE, F_RDLCK));
145 TEST(fcntl(fd, F_GETLEASE));
151 TEST(fcntl(fd, F_SETLEASE, F_UNLCK));
190 if ((fd = open(fname, O_RDONLY | O_CREAT, 0777)) == -1) {
205 if (close(fd) == -1) {
fcntl24.c 104 int fd; variable
142 TEST(fcntl(fd, F_SETLEASE, F_WRLCK));
150 TEST(fcntl(fd, F_GETLEASE));
156 TEST(fcntl(fd, F_SETLEASE, F_UNLCK));
189 if ((fd = open(fname, O_RDWR | O_CREAT, 0777)) == -1) {
204 if (close(fd) == -1) {
fcntl25.c 105 int fd; variable
143 TEST(fcntl(fd, F_SETLEASE, F_WRLCK));
151 TEST(fcntl(fd, F_GETLEASE));
157 TEST(fcntl(fd, F_SETLEASE, F_UNLCK));
190 if ((fd = open(fname, O_RDONLY | O_CREAT, 0777)) == -1) {
205 if (close(fd) == -1) {
fcntl26.c 105 int fd; variable
143 TEST(fcntl(fd, F_SETLEASE, F_WRLCK));
151 TEST(fcntl(fd, F_GETLEASE));
157 TEST(fcntl(fd, F_SETLEASE, F_UNLCK));
190 if ((fd = open(fname, O_WRONLY | O_CREAT, 0777)) == -1) {
205 if (close(fd) == -1) {
fcntl27.c 105 int fd; variable
133 TEST(fcntl(fd, F_SETLEASE, F_RDLCK));
138 "fcntl(fd, F_SETLEASE, F_RDLCK) succeeded");
170 if ((fd = open(fname, O_RDWR | O_CREAT, 0777)) == -1) {
185 if (close(fd) == -1) {
fcntl28.c 102 int fd; variable
130 TEST(fcntl(fd, F_SETLEASE, F_RDLCK));
135 "fcntl(fd, F_SETLEASE, F_RDLCK) succeeded");
168 if ((fd = open(fname, O_WRONLY | O_CREAT, 0222)) == -1) {
183 if (close(fd) == -1) {
  /external/ltp/testcases/kernel/syscalls/fdatasync/
fdatasync01.c 74 static int fd; variable
96 TEST(fdatasync(fd));
132 if ((fd = open(filename, O_CREAT | O_WRONLY, 0777)) == -1) { //mode must be specified when O_CREATE is in the flag
135 if ((write(fd, filename, strlen(filename) + 1)) == -1) {
151 close(fd);
  /external/ltp/testcases/kernel/syscalls/flock/
flock02.c 89 int fd; variable
113 TEST(flock(fd, LOCK_NB));
123 TEST(flock(fd, LOCK_SH | LOCK_EX));
135 close(fd);
154 fd = open(filename, O_CREAT | O_TRUNC | O_RDWR, 0666);
155 if (fd < 0)
flock06.c 37 * This test verifies that flock locks held on one fd conflict with
38 * flock locks held on a different fd.
145 int fd; local
162 fd = SAFE_OPEN(tst_rmdir, filename, O_CREAT | O_TRUNC | O_RDWR, 0666);
163 close(fd);
  /external/ltp/testcases/kernel/syscalls/fstat/
fstat01.c 128 int fd; variable
143 TEST(fstat(fd, &statter));
165 fd = SAFE_OPEN(cleanup, fname, O_RDWR | O_CREAT, 0700);
170 if (close(fd) == -1)
  /external/ltp/testcases/kernel/syscalls/fsync/
fsync01.c 43 static int fd; variable
51 SAFE_WRITE(1, fd, BUF, sizeof(BUF));
53 TEST(fsync(fd));
65 fd = SAFE_OPEN(fname, O_RDWR | O_CREAT, 0700);
70 if (fd > 0)
71 SAFE_CLOSE(fd);
  /external/ltp/testcases/kernel/syscalls/getdtablesize/
getdtablesize01.c 57 int table_size, fd = 0, count = 0; local
84 fd = open("/etc/hosts", O_RDONLY);
86 if (fd == -1)
88 count = fd;
91 printf("Opened file num %d\n", fd);
101 else if (fd < 0 && errno == ENFILE)
  /external/ltp/testcases/kernel/syscalls/inotify_init/
inotify_init1_01.c 124 int fd, coe; local
139 fd = ltp_syscall(__NR_inotify_init1, 0);
140 if (fd == -1) {
144 coe = fcntl(fd, F_GETFD);
153 close(fd);
155 fd = ltp_syscall(__NR_inotify_init1, IN_CLOEXEC);
156 if (fd == -1) {
160 coe = fcntl(fd, F_GETFD);
168 close(fd);
inotify_init1_02.c 121 int fd, fl; local
136 fd = ltp_syscall(__NR_inotify_init1, 0);
137 if (fd == -1) {
141 fl = fcntl(fd, F_GETFL);
151 close(fd);
153 fd = ltp_syscall(__NR_inotify_init1, IN_NONBLOCK);
154 if (fd == -1) {
158 fl = fcntl(fd, F_GETFL);
168 close(fd);
  /external/ltp/testcases/kernel/syscalls/ioctl/
ioctl05.c 31 static int fd; variable
40 fd = SAFE_OPEN(tst_device->dev, O_RDONLY);
42 SAFE_IOCTL(fd, BLKGETSIZE, &size);
43 SAFE_IOCTL(fd, BLKGETSIZE64, &size64);
54 if (lseek(fd, size * 512, SEEK_SET) != (off_t)size * 512) {
61 ret = read(fd, &buf, 1);
71 SAFE_CLOSE(fd);
76 if (fd > 0)
77 SAFE_CLOSE(fd);

Completed in 358 milliseconds

<<11121314151617181920>>