/third_party/ltp/testcases/kernel/syscalls/fcntl/ |
D | fcntl17.c | 71 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 …]
|
D | fcntl07.c | 69 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/ |
D | statx02.c | 37 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()
|
D | statx01.c | 149 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()
|
D | statx03.c | 101 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/ |
D | ioctl_loop03.c | 19 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()
|
D | ioctl_loop02.c | 23 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()
|
D | ioctl_loop04.c | 24 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()
|
D | ioctl_loop07.c | 21 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/ |
D | fstatfs01.c | 56 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/ |
D | readdir21.c | 54 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/ |
D | readlinkat02.c | 44 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/ |
D | tst_device.c | 145 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()
|