Home
last modified time | relevance | path

Searched refs:file_fd (Results 1 – 13 of 13) sorted by relevance

/third_party/ltp/testcases/kernel/syscalls/fcntl/
Dfcntl17.c71 int file_fd; variable
131 if ((file_fd = mkstemp(template)) < 0) { in setup()
135 if (write(file_fd, buf, STRINGSIZE) < 0) { in setup()
172 close(file_fd); in cleanup()
190 if (fcntl(file_fd, F_SETLK, &lock1) < 0) { in do_child1()
201 fcntl(file_fd, F_SETLK, &unlock); in do_child1()
222 if (fcntl(file_fd, F_SETLK, &lock2) < 0) { in do_child2()
233 if (fcntl(file_fd, F_SETLKW, &lock4) < 0) { in do_child2()
260 if (fcntl(file_fd, F_SETLK, &lock3) < 0) { in do_child3()
271 if (fcntl(file_fd, F_SETLKW, &lock5) < 0) { in do_child3()
[all …]
Dfcntl07.c69 static int file_fd, pipe_fds[2], fifo_fd; variable
77 {&file_fd, "regular file"},
170 file_fd = SAFE_OPEN(cleanup, "test_file", O_CREAT | O_RDWR, 0666); in setup()
178 if (file_fd > 0 && close(file_fd)) in cleanup()
/third_party/ltp/testcases/kernel/syscalls/statx/
Dstatx02.c37 static int file_fd; variable
43 TEST(statx(file_fd, "", AT_EMPTY_PATH, 0, &buf)); in test_empty_path()
109 file_fd = SAFE_OPEN(TESTFILE, O_RDWR | O_CREAT, MODE); in setup()
110 SAFE_WRITE(0, file_fd, data_buf, sizeof(data_buf)); in setup()
117 if (file_fd > 0) in cleanup()
118 SAFE_CLOSE(file_fd); in cleanup()
Dstatx01.c149 int file_fd; in setup() local
155 file_fd = SAFE_OPEN(TESTFILE, O_RDWR|O_CREAT, MODE); in setup()
156 SAFE_WRITE(1, file_fd, data_buff, sizeof(data_buff)); in setup()
157 SAFE_CLOSE(file_fd); in setup()
Dstatx03.c101 int file_fd; in setup() local
103 file_fd = SAFE_OPEN(TESTFILE, O_RDWR | O_CREAT, MODE); in setup()
104 SAFE_CLOSE(file_fd); in setup()
/third_party/ltp/testcases/kernel/syscalls/ioctl/
Dioctl_loop03.c19 static int dev_num, dev_fd, file_fd, attach_flag; variable
23 TEST(ioctl(dev_fd, LOOP_CHANGE_FD, file_fd)); in verify_ioctl_loop()
48 file_fd = SAFE_OPEN("test.img", O_RDWR); in setup()
59 if (file_fd > 0) in cleanup()
60 SAFE_CLOSE(file_fd); in cleanup()
Dioctl_loop02.c23 static int file_fd, file_change_fd, file_fd_invalid; variable
25 static int attach_flag, dev_fd, file_fd; variable
33 SAFE_IOCTL(dev_fd, LOOP_SET_FD, file_fd); in verify_ioctl_loop()
103 file_fd = SAFE_OPEN("test.img", O_RDONLY); in setup()
112 if (file_fd > 0) in cleanup()
113 SAFE_CLOSE(file_fd); in cleanup()
Dioctl_loop04.c24 static int dev_num, dev_fd, file_fd, attach_flag; variable
37 file_fd = SAFE_OPEN("test.img", O_RDWR); in verify_ioctl_loop()
57 SAFE_CLOSE(file_fd); in verify_ioctl_loop()
79 if (file_fd > 0) in cleanup()
80 SAFE_CLOSE(file_fd); in cleanup()
Dioctl_loop07.c21 static int dev_num, dev_fd, file_fd, attach_flag; variable
78 if (file_fd > 0) in cleanup()
79 SAFE_CLOSE(file_fd); in cleanup()
/third_party/ltp/testcases/kernel/syscalls/fstatfs/
Dfstatfs01.c56 static int file_fd; variable
63 {&file_fd, "fstatfs() on a file"},
107 file_fd = SAFE_OPEN(cleanup, "test_file", O_RDWR | O_CREAT, 0700); in setup()
116 if (file_fd > 0 && close(file_fd)) in cleanup()
/third_party/ltp/testcases/kernel/syscalls/readdir/
Dreaddir21.c54 static unsigned int del_dir_fd, file_fd; variable
68 {&file_fd, &dirp, sizeof(struct old_linux_dirent), ENOTDIR},
109 file_fd = SAFE_OPEN(cleanup, TEST_FILE, O_RDWR | O_CREAT, 0777); in setup()
146 if (file_fd > 0) in cleanup()
147 close(file_fd); in cleanup()
/third_party/ltp/testcases/kernel/syscalls/readlinkat/
Dreadlinkat02.c44 static int file_fd, dir_fd; variable
54 {&file_fd, SYMLINK_FILE, BUFF_SIZE, ENOTDIR},
92 file_fd = SAFE_OPEN(cleanup, TEST_FILE, O_RDWR | O_CREAT, 0644); in setup()
119 close(file_fd); in cleanup()
/third_party/ltp/lib/
Dtst_device.c145 int dev_fd, file_fd; in tst_attach_device() local
154 file_fd = open(file, O_RDWR); in tst_attach_device()
155 if (file_fd < 0) { in tst_attach_device()
161 if (ioctl(dev_fd, LOOP_SET_FD, file_fd) < 0) { in tst_attach_device()
163 close(file_fd); in tst_attach_device()
178 close(file_fd); in tst_attach_device()
185 close(file_fd); in tst_attach_device()