/third_party/rust/crates/rustix/tests/fs/ |
H A D | invalid_offset.rs | 16 use rustix::fs::{cwd, openat, seek, Mode, OFlags}; in invalid_offset_seek() 18 let dir = openat(cwd(), tmp.path(), OFlags::RDONLY, Mode::empty()).unwrap(); in invalid_offset_seek() 19 let file = openat( in invalid_offset_seek() 45 use rustix::fs::{cwd, fallocate, openat, FallocateFlags, Mode, OFlags}; in invalid_offset_fallocate() 47 let dir = openat(cwd(), tmp.path(), OFlags::RDONLY, Mode::empty()).unwrap(); in invalid_offset_fallocate() 48 let file = openat( in invalid_offset_fallocate() 75 use rustix::fs::{cwd, fadvise, openat, Advice, Mode, OFlags}; in invalid_offset_fadvise() 77 let dir = openat(cwd(), tmp.path(), OFlags::RDONLY, Mode::empty()).unwrap(); in invalid_offset_fadvise() 78 let file = openat( in invalid_offset_fadvise() 106 use rustix::fs::{cwd, openat, Mod in invalid_offset_pread() [all...] |
H A D | renameat.rs | 12 use rustix::fs::{cwd, openat, renameat, statat, AtFlags, Mode, OFlags}; in test_renameat() 15 let dir = openat( in test_renameat() 23 let _ = openat(&dir, "foo", OFlags::CREATE | OFlags::WRONLY, Mode::empty()).unwrap(); in test_renameat() 35 use rustix::fs::{cwd, openat, renameat, statat, AtFlags, Mode, OFlags}; in test_renameat_overwrite() 38 let dir = openat( in test_renameat_overwrite() 46 let _ = openat(&dir, "foo", OFlags::CREATE | OFlags::WRONLY, Mode::empty()).unwrap(); in test_renameat_overwrite() 47 let _ = openat(&dir, "bar", OFlags::CREATE | OFlags::WRONLY, Mode::empty()).unwrap(); in test_renameat_overwrite() 57 use rustix::fs::{cwd, openat, renameat_with, statat, AtFlags, Mode, OFlags, RenameFlags}; in test_renameat_with() 60 let dir = openat( in test_renameat_with() 68 let _ = openat( in test_renameat_with() [all...] |
H A D | flock.rs | 4 use rustix::fs::{cwd, flock, openat, FlockOperation, Mode, OFlags}; in test_flock() 6 let f = openat(cwd(), "Cargo.toml", OFlags::RDONLY, Mode::empty()).unwrap(); in test_flock() 9 let g = openat(cwd(), "Cargo.toml", OFlags::RDONLY, Mode::empty()).unwrap(); in test_flock() 15 let f = openat(cwd(), "Cargo.toml", OFlags::RDONLY, Mode::empty()).unwrap(); in test_flock() 17 let g = openat(cwd(), "Cargo.toml", OFlags::RDONLY, Mode::empty()).unwrap(); in test_flock() 24 let f = openat(cwd(), "Cargo.toml", OFlags::RDONLY, Mode::empty()).unwrap(); in test_flock() 28 let g = openat(cwd(), "Cargo.toml", OFlags::RDONLY, Mode::empty()).unwrap(); in test_flock()
|
H A D | utimensat.rs | 4 use rustix::fs::{cwd, openat, statat, utimensat, AtFlags, Mode, OFlags, Timespec, Timestamps}; in test_utimensat() 7 let dir = openat( in test_utimensat() 15 let _ = openat( in test_utimensat() 64 use rustix::fs::{cwd, openat, utimensat, AtFlags, Mode, OFlags, Timespec, Timestamps}; in test_utimensat_noent() 67 let dir = openat( in test_utimensat_noent() 94 use rustix::fs::{cwd, openat, utimensat, AtFlags, Mode, OFlags, Timespec, Timestamps}; in test_utimensat_notdir() 97 let dir = openat( in test_utimensat_notdir() 105 let foo = openat( in test_utimensat_notdir()
|
H A D | long_paths.rs | 4 use rustix::fs::{cwd, mkdirat, openat, Mode, OFlags}; in test_long_paths() 7 let dir = openat(cwd(), tmp.path(), OFlags::RDONLY, Mode::empty()).unwrap(); in test_long_paths() 26 let _ = openat(&dir, &long_path, OFlags::RDONLY, Mode::empty()).unwrap(); in test_long_paths() 27 let _ = openat(&dir, &too_long_path, OFlags::RDONLY, Mode::empty()).unwrap_err(); in test_long_paths()
|
H A D | mkdirat.rs | 4 use rustix::fs::{cwd, mkdirat, openat, statat, unlinkat, AtFlags, FileType, Mode, OFlags}; in test_mkdirat() 7 let dir = openat(cwd(), tmp.path(), OFlags::RDONLY, Mode::empty()).unwrap(); in test_mkdirat() 18 use rustix::fs::{cwd, mkdirat, openat, statat, unlinkat, AtFlags, FileType, Mode, OFlags}; in test_mkdirat_with_o_path() 21 let dir = openat( in test_mkdirat_with_o_path()
|
H A D | y2038.rs | 11 cwd, fstat, openat, statat, utimensat, AtFlags, Mode, OFlags, Timespec, Timestamps, in test_y2038_with_utimensat() 16 let dir = openat(&cwd(), tmp.path(), OFlags::RDONLY, Mode::empty()).unwrap(); in test_y2038_with_utimensat() 33 let _ = openat(&dir, "foo", OFlags::CREATE | OFlags::WRONLY, Mode::RUSR).unwrap(); in test_y2038_with_utimensat() 73 let file = openat(&dir, "foo", OFlags::RDONLY, Mode::empty()).unwrap(); in test_y2038_with_utimensat() 110 cwd, fstat, futimens, openat, statat, AtFlags, Mode, OFlags, Timespec, Timestamps, in test_y2038_with_futimens() 115 let dir = openat(&cwd(), tmp.path(), OFlags::RDONLY, Mode::empty()).unwrap(); in test_y2038_with_futimens() 132 let file = openat(&dir, "foo", OFlags::CREATE | OFlags::WRONLY, Mode::RUSR).unwrap(); in test_y2038_with_futimens() 169 let file = openat(&dir, "foo", OFlags::RDONLY, Mode::empty()).unwrap(); in test_y2038_with_futimens()
|
H A D | openat.rs | 3 use rustix::fs::{cwd, openat, Mode, OFlags}; 9 let dir = openat( in test_openat_tmpfile() 16 let f = match openat( in test_openat_tmpfile()
|
H A D | futimens.rs | 4 use rustix::fs::{cwd, fstat, futimens, openat, Mode, OFlags, Timespec, Timestamps}; in test_futimens() 7 let dir = openat(cwd(), tmp.path(), OFlags::RDONLY, Mode::empty()).unwrap(); in test_futimens() 9 let foo = openat( in test_futimens()
|
H A D | file.rs | 14 rustix::fs::openat( in test_file() 24 let file = rustix::fs::openat( in test_file() 33 rustix::fs::openat( in test_file()
|
H A D | dir.rs | 3 let t = rustix::fs::openat( in test_dir() 13 let _file = rustix::fs::openat( in test_dir()
|
H A D | mknodat.rs | 9 use rustix::fs::{cwd, mknodat, openat, statat, unlinkat, AtFlags, FileType, Mode, OFlags}; in test_mknodat() 12 let dir = openat(cwd(), tmp.path(), OFlags::RDONLY, Mode::empty()).unwrap(); in test_mknodat()
|
/third_party/musl/libc-test/src/functionalext/supplement/fcntl/ |
H A D | openat.c | 27 int ret = openat(0, "/dev/null", O_CREAT, TEST_MODE); in openat_0100() 30 ret = openat(0, "/dev/null", O_TMPFILE, TEST_MODE); in openat_0100() 33 ret = openat(0, "/dev/null", O_RDONLY); in openat_0100() 44 int ret = openat(0, "openat_test", O_CREAT, TEST_MODE); in openat_0200() 47 ret = openat(0, "openat_test", O_TMPFILE, TEST_MODE); in openat_0200() 50 ret = openat(0, "openat_test", O_RDONLY); in openat_0200()
|
/third_party/rust/crates/rustix/tests/io/ |
H A D | read_write.rs | 9 use rustix::fs::{cwd, openat, Mode, OFlags}; in test_readwrite_pv() 13 let dir = openat(cwd(), tmp.path(), OFlags::RDONLY, Mode::empty()).unwrap(); in test_readwrite_pv() 14 let foo = openat( in test_readwrite_pv() 47 use rustix::fs::{cwd, openat, Mode, OFlags}; in test_readwrite_p() 51 let dir = openat(cwd(), tmp.path(), OFlags::RDONLY, Mode::empty()).unwrap(); in test_readwrite_p() 52 let foo = openat( in test_readwrite_p() 72 use rustix::fs::{cwd, openat, seek, Mode, OFlags}; in test_readwrite_v() 76 let dir = openat(cwd(), tmp.path(), OFlags::RDONLY, Mode::empty()).unwrap(); in test_readwrite_v() 77 let foo = openat( in test_readwrite_v() 98 use rustix::fs::{cwd, openat, see in test_readwrite() [all...] |
/third_party/ltp/testcases/kernel/syscalls/openat/ |
H A D | openat02.c | 20 * 1)openat() succeeds to open a file in append mode, when 22 * 2)openat() succeeds to enable the close-on-exec flag for a 24 * 3)openat() succeeds to allow files whose sizes cannot be 27 * 4)openat() succeeds to not update the file last access time 30 * 5)openat() succeeds to open the file failed if the file is a 32 * 6)openat() succeeds to truncate the file to length 0 if the file 51 #include "openat.h" 122 TEST(openat(AT_FDCWD, TEST_FILE, O_APPEND | O_RDWR, 0777)); in testfunc_append() 125 tst_resm(TFAIL | TTERRNO, "openat failed"); in testfunc_append() 134 tst_resm(TPASS, "test O_APPEND for openat succes in testfunc_append() [all...] |
H A D | openat01.c | 11 * This test case will verify basic function of openat. 64 TST_EXP_FAIL2(openat(*tc->dir_fd, tc->pathname, O_RDWR, 0600), in verify_openat() 65 ENOTDIR, "openat with a filefd instead of dirfd"); in verify_openat() 67 TST_EXP_FAIL2(openat(*tc->dir_fd, tc->pathname, O_RDWR, 0600), in verify_openat() 68 EBADF, "openat with invalid fd"); in verify_openat() 71 TST_EXP_FD(openat(*tc->dir_fd, tc->pathname, O_RDWR, 0600)); in verify_openat()
|
/third_party/rust/crates/rustix/tests/mm/ |
H A D | mmap.rs | 7 use rustix::fs::{cwd, openat, Mode, OFlags}; in test_mmap() 14 let dir = openat(cwd(), tmp.path(), OFlags::RDONLY, Mode::empty()).unwrap(); in test_mmap() 16 let file = openat( in test_mmap() 26 let file = openat(&dir, "foo", OFlags::RDONLY, Mode::empty()).unwrap(); in test_mmap() 43 let file = openat(&dir, "foo", OFlags::RDONLY, Mode::empty()).unwrap(); in test_mmap()
|
/third_party/musl/src/fcntl/ |
H A D | openat.c | 5 int openat(int fd, const char *filename, int flags, ...) in openat() function 19 weak_alias(openat, openat64);
|
/third_party/musl/porting/linux/user/include/fortify/ |
H A D | fcntl.h | 36 int __openat_real(int, const char*, int, ...) __DIAGNOSE_RENAME(openat); variable 64 int openat(int dirfd, const char* const __DIAGNOSE_PASS_OBJECT_SIZE path, int flags) 66 __DIAGNOSE_ERROR_IF(__DIAGNOSE_OPEN_MODES_USEFUL(flags), "'openat' " OPEN_TOO_FEW_ARGS_ERROR) 76 int openat(int dirfd, const char* const __DIAGNOSE_PASS_OBJECT_SIZE path, int flags, mode_t modes) 78 __DIAGNOSE_WARNING_IF(!__DIAGNOSE_OPEN_MODES_USEFUL(flags) && modes, "'openat' " OPEN_USELESS_MODES_WARNING)
|
/third_party/musl/include/fortify/linux/ |
H A D | fcntl.h | 36 int __openat_real(int, const char*, int, ...) __DIAGNOSE_RENAME(openat); variable 64 int openat(int dirfd, const char* const __DIAGNOSE_PASS_OBJECT_SIZE path, int flags) 66 __DIAGNOSE_ERROR_IF(__DIAGNOSE_OPEN_MODES_USEFUL(flags), "'openat' " OPEN_TOO_FEW_ARGS_ERROR) 76 int openat(int dirfd, const char* const __DIAGNOSE_PASS_OBJECT_SIZE path, int flags, mode_t modes) 78 __DIAGNOSE_WARNING_IF(!__DIAGNOSE_OPEN_MODES_USEFUL(flags) && modes, "'openat' " OPEN_USELESS_MODES_WARNING)
|
/third_party/musl/libc-test/src/functionalext/supplement/stat/ |
H A D | futimesat.c | 37 int fd = openat(dir_fd, "test.txt", O_CREAT | O_RDWR | O_EXCL, 0666); in futimesat_0100() 39 t_error("%s openat failed\n", __func__); in futimesat_0100() 89 int fd = openat(dir_fd, "test.txt", O_CREAT | O_RDWR | O_EXCL, 0666); in futimesat_0200() 91 t_error("%s openat failed\n", __func__); in futimesat_0200() 144 int fd = openat(dir_fd, "test.txt", O_CREAT | O_RDWR | O_EXCL, 0666); in futimesat_time64_0200() 146 t_error("%s openat failed\n", __func__); in futimesat_time64_0200()
|
/third_party/musl/libc-test/src/functionalext/fortify/ |
H A D | fcntl_ext.c | 133 * @tc.desc : test openat normal condition 138 int fd = openat(AT_FDCWD, "/proc/version", O_RDWR | O_CREAT, FILE_MODE_ALL); in openat_0010() 147 * @tc.desc : test openat O_CREAT without mode 165 openat(AT_FDCWD, "/proc/version", flags); in openat_0020() 181 * @tc.desc : test openat O_TMPFILE without mode 199 openat(AT_FDCWD, "/proc/version", flags); in openat_0030() 215 * @tc.desc : test openat only O_RDWR 220 int fd = openat(AT_FDCWD, "/proc/version", O_RDWR); in openat_0040()
|
/third_party/ltp/testcases/network/nfs/nfs_stress/ |
H A D | nfs05_make_tree.c | 142 fd = openat(dirfd, "makefile", O_CREAT | O_RDWR, in thread_fn() 145 tst_brk(TFAIL | TERRNO, "openat(makefile) failed"); in thread_fn() 156 fd = openat(dirfd, cfile, O_CREAT | O_RDWR, in thread_fn() 160 "openat(%s) failed", cfile); in thread_fn() 173 dirfd = openat(dirfd, "dir", O_DIRECTORY); in thread_fn() 175 tst_brk(TFAIL | TERRNO, "openat('dir') failed"); in thread_fn()
|
/third_party/rust/crates/rustix/src/fs/ |
H A D | at.rs | 41 /// `openat(dirfd, path, oflags, mode)`—Opens a file. 43 /// POSIX guarantees that `openat` will use the lowest unused file descriptor, 53 /// [POSIX]: https://pubs.opengroup.org/onlinepubs/9699919799/functions/openat.html 56 pub fn openat<P: path::Arg, Fd: AsFd>( in openat() functions 63 backend::fs::syscalls::openat(dirfd.as_fd(), path, oflags, create_mode) in openat()
|
/third_party/musl/Benchmark/musl/ |
H A D | libc_fcntl.cpp | 315 int fd = openat(AT_FDCWD, filename, O_RDONLY, OPEN_MODE); in Bm_function_Openat_rdonly() 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_CREAT, OPEN_MODE); in Bm_function_Openat_RelativePath_fd()
|