Home
last modified time | relevance | path

Searched refs:O_RDWR (Results 1 - 25 of 1129) sorted by relevance

12345678910>>...46

/third_party/ltp/testcases/kernel/syscalls/openat2/
H A Dopenat201.c27 {&dir_fd, TEST_FILE, O_RDWR, S_IRWXU, 0, &how, sizeof(*how)},
30 {&dir_fd, TEST_FILE, O_RDWR, S_IRWXU, RESOLVE_NO_XDEV, &how, sizeof(*how)},
31 {&dir_fd, TEST_FILE, O_RDWR, S_IRWXU, RESOLVE_NO_MAGICLINKS, &how, sizeof(*how)},
32 {&dir_fd, TEST_FILE, O_RDWR, S_IRWXU, RESOLVE_NO_SYMLINKS, &how, sizeof(*how)},
33 {&dir_fd, TEST_FILE, O_RDWR, S_IRWXU, RESOLVE_BENEATH, &how, sizeof(*how)},
34 {&dir_fd, TEST_FILE, O_RDWR, S_IRWXU, RESOLVE_IN_ROOT, &how, sizeof(*how)},
35 {&fd_atcwd, TEST_FILE, O_RDWR, S_IRWXU, 0, &how, sizeof(*how)},
38 {&fd_atcwd, TEST_FILE, O_RDWR, S_IRWXU, RESOLVE_NO_XDEV, &how, sizeof(*how)},
39 {&fd_atcwd, TEST_FILE, O_RDWR, S_IRWXU, RESOLVE_NO_MAGICLINKS, &how, sizeof(*how)},
40 {&fd_atcwd, TEST_FILE, O_RDWR, S_IRWX
[all...]
H A Dopenat203.c26 {"invalid-dfd", -1, TEST_FILE, O_RDWR | O_CREAT, S_IRWXU, 0, &how, sizeof(*how), EBADF},
29 {"invalid-mode", AT_FDCWD, TEST_FILE, O_RDWR | O_CREAT, -1, 0, &how, sizeof(*how), EINVAL},
30 {"invalid-resolve", AT_FDCWD, TEST_FILE, O_RDWR | O_CREAT, S_IRWXU, -1, &how, sizeof(*how), EINVAL},
31 {"invalid-size-zero", AT_FDCWD, TEST_FILE, O_RDWR | O_CREAT, S_IRWXU, 0, &how, 0, EINVAL},
32 {"invalid-size-small", AT_FDCWD, TEST_FILE, O_RDWR | O_CREAT, S_IRWXU, 0, &how, sizeof(*how) - 1, EINVAL},
33 {"invalid-size-big", AT_FDCWD, TEST_FILE, O_RDWR | O_CREAT, S_IRWXU, 0, &how, sizeof(*how) + 1, EFAULT},
34 {"invalid-size-big-with-pad", AT_FDCWD, TEST_FILE, O_RDWR | O_CREAT, S_IRWXU, 0, (struct open_how **)&phow, sizeof(*how) + 8, E2BIG},
/third_party/ltp/testcases/kernel/syscalls/name_to_handle_at/
H A Dname_to_handle_at01.c33 {&dir_fd, TEST_FILE, 0, O_RDWR},
36 {&dir_fd, TEST_FILE, AT_EMPTY_PATH, O_RDWR},
39 {&dir_fd, TEST_FILE, AT_SYMLINK_FOLLOW, O_RDWR},
42 {&dir_fd, TEST_FILE, AT_EMPTY_PATH | AT_SYMLINK_FOLLOW, O_RDWR},
48 {&fd_atcwd, TEST_FILE, 0, O_RDWR},
51 {&fd_atcwd, TEST_FILE, AT_EMPTY_PATH, O_RDWR},
54 {&fd_atcwd, TEST_FILE, AT_SYMLINK_FOLLOW, O_RDWR},
57 {&fd_atcwd, TEST_FILE, AT_EMPTY_PATH | AT_SYMLINK_FOLLOW, O_RDWR},
75 file_fd = SAFE_OPEN("foo_file", O_RDWR | O_CREAT, 0600); in setup()
/third_party/musl/libc-test/src/functionalext/supplement/unistd/
H A Dfaccessat.c35 int fd = open(ptr, O_RDWR | O_CREAT, TEST_MODE); in faccessat_0100()
68 int fd = open(ptr, O_RDWR | O_CREAT, 00040); in faccessat_0300()
85 int fd = open(ptr, O_RDWR | O_CREAT, 00020); in faccessat_0400()
102 int fd = open(ptr, O_RDWR | O_CREAT, 00010); in faccessat_0500()
122 int fd = open(ptr, O_RDWR | O_CREAT, TEST_MODE); in faccessat_0600()
139 int fd = open(ptr, O_RDWR | O_CREAT, 00070); in faccessat_0700()
156 int fd = open(ptr, O_RDWR | O_CREAT, TEST_MODE); in faccessat_0800()
173 int fd = open(ptr, O_RDWR | O_CREAT, 00070); in faccessat_0900()
192 int fd = open(ptr, O_RDWR | O_CREAT, 00070); in faccessat_1000()
210 int fd = open(ptr, O_RDWR | O_CREA in faccessat_1100()
[all...]
H A Dlseek.c39 int fd = open("lseek64_function_test.c", O_RDWR | O_CREAT, TEST_MODE); in lseek64_0100()
66 int fd = open("/data/readtest.txt", O_RDWR | O_CREAT, TEST_MODE); in lseek_0100()
83 int fd = open("/data/readtest.txt", O_RDWR | O_CREAT, TEST_MODE); in lseek_0200()
100 int fd = open("/data/readtest.txt", O_RDWR | O_CREAT, TEST_MODE); in lseek_0300()
118 int fd = open("/data/readtest.txt", O_RDWR | O_CREAT, TEST_MODE); in lseek_0400()
135 int fd = open("/data/readtest.txt", O_RDWR | O_CREAT, TEST_MODE); in lseek_0500()
152 int fd = open("/data/readtest.txt", O_RDWR | O_CREAT, TEST_MODE); in lseek_0600()
H A Dwrite.c34 int fd = open(path, O_RDWR | O_RSYNC | O_CREAT, 0664); in write_0100()
44 fd = open(path, O_RDWR); in write_0100()
68 int fd = open(path, O_RDWR | O_RSYNC | O_CREAT, 0664); in write_0200()
92 int fd = open(path, O_RDWR | O_RSYNC | O_CREAT, 0664); in write_0300()
116 int fd = open(path, O_RDWR); in write_0400()
136 int fd = open(path, O_RDWR | O_RSYNC | O_CREAT, 0664); in write_0500()
/third_party/ltp/testcases/kernel/pty/
H A Dptem01.c59 masterfd = SAFE_OPEN(NULL, MASTERCLONE, O_RDWR); in test1()
74 if ((slavefd = open(slavename, O_RDWR)) < 0) { in test1()
138 masterfd = SAFE_OPEN(NULL, MASTERCLONE, O_RDWR); in test2()
153 if ((slavefd = open(slavename, O_RDWR)) < 0) { in test2()
216 masterfd = SAFE_OPEN(NULL, MASTERCLONE, O_RDWR); in test3()
231 if ((slavefd = open(slavename, O_RDWR)) < 0) { in test3()
264 masterfd = SAFE_OPEN(NULL, MASTERCLONE, O_RDWR); in test4()
279 if ((slavefd = open(slavename, O_RDWR)) < 0) { in test4()
283 if ((slavefd2 = open(slavename, O_RDWR)) < 0) { in test4()
287 if ((slavefd3 = open(slavename, O_RDWR)) < in test4()
[all...]
H A Dpty01.c79 masterfd = SAFE_OPEN(NULL, MASTERCLONE, O_RDWR); in test1()
104 slavefd = open(slavename, 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()
291 slavefd2 = open(slavename, O_RDWR); in test4()
297 slavefd3 = open(slavename, O_RDWR); in test4()
[all...]
/third_party/musl/libc-test/src/functionalext/supplement/mman/
H A Dfunctionalext_shm_open.c31 int fd = shm_open(shm_name, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR); in shm_open_0100()
45 int fd1 = shm_open(shm_name, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR); in shm_open_0200()
48 int fd2 = shm_open(shm_name, O_RDWR, S_IRUSR | S_IWUSR); in shm_open_0200()
64 int fd1 = shm_open(shm_name, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR); in shm_open_0300()
67 int fd2 = shm_open(shm_name, O_CREAT | O_EXCL | O_RDWR, S_IRUSR | S_IWUSR); in shm_open_0300()
84 int fd = shm_open(shm_name, O_RDWR, S_IRUSR | S_IWUSR); in shm_open_0400()
/third_party/ltp/testcases/kernel/syscalls/fcntl/
H A Dfcntl32.c45 {O_RDONLY, O_RDWR},
48 {O_WRONLY, O_RDWR},
49 {O_RDWR, O_RDONLY},
50 {O_RDWR, O_WRONLY},
51 {O_RDWR, O_RDWR},
/third_party/musl/libc-test/src/functionalext/supplement/linux/
H A Dflock.c28 int fd = open("/data/test.txt", O_RDWR | O_CREAT, TEST_MODE); in flock_0100()
46 int fd = open("/data/test.txt", O_RDWR | O_CREAT, TEST_MODE); in flock_0200()
64 int fd = open("/data/test.txt", O_RDWR | O_CREAT, TEST_MODE); in flock_0300()
82 int fd = open("/data/test.txt", O_RDWR | O_CREAT, TEST_MODE); in flock_0400()
100 int fd = open("/data/test.txt", O_RDWR | O_CREAT, TEST_MODE); in flock_0500()
129 int fd = open("/data/test.txt", O_RDWR | O_CREAT, TEST_MODE); in flock_0700()
/third_party/ltp/testcases/kernel/syscalls/open_by_handle_at/
H A Dopen_by_handle_at02.c34 {"invalid-dfd", -1, &valid_fhp, O_RDWR, 0, EBADF},
35 {"stale-dfd", 0, &valid_fhp, O_RDWR, 0, ESTALE},
36 {"invalid-file-handle", AT_FDCWD, &invalid_fhp, O_RDWR, 0, EFAULT},
37 {"high-file-handle-size", AT_FDCWD, &high_fhp, O_RDWR, 0, EINVAL},
38 {"zero-file-handle-size", AT_FDCWD, &zero_fhp, O_RDWR, 0, EINVAL},
39 {"no-capability", AT_FDCWD, &valid_fhp, O_RDWR, 1, EPERM},
40 {"symlink", AT_FDCWD, &link_fhp, O_RDWR, 0, ELOOP},
/third_party/ltp/testcases/kernel/syscalls/open/
H A Dopen11.c11 * 3. Open regular file O_RDWR
12 * 4. Open regular file O_RDWR | O_SYNC
13 * 5. Open regular file O_RDWR | O_TRUNC
15 * 7. Open dir O_RDWR, expect EISDIR
19 * 11. Open hard link file O_RDWR
22 * 14. Open sym link file O_RDWR
25 * 17. Open sym link dir O_RDWR, expect EISDIR
28 * 20. Open device special file O_RDWR
85 { /* open regular file O_RDWR */
86 .desc = "Open regular file O_RDWR",
[all...]
/third_party/ltp/testcases/kernel/syscalls/copy_file_range/
H A 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()
211 O_RDWR | O_CREAT | O_APPEND, 0664); 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()
228 fd_copy = SAFE_OPEN(FILE_COPY_PATH, O_RDWR | O_CREAT | O_TRUNC, 0664); in setup()
/third_party/musl/libc-test/src/functionalext/supplement/fcntl/fcntl_gtest/
H A Dfcntl_fcntl_test.cpp58 int fd = open("test_fcntl_003.txt", O_RDWR | O_CREAT, 0644); in HWTEST_F()
79 int fd = open("test_fcntl_004.txt", O_RDWR | O_CREAT, 0644); in HWTEST_F()
96 * set, but has the O_RDWR flag set.
101 int fd = open("test_fcntl_005.txt", O_RDWR | O_CREAT, 0666); in HWTEST_F()
106 EXPECT_EQ(fdFlags & O_RDWR, O_RDWR); in HWTEST_F()
120 int fd = open("test_fcntl_006.txt", O_RDWR | O_CREAT, 0666); in HWTEST_F()
141 int fd = open("test_fcntl_007.txt", O_CREAT | O_RDWR, S_IRWXU); in HWTEST_F()
184 int fd = open("test_fcntl_009.txt", O_RDWR | O_CREAT, 0644); in HWTEST_F()
206 int fd = open("test_fcntl_010.txt", O_RDWR | O_CREA in HWTEST_F()
[all...]
/third_party/ltp/testcases/kernel/syscalls/setreuid/
H A Dsetreuid07.c36 fd = SAFE_OPEN(TEMPFILE, O_CREAT | O_RDWR, 0644); in setup()
45 TST_EXP_FAIL2(open(TEMPFILE, O_RDWR), EACCES); in run()
49 TST_EXP_FAIL2(open(TEMPFILE, O_RDWR), EACCES); in run()
55 TST_EXP_FD(open(TEMPFILE, O_RDWR)); in run()
/third_party/musl/libc-test/src/functionalext/supplement/misc/
H A Dpty.c45 int fd = open("/dev/ptmx", O_RDWR | O_NOCTTY); in ptsname_r_0100()
63 int fd = open("/dev/ptmx", O_RDWR | O_NOCTTY); in ptsname_r_0200()
93 int fd = open("/dev/ptmx", O_RDWR | O_NOCTTY); in ptsname_r_0400()
105 * @tc.desc : Open the ptmx file using flag O_RDWR (success)
111 int ret = posix_openpt(O_RDWR); in posix_openpt_0100()
118 * @tc.desc : Open the ptmx file using flag O_RDWR | O_NOCTTY (success)
124 int ret = posix_openpt(O_RDWR | O_NOCTTY); in posix_openpt_0200()
/third_party/ntfs-3g/libntfs-3g/
H A Dunix_io.c141 if (!NDevBlock(dev) && (flags & O_RDWR) == O_RDWR) in ntfs_device_unix_io_open()
147 if ((err == EACCES) && ((flags & O_RDWR) == O_RDWR)) in ntfs_device_unix_io_open()
153 if (NDevBlock(dev) && ((flags & O_RDWR) == O_RDWR)) { in ntfs_device_unix_io_open()
167 if ((flags & O_RDWR) != O_RDWR) in ntfs_device_unix_io_open()
/third_party/musl/libc-test/src/functionalext/fortify/
H A Dfcntl_ext.c42 int fd = open("/proc/version", O_RDWR | O_CREAT, FILE_MODE_ALL); in open_0010()
119 * @tc.desc : test open only O_RDWR
124 int fd = open("/proc/version", O_RDWR); in open_0040()
138 int fd = openat(AT_FDCWD, "/proc/version", O_RDWR | O_CREAT, FILE_MODE_ALL); in openat_0010()
215 * @tc.desc : test openat only O_RDWR
220 int fd = openat(AT_FDCWD, "/proc/version", O_RDWR); in openat_0040()
235 int fd = open64("/proc/version", O_RDWR | O_CREAT, FILE_MODE_ALL); in open64_0010()
312 * @tc.desc : test open64 only O_RDWR
317 int fd = open64("/proc/version", O_RDWR); in open64_0040()
331 int fd = openat64(AT_FDCWD, "/proc/version", O_RDWR | O_CREA in openat64_0010()
[all...]
H A Dunistd.c74 int fd = open("/proc/version", O_RDWR | O_CREAT, 0777); in unistd_dynamic_chk_002()
114 int fd = open("/proc/version", O_RDWR | O_CREAT, 0777); in unistd_dynamic_chk_003()
155 int fd = open("/proc/version", O_RDWR | O_CREAT, 0777); in unistd_dynamic_chk_004()
195 int fd = open("/proc/version", O_RDWR | O_CREAT, 0777); in unistd_dynamic_chk_005()
230 int fd = open(fileName, O_RDWR | O_CREAT, 0777); in unistd_dynamic_chk_006()
269 int fd = open(fileName, O_RDWR | O_CREAT, 0777); in unistd_dynamic_chk_007()
310 int fd = open(fileName, O_RDWR | O_CREAT, 0777); in unistd_dynamic_chk_008()
350 int fd = open(fileName, O_RDWR | O_CREAT, 0777); in unistd_dynamic_chk_009()
393 int fd = open("/proc/version", O_RDWR | O_CREAT, 0777); in unistd_dynamic_chk_010()
431 int fd = open("/proc/version", O_RDWR | O_CREA in unistd_dynamic_chk_011()
[all...]
/third_party/musl/Benchmark/musl/
H A Dlibc_fcntl.cpp72 int fd = open("/dev/zero", O_RDWR, OPEN_MODE); in Bm_function_Fcntl_setlkw()
120 int fd = open("/dev/zero", O_RDWR, OPEN_MODE); in Bm_function_Fcntl_setlk()
148 int fd = open("/dev/zero", O_RDWR, OPEN_MODE); in Bm_function_Fcntl_getlk()
172 int fd = open("/dev/zero", O_RDWR, OPEN_MODE); in Bm_function_Fcntl_getfd()
189 int fd = open("/dev/zero", O_RDWR, OPEN_MODE); in Bm_function_Fcntl_setfd()
238 int fd = open(filename, O_RDWR, OPEN_MODE); in Bm_function_Open_rdwr()
254 int fd = open(filename, O_RDWR | O_CREAT, OPEN_MODE); in Bm_function_Open_creat_rdwr()
332 int fd = openat(AT_FDCWD, filename, O_RDWR | O_CREAT, OPEN_MODE); in Bm_function_Openat_creat_rdwr()
349 int fd = openat(AT_FDCWD, filename, O_RDWR | O_CREAT, OPEN_MODE); in Bm_function_Openat_RelativePath_AT_FDCWD()
369 int fd = openat(fdDir, "zero", O_RDWR | O_CREA in Bm_function_Openat_RelativePath_fd()
[all...]
/third_party/musl/libc-test/src/functionalext/relro/
H A Ddlopen_ext_relro_test.c161 int relro_fd = open(relro_file, O_RDWR | O_TRUNC | O_CLOEXEC); in dlopen_ext_relro_0400()
203 int relro_fd = open(relro_file, O_RDWR | O_TRUNC | O_CLOEXEC); in dlopen_ext_relro_0600()
230 int relro_fd = open(relro_file, O_RDWR | O_TRUNC | O_CLOEXEC); in dlopen_ext_relro_0700()
258 int relro_fd = open(relro_file, O_RDWR | O_TRUNC | O_CLOEXEC); in dlopen_ext_relro_0800()
301 int relro_fd = open(relro_file, O_RDWR | O_TRUNC | O_CLOEXEC); in dlopen_ext_relro_1000()
329 int relro_fd = open(relro_file, O_RDWR | O_TRUNC | O_CLOEXEC); in dlopen_ext_relro_1100()
357 int relro_fd = open(relro_file, O_RDWR | O_TRUNC | O_CLOEXEC); in dlopen_ext_relro_1200()
384 int relro_fd = open(relro_file, O_RDWR | O_TRUNC | O_CLOEXEC); in dlopen_ext_relro_1500()
412 int relro_fd = open(relro_file, O_RDWR | O_TRUNC | O_CLOEXEC); in dlopen_ext_relro_1600()
449 int relro_fd = open(relro_file, O_RDWR | O_TRUN in dlopen_ext_relro_1700()
[all...]
/third_party/ltp/testcases/kernel/syscalls/setresuid/
H A Dsetresuid04.c35 fd = SAFE_OPEN(TEMP_FILE, O_CREAT | O_RDWR, 0644); in setup()
44 TST_EXP_FAIL2(open(TEMP_FILE, O_RDWR), EACCES); in run()
48 TST_EXP_FAIL2(open(TEMP_FILE, O_RDWR), EACCES); in run()
56 TST_EXP_FD(open(TEMP_FILE, O_RDWR)); in run()
/third_party/musl/libc-test/src/functionalext/supplement/fcntl/
H A Dopen.c86 * @tc.desc : Verify file open mode is O_RDWR | O_APPEND
93 int fd = open(path, O_RDWR | O_APPEND + O_CREAT, TEST_MODE); in open_0500()
105 * @tc.desc : Verify file open mode is O_RDWR | O_APPEND(file does not exist)
112 int fd = open(path, O_RDWR | O_APPEND); in open_0600()
123 * @tc.desc : Verify file open mode is O_RDWR | O_APPEND(file pathname is invalid)
128 int fd = open(path, O_RDWR | O_APPEND); in open_0700()
134 * @tc.desc : Verify file open mode is O_RDWR | O_CREAT
141 int fd = open(path, O_RDWR | O_CREAT, TEST_MODE); in open_0800()
153 * @tc.desc : Verify file open mode is O_RDWR | O_CLOEXEC
160 int fd = open(path, O_RDWR | O_CLOEXE in open_0900()
[all...]
/third_party/ltp/testcases/kernel/syscalls/openat/
H A Dopenat01.c64 TST_EXP_FAIL2(openat(*tc->dir_fd, tc->pathname, O_RDWR, 0600), in verify_openat()
67 TST_EXP_FAIL2(openat(*tc->dir_fd, tc->pathname, O_RDWR, 0600), in verify_openat()
71 TST_EXP_FD(openat(*tc->dir_fd, tc->pathname, O_RDWR, 0600)); in verify_openat()
85 fd = SAFE_OPEN(TEST_DIR TEST_FILE, O_CREAT | O_RDWR, 0600); in setup()

Completed in 10 milliseconds

12345678910>>...46