Home
last modified time | relevance | path

Searched refs:SAFE_OPEN (Results 1 – 25 of 376) sorted by relevance

12345678910>>...16

/third_party/ltp/testcases/kernel/syscalls/copy_file_range/
Dcopy_file_range02.c205 fd_src = SAFE_OPEN(FILE_SRC_PATH, O_RDWR | O_CREAT, 0664); in setup()
206 fd_dest = SAFE_OPEN(FILE_DEST_PATH, O_RDWR | O_CREAT, 0664); in setup()
207 fd_rdonly = SAFE_OPEN(FILE_RDONL_PATH, O_RDONLY | O_CREAT, 0664); in setup()
208 fd_dir = SAFE_OPEN(FILE_DIR_PATH, O_DIRECTORY); in setup()
210 fd_append = SAFE_OPEN(FILE_DEST_PATH, in setup()
212 fd_immutable = SAFE_OPEN(FILE_IMMUTABLE_PATH, O_RDWR | O_CREAT, 0664); in setup()
213 fd_swapfile = SAFE_OPEN(FILE_SWAP_PATH, O_RDWR | O_CREAT, 0600); in setup()
216 fd_blkdev = SAFE_OPEN(dev_path, O_RDWR, 0600); in setup()
218 fd_chrdev = SAFE_OPEN(FILE_CHRDEV, O_RDWR, 0600); in setup()
219 fd_fifo = SAFE_OPEN(FILE_FIFO, O_RDWR, 0600); in setup()
[all …]
Dcopy_file_range03.c67 fd_dest = SAFE_OPEN(FILE_DEST_PATH, O_RDWR | O_CREAT, 0664); in setup()
68 fd_src = SAFE_OPEN(FILE_SRC_PATH, O_RDWR | O_CREAT, 0664); in setup()
71 fd_src = SAFE_OPEN(FILE_SRC_PATH, O_RDONLY); in setup()
/third_party/ltp/testcases/kernel/logging/kmsg/
Dkmsg01.c51 f = SAFE_OPEN("/dev/kmsg", O_WRONLY); in inject_msg()
77 f = SAFE_OPEN("/dev/kmsg", O_RDONLY | O_NONBLOCK); in find_msg()
233 fd = SAFE_OPEN("/dev/kmsg", O_RDONLY | O_NONBLOCK); in test_read_nonblock()
249 fd = SAFE_OPEN("/dev/kmsg", O_RDONLY); in test_read_block()
265 fd = SAFE_OPEN("/dev/kmsg", O_RDONLY | O_NONBLOCK); in test_partial_read()
341 fd = SAFE_OPEN("/dev/kmsg", O_RDONLY | O_NONBLOCK); in test_read_returns_first_message()
394 fd = SAFE_OPEN("/dev/kmsg", O_RDONLY | O_NONBLOCK); in test_messages_overwritten()
483 fd = SAFE_OPEN("/dev/kmsg", O_RDONLY | O_NONBLOCK); in test_seek()
484 fd2 = SAFE_OPEN("/dev/kmsg", O_RDONLY | O_NONBLOCK); in test_seek()
519 fd = SAFE_OPEN("/dev/kmsg", O_RDONLY | O_NONBLOCK); in test_seek()
/third_party/ltp/testcases/kernel/syscalls/symlinkat/
Dsymlinkat01.c171 newdirfd = SAFE_OPEN(cleanup, TEST_DIR2, O_DIRECTORY); in setup_every_copy()
185 fd = SAFE_OPEN(cleanup, desc->referencefn1, O_RDWR); in mysymlinkat_test()
189 fd = SAFE_OPEN(cleanup, desc->referencefn2, O_RDONLY); in mysymlinkat_test()
224 olddirfd = SAFE_OPEN(cleanup, TEST_DIR1, O_DIRECTORY); in setup()
225 deldirfd = SAFE_OPEN(cleanup, TEST_DIR3, O_DIRECTORY); in setup()
227 fd = SAFE_OPEN(cleanup, TEST_DIR1 "/" TEST_FILE1, O_CREAT | O_EXCL, 0600); in setup()
/third_party/ltp/testcases/kernel/pty/
Dpty01.c79 masterfd = SAFE_OPEN(NULL, MASTERCLONE, O_RDWR); in test1()
113 slavefd = SAFE_OPEN(NULL, slavename, O_RDWR); in test1()
197 masterfd = SAFE_OPEN(NULL, MASTERCLONE, O_RDWR); in test2()
212 slavefd = SAFE_OPEN(NULL, slavename, O_RDWR); in test2()
253 masterfd = SAFE_OPEN(NULL, MASTERCLONE, O_RDWR); in test3()
274 masterfd = SAFE_OPEN(NULL, MASTERCLONE, O_RDWR); in test4()
289 slavefd = SAFE_OPEN(NULL, slavename, O_RDWR); in test4()
/third_party/ltp/testcases/kernel/syscalls/splice/
Dsplice01.c37 fd_out = SAFE_OPEN(TESTFILE2, O_RDONLY); in check_file()
58 fd_in = SAFE_OPEN(TESTFILE1, O_RDONLY); in splice_test()
59 fd_out = SAFE_OPEN(TESTFILE2, O_WRONLY | O_CREAT | O_TRUNC, 0666); in splice_test()
91 fd_in = SAFE_OPEN(TESTFILE1, O_WRONLY | O_CREAT | O_TRUNC, 0777); in setup()
/third_party/ltp/testcases/kernel/syscalls/tee/
Dtee01.c33 fd_out = SAFE_OPEN(TESTFILE2, O_RDONLY); in check_file()
55 fd_in = SAFE_OPEN(TESTFILE1, O_RDONLY); in tee_test()
56 fd_out = SAFE_OPEN(TESTFILE2, O_WRONLY | O_CREAT | O_TRUNC, 0777); in tee_test()
96 fd_in = SAFE_OPEN(TESTFILE1, O_WRONLY | O_CREAT | O_TRUNC, 0777); in setup()
/third_party/ltp/testcases/kernel/syscalls/linkat/
Dlinkat01.c236 newdirfd = SAFE_OPEN(cleanup, TEST_DIR2, O_DIRECTORY); in setup_every_copy()
250 fd = SAFE_OPEN(cleanup, desc->referencefn1, in mylinkat_test()
255 fd = SAFE_OPEN(cleanup, desc->referencefn2, in mylinkat_test()
305 olddirfd = SAFE_OPEN(cleanup, TEST_DIR1, O_DIRECTORY); in setup()
306 deldirfd = SAFE_OPEN(cleanup, TEST_DIR3, O_DIRECTORY); in setup()
308 fd = SAFE_OPEN(cleanup, TEST_DIR1 "/" TEST_FILE1, O_CREAT | O_EXCL, 0600); in setup()
/third_party/ltp/testcases/kernel/syscalls/flock/
Dflock06.c26 fd1 = SAFE_OPEN("testfile", O_RDWR); in verify_flock()
33 fd2 = SAFE_OPEN("testfile", O_RDWR); in verify_flock()
60 fd = SAFE_OPEN("testfile", O_CREAT | O_TRUNC | O_RDWR, 0666); in setup()
Dflock03.c29 fd2 = SAFE_OPEN("testfile", O_RDWR); in childfunc()
62 fd1 = SAFE_OPEN("testfile", O_RDWR); in verify_flock()
88 fd = SAFE_OPEN("testfile", O_CREAT | O_TRUNC | O_RDWR, 0666); in setup()
Dflock04.c32 fd1 = SAFE_OPEN("testfile", O_RDWR); in child()
52 fd2 = SAFE_OPEN("testfile", O_RDWR); in verify_flock()
82 fd = SAFE_OPEN("testfile", O_CREAT | O_TRUNC | O_RDWR, 0644); in setup()
/third_party/ltp/testcases/kernel/syscalls/fchmod/
Dfchmod06.c61 fd3 = SAFE_OPEN(MNT_POINT"/file", O_RDONLY); in setup()
62 fd1 = SAFE_OPEN("tfile_1", O_RDWR | O_CREAT, 0666); in setup()
63 fd2 = SAFE_OPEN("tfile_2", O_RDWR | O_CREAT, 0666); in setup()
/third_party/ltp/testcases/kernel/syscalls/ioctl/
Dioctl_loop02.c52 file_fd = SAFE_OPEN("test.img", tc->mode); in verify_ioctl_loop()
125 file_change_fd = SAFE_OPEN("test1.img", O_RDWR); in setup()
126 file_fd_invalid = SAFE_OPEN("test2.img", O_RDWR); in setup()
128 dev_fd = SAFE_OPEN(dev_path, O_RDWR); in setup()
/third_party/ltp/testcases/kernel/syscalls/fcntl/
Dfcntl15.c74 fd = SAFE_OPEN(tmpname, file_flag, file_mode); in lock_region_two()
87 fd = SAFE_OPEN(tmpname, file_flag, file_mode); in do_test()
126 fd[0] = SAFE_OPEN(tmpname, file_flag, file_mode); in run_test()
137 fd[1] = SAFE_OPEN(tmpname, file_flag, file_mode); in run_test()
Dfcntl33.c103 fd = SAFE_OPEN("file", O_RDONLY); in do_test()
174 SAFE_OPEN("file", O_RDONLY); in do_child()
177 SAFE_OPEN("file", O_WRONLY); in do_child()
180 SAFE_OPEN("file", O_RDWR); in do_child()
/third_party/ltp/testcases/kernel/syscalls/readdir/
Dreaddir21.c52 del_dir_fd = SAFE_OPEN(TEST_DIR, O_RDONLY | O_DIRECTORY); in setup()
55 file_fd = SAFE_OPEN(TEST_FILE, O_RDWR | O_CREAT, 0777); in setup()
58 dir_fd = SAFE_OPEN(TEST_DIR4, O_RDONLY | O_DIRECTORY); in setup()
/third_party/ltp/testcases/kernel/syscalls/getdents/
Dgetdents02.c63 fd = SAFE_OPEN(".", O_RDONLY); in setup()
64 fd_file = SAFE_OPEN("test", O_CREAT | O_RDWR, 0644); in setup()
67 fd_unlinked = SAFE_OPEN(TEST_DIR, O_DIRECTORY); in setup()
/third_party/ltp/testcases/kernel/syscalls/fanotify/
Dfanotify02.c57 fd = SAFE_OPEN(fname, O_RDWR | O_CREAT, 0700); in test01()
77 fd = SAFE_OPEN(fname, O_RDONLY); in test01()
105 fd = SAFE_OPEN(fname, O_RDONLY); in test01()
109 fd = SAFE_OPEN(".", O_RDONLY | O_DIRECTORY); in test01()
/third_party/ltp/testcases/kernel/syscalls/pidfd_send_signal/
Dpidfd_send_signal02.c73 pidfd = SAFE_OPEN("/proc/self", O_DIRECTORY | O_CLOEXEC); in setup()
74 init_pidfd = SAFE_OPEN("/proc/1", O_DIRECTORY | O_CLOEXEC); in setup()
75 dummyfd = SAFE_OPEN("dummy_file", O_RDWR | O_CREAT, 0664); in setup()
/third_party/ltp/testcases/kernel/containers/userns/
Duserns02.c94 fd = SAFE_OPEN(cleanup, path, O_WRONLY, 0644); in main()
100 fd = SAFE_OPEN(cleanup, path, O_WRONLY, 0644); in main()
107 fd = SAFE_OPEN(cleanup, path, O_WRONLY, 0644); in main()
/third_party/ltp/testcases/kernel/syscalls/close_range/
Dclose_range02.c49 fd = SAFE_OPEN("/", O_PATH); in run()
68 fd = SAFE_OPEN("/", O_PATH); in run()
84 fd = SAFE_OPEN("/", O_PATH); in run()
/third_party/ltp/testcases/kernel/syscalls/msync/
Dmsync04.c31 pagemap_fd = SAFE_OPEN("/proc/self/pagemap", O_RDONLY); in get_dirty_bit()
38 pageflags_fd = SAFE_OPEN("/proc/kpageflags", O_RDONLY); in get_dirty_bit()
50 test_fd = SAFE_OPEN("msync04/testfile", O_CREAT | O_TRUNC | O_RDWR, in test_msync()
/third_party/ltp/testcases/kernel/syscalls/read/
Dread02.c95 fd2 = SAFE_OPEN(".", O_DIRECTORY); in setup()
99 fd3 = SAFE_OPEN("test_file", O_RDWR); in setup()
111 fd4 = SAFE_OPEN("test_file", O_RDWR | O_DIRECT); in setup()
/third_party/ltp/testcases/kernel/syscalls/preadv/
Dpreadv02.c99 fd1 = SAFE_OPEN("file1", O_RDWR | O_CREAT, 0644); in setup()
101 fd2 = SAFE_OPEN("file2", O_WRONLY | O_CREAT, 0644); in setup()
102 fd4 = SAFE_OPEN(".", O_RDONLY); in setup()
/third_party/ltp/testcases/kernel/syscalls/lseek/
Dlseek07.c61 *tc->fd = SAFE_OPEN(tc->fname, O_RDWR); in verify_lseek()
76 fd1 = SAFE_OPEN(TFILE1, O_RDWR | O_CREAT, 0644); in setup()
77 fd2 = SAFE_OPEN(TFILE2, O_RDWR | O_CREAT, 0644); in setup()

12345678910>>...16