Home
last modified time | relevance | path

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

12345678910>>...12

/external/ltp/testcases/kernel/syscalls/copy_file_range/
Dcopy_file_range02.c201 fd_src = SAFE_OPEN(FILE_SRC_PATH, O_RDWR | O_CREAT, 0664); in setup()
202 fd_dest = SAFE_OPEN(FILE_DEST_PATH, O_RDWR | O_CREAT, 0664); in setup()
203 fd_rdonly = SAFE_OPEN(FILE_RDONL_PATH, O_RDONLY | O_CREAT, 0664); in setup()
204 fd_dir = SAFE_OPEN(FILE_DIR_PATH, O_DIRECTORY); in setup()
206 fd_append = SAFE_OPEN(FILE_DEST_PATH, in setup()
208 fd_immutable = SAFE_OPEN(FILE_IMMUTABLE_PATH, O_RDWR | O_CREAT, 0664); in setup()
209 fd_swapfile = SAFE_OPEN(FILE_SWAP_PATH, O_RDWR | O_CREAT, 0600); in setup()
212 fd_blkdev = SAFE_OPEN(dev_path, O_RDWR, 0600); in setup()
214 fd_chrdev = SAFE_OPEN(FILE_CHRDEV, O_RDWR, 0600); in setup()
215 fd_fifo = SAFE_OPEN(FILE_FIFO, O_RDWR, 0600); in setup()
[all …]
Dcopy_file_range03.c63 fd_dest = SAFE_OPEN(FILE_DEST_PATH, O_RDWR | O_CREAT, 0664); in setup()
64 fd_src = SAFE_OPEN(FILE_SRC_PATH, O_RDWR | O_CREAT, 0664); in setup()
67 fd_src = SAFE_OPEN(FILE_SRC_PATH, O_RDONLY); in setup()
/external/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()
/external/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()
/external/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()
Dsplice03.c68 rdfd = SAFE_OPEN(TEST_FILE, O_RDONLY); in setup()
70 wrfd = SAFE_OPEN(TEST_FILE2, O_WRONLY | O_CREAT, 0644); in setup()
72 appendfd = SAFE_OPEN(TEST_FILE3, O_RDWR | O_CREAT | O_APPEND, 0644); in setup()
/external/ltp/testcases/kernel/pty/
Dpty01.c82 masterfd = SAFE_OPEN(NULL, MASTERCLONE, O_RDWR); in test1()
116 slavefd = SAFE_OPEN(NULL, slavename, O_RDWR); in test1()
200 masterfd = SAFE_OPEN(NULL, MASTERCLONE, O_RDWR); in test2()
215 slavefd = SAFE_OPEN(NULL, slavename, O_RDWR); in test2()
256 masterfd = SAFE_OPEN(NULL, MASTERCLONE, O_RDWR); in test3()
277 masterfd = SAFE_OPEN(NULL, MASTERCLONE, O_RDWR); in test4()
292 slavefd = SAFE_OPEN(NULL, slavename, O_RDWR); in test4()
/external/ltp/testcases/kernel/syscalls/tee/
Dtee01.c34 fd_out = SAFE_OPEN(TESTFILE2, O_RDONLY); in check_file()
56 fd_in = SAFE_OPEN(TESTFILE1, O_RDONLY); in tee_test()
57 fd_out = SAFE_OPEN(TESTFILE2, O_WRONLY | O_CREAT | O_TRUNC, 0777); in tee_test()
97 fd_in = SAFE_OPEN(TESTFILE1, O_WRONLY | O_CREAT | O_TRUNC, 0777); in setup()
/external/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()
/external/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()
/external/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()
/external/ltp/testcases/kernel/syscalls/fcntl/
Dfcntl33.c114 fd = SAFE_OPEN("file", O_RDONLY); in do_test()
185 SAFE_OPEN("file", O_RDONLY); in do_child()
188 SAFE_OPEN("file", O_WRONLY); in do_child()
191 SAFE_OPEN("file", O_RDWR); in do_child()
/external/ltp/testcases/kernel/syscalls/fanotify/
Dfanotify02.c63 fd = SAFE_OPEN(fname, O_RDWR | O_CREAT, 0700); in test01()
83 fd = SAFE_OPEN(fname, O_RDONLY); in test01()
116 fd = SAFE_OPEN(fname, O_RDONLY); in test01()
120 fd = SAFE_OPEN(".", O_RDONLY | O_DIRECTORY); in test01()
/external/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()
/external/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()
/external/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()
/external/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()
/external/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()
Dlseek02.c75 fd = SAFE_OPEN(TFILE, O_RDWR | O_CREAT, 0777); in setup()
77 pfd1 = SAFE_OPEN(TFIFO1, O_RDWR, 0777); in setup()
80 pfd2 = SAFE_OPEN(TFIFO2, O_RDWR, 0777); in setup()
/external/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()
/external/ltp/testcases/kernel/syscalls/preadv2/
Dpreadv202.c92 fd1 = SAFE_OPEN("file1", O_RDWR | O_CREAT, 0644); in setup()
94 fd2 = SAFE_OPEN("file2", O_WRONLY | O_CREAT, 0644); in setup()
95 fd4 = SAFE_OPEN(".", O_RDONLY); in setup()
/external/ltp/testcases/kernel/syscalls/readdir/
Dreaddir21.c106 del_dir_fd = SAFE_OPEN(cleanup, TEST_DIR, O_RDONLY | O_DIRECTORY); in setup()
109 file_fd = SAFE_OPEN(cleanup, TEST_FILE, O_RDWR | O_CREAT, 0777); in setup()
112 dir_fd = SAFE_OPEN(cleanup, TEST_DIR4, O_RDONLY | O_DIRECTORY); in setup()
/external/ltp/testcases/kernel/syscalls/renameat2/
Drenameat202.c96 olddirfd = SAFE_OPEN(cleanup, TEST_DIR, O_DIRECTORY); in setup()
97 newdirfd = SAFE_OPEN(cleanup, TEST_DIR2, O_DIRECTORY); in setup()
145 fd = SAFE_OPEN(cleanup, contentfile, O_RDONLY); in renameat2_verify()

12345678910>>...12