/dports/sysutils/vector/lucet-d4fc14a03bdb99ac83173d27fddf1aca48412a86/wasmtime/crates/test-programs/wasi-tests/src/bin/ |
H A D | path_rename.rs | 11 wasi::path_rename(dir_fd, "source", dir_fd, "target").expect("renaming a directory"); in test_path_rename() 37 wasi::path_rename(dir_fd, "source", dir_fd, "target").expect("renaming a directory"); in test_path_rename() 66 wasi::path_rename(dir_fd, "source", dir_fd, "target") in test_path_rename() 75 wasi::path_rename(dir_fd, "source", dir_fd, "target/file") in test_path_rename() 87 create_file(dir_fd, "source"); in test_path_rename() 88 wasi::path_rename(dir_fd, "source", dir_fd, "target").expect("renaming a file"); in test_path_rename() 111 create_file(dir_fd, "source"); in test_path_rename() 112 create_file(dir_fd, "target"); in test_path_rename() 114 wasi::path_rename(dir_fd, "source", dir_fd, "target") in test_path_rename() 142 wasi::path_rename(dir_fd, "source", dir_fd, "target") in test_path_rename() [all …]
|
H A D | path_link.rs | 84 wasi::path_link(dir_fd, 0, "file", dir_fd, "link") in test_path_link() 106 wasi::path_link(dir_fd, 0, "file", dir_fd, "link") in test_path_link() 116 wasi::path_link(dir_fd, 0, "file", dir_fd, "file") in test_path_link() 127 wasi::path_link(dir_fd, 0, "file", dir_fd, "link") in test_path_link() 140 wasi::path_link(dir_fd, 0, "subdir", dir_fd, "link") in test_path_link() 150 wasi::path_link(dir_fd, 0, "file", dir_fd, "link/") in test_path_link() 161 wasi::path_link(dir_fd, 0, "symlink", dir_fd, "link") in test_path_link() 169 wasi::path_link(dir_fd, 0, "symlink", dir_fd, "link") in test_path_link() 189 dir_fd, in test_path_link() 192 dir_fd, in test_path_link() [all …]
|
H A D | path_rename_trailing_slashes.rs | 4 unsafe fn test_path_rename_trailing_slashes(dir_fd: wasi::Fd) { in test_path_rename_trailing_slashes() 6 create_file(dir_fd, "source"); in test_path_rename_trailing_slashes() 9 wasi::path_rename(dir_fd, "source/", dir_fd, "target") in test_path_rename_trailing_slashes() 16 wasi::path_rename(dir_fd, "source", dir_fd, "target/") in test_path_rename_trailing_slashes() 23 wasi::path_rename(dir_fd, "source/", dir_fd, "target/") in test_path_rename_trailing_slashes() 33 wasi::path_rename(dir_fd, "source/", dir_fd, "target") in test_path_rename_trailing_slashes() 35 wasi::path_rename(dir_fd, "target", dir_fd, "source/") in test_path_rename_trailing_slashes() 37 wasi::path_rename(dir_fd, "source/", dir_fd, "target/") in test_path_rename_trailing_slashes() 53 let dir_fd = match open_scratch_directory(&arg) { in main() localVariable 54 Ok(dir_fd) => dir_fd, in main() [all …]
|
H A D | path_symlink_trailing_slashes.rs | 4 unsafe fn test_path_symlink_trailing_slashes(dir_fd: wasi::Fd) { in test_path_symlink_trailing_slashes() 7 wasi::path_symlink("source", dir_fd, "target/") in test_path_symlink_trailing_slashes() 21 wasi::path_symlink("source", dir_fd, "target/") in test_path_symlink_trailing_slashes() 32 wasi::path_symlink("source", dir_fd, "target") in test_path_symlink_trailing_slashes() 41 create_file(dir_fd, "target"); in test_path_symlink_trailing_slashes() 44 wasi::path_symlink("source", dir_fd, "target/") in test_path_symlink_trailing_slashes() 53 create_file(dir_fd, "target"); in test_path_symlink_trailing_slashes() 56 wasi::path_symlink("source", dir_fd, "target") in test_path_symlink_trailing_slashes() 76 let dir_fd = match open_scratch_directory(&arg) { in main() localVariable 77 Ok(dir_fd) => dir_fd, in main() [all …]
|
H A D | nofollow_errors.rs | 6 unsafe fn test_nofollow_errors(dir_fd: wasi::Fd) { in test_nofollow_errors() 8 wasi::path_create_directory(dir_fd, "target").expect("creating a dir"); in test_nofollow_errors() 24 wasi::path_open(dir_fd, 0, "symlink", 0, 0, 0, 0) in test_nofollow_errors() 33 dir_fd, in test_nofollow_errors() 50 wasi::path_unlink_file(dir_fd, "symlink").expect("removing a file"); in test_nofollow_errors() 51 wasi::path_remove_directory(dir_fd, "target") in test_nofollow_errors() 70 wasi::path_open(dir_fd, 0, "symlink", 0, 0, 0, 0) in test_nofollow_errors() 80 dir_fd, in test_nofollow_errors() 110 let dir_fd = match open_scratch_directory(&arg) { in main() localVariable 111 Ok(dir_fd) => dir_fd, in main() [all …]
|
H A D | interesting_paths.rs | 5 unsafe fn test_interesting_paths(dir_fd: wasi::Fd, arg: &str) { in test_interesting_paths() 13 create_file(dir_fd, "dir/nested/file"); in test_interesting_paths() 17 wasi::path_open(dir_fd, 0, "/dir/nested/file", 0, 0, 0, 0) in test_interesting_paths() 26 dir_fd, in test_interesting_paths() 92 wasi::path_open(dir_fd, 0, &bad_path, 0, 0, 0, 0) in test_interesting_paths() 98 wasi::path_unlink_file(dir_fd, "dir/nested/file") in test_interesting_paths() 100 wasi::path_remove_directory(dir_fd, "dir/nested") in test_interesting_paths() 102 wasi::path_remove_directory(dir_fd, "dir") in test_interesting_paths() 117 let dir_fd = match open_scratch_directory(&arg) { in main() localVariable 118 Ok(dir_fd) => dir_fd, in main() [all …]
|
H A D | path_filestat.rs | 5 unsafe fn test_path_filestat(dir_fd: wasi::Fd) { in test_path_filestat() 20 dir_fd, in test_path_filestat() 62 stat = wasi::path_filestat_get(dir_fd, 0, "file") in test_path_filestat() 68 dir_fd, in test_path_filestat() 82 stat = wasi::path_filestat_get(dir_fd, 0, "file") in test_path_filestat() 88 dir_fd, in test_path_filestat() 125 dir_fd, in test_path_filestat() 134 stat = wasi::path_filestat_get(dir_fd, 0, "file") in test_path_filestat() 153 let dir_fd = match open_scratch_directory(&arg) { in main() localVariable 154 Ok(dir_fd) => dir_fd, in main() [all …]
|
H A D | remove_directory_trailing_slashes.rs | 4 unsafe fn test_remove_directory_trailing_slashes(dir_fd: wasi::Fd) { in test_remove_directory_trailing_slashes() 6 wasi::path_create_directory(dir_fd, "dir").expect("creating a directory"); in test_remove_directory_trailing_slashes() 9 wasi::path_remove_directory(dir_fd, "dir") in test_remove_directory_trailing_slashes() 15 wasi::path_remove_directory(dir_fd, "dir/") in test_remove_directory_trailing_slashes() 19 create_file(dir_fd, "file"); in test_remove_directory_trailing_slashes() 23 wasi::path_remove_directory(dir_fd, "file") in test_remove_directory_trailing_slashes() 32 wasi::path_remove_directory(dir_fd, "file/") in test_remove_directory_trailing_slashes() 39 wasi::path_unlink_file(dir_fd, "file").expect("removing a file"); in test_remove_directory_trailing_slashes() 53 let dir_fd = match open_scratch_directory(&arg) { in main() localVariable 54 Ok(dir_fd) => dir_fd, in main() [all …]
|
H A D | dangling_fd.rs | 5 unsafe fn test_dangling_fd(dir_fd: wasi::Fd) { in test_dangling_fd() 8 let fd = wasi::path_open(dir_fd, 0, "file", wasi::OFLAGS_CREAT, 0, 0, 0).unwrap(); in test_dangling_fd() 10 let file_fd = wasi::path_open(dir_fd, 0, "file", 0, 0, 0, 0).expect("failed to open"); in test_dangling_fd() 16 wasi::path_unlink_file(dir_fd, "file").expect("failed to unlink"); in test_dangling_fd() 17 let fd = wasi::path_open(dir_fd, 0, "file", wasi::OFLAGS_CREAT, 0, 0, 0).unwrap(); in test_dangling_fd() 21 wasi::path_create_directory(dir_fd, "subdir").expect("failed to create dir"); in test_dangling_fd() 29 wasi::path_remove_directory(dir_fd, "subdir").expect("failed to remove dir 2"); in test_dangling_fd() 30 wasi::path_create_directory(dir_fd, "subdir").expect("failed to create dir 2"); in test_dangling_fd() 44 let dir_fd = match open_scratch_directory(&arg) { in main() localVariable 45 Ok(dir_fd) => dir_fd, in main() [all …]
|
H A D | unlink_file_trailing_slashes.rs | 4 unsafe fn test_unlink_file_trailing_slashes(dir_fd: wasi::Fd) { in test_unlink_file_trailing_slashes() 6 wasi::path_create_directory(dir_fd, "dir").expect("creating a directory"); in test_unlink_file_trailing_slashes() 10 wasi::path_unlink_file(dir_fd, "dir") in test_unlink_file_trailing_slashes() 19 wasi::path_unlink_file(dir_fd, "dir/") in test_unlink_file_trailing_slashes() 27 wasi::path_remove_directory(dir_fd, "dir").expect("removing a directory"); in test_unlink_file_trailing_slashes() 30 create_file(dir_fd, "file"); in test_unlink_file_trailing_slashes() 34 wasi::path_unlink_file(dir_fd, "file/") in test_unlink_file_trailing_slashes() 42 wasi::path_unlink_file(dir_fd, "file") in test_unlink_file_trailing_slashes() 57 let dir_fd = match open_scratch_directory(&arg) { in main() localVariable 58 Ok(dir_fd) => dir_fd, in main() [all …]
|
H A D | truncation_rights.rs | 4 unsafe fn test_truncation_rights(dir_fd: wasi::Fd) { in test_truncation_rights() 6 create_file(dir_fd, "file"); in test_truncation_rights() 10 wasi::fd_fdstat_get(dir_fd).expect("calling fd_fdstat on the scratch directory"); in test_truncation_rights() 42 wasi::fd_fdstat_set_rights(dir_fd, rights_base, rights_inheriting) in test_truncation_rights() 48 file_fd = wasi::path_open(dir_fd, 0, "file", wasi::OFLAGS_TRUNC, 0, 0, 0) in test_truncation_rights() 53 wasi::fd_fdstat_set_rights(dir_fd, rights_base, rights_inheriting) in test_truncation_rights() 68 wasi::path_open(dir_fd, 0, "file", wasi::OFLAGS_TRUNC, 0, 0, 0) in test_truncation_rights() 76 wasi::path_unlink_file(dir_fd, "file").expect("removing a file"); in test_truncation_rights() 90 let dir_fd = match open_scratch_directory(&arg) { in main() localVariable 91 Ok(dir_fd) => dir_fd, in main() [all …]
|
H A D | readlink.rs | 4 unsafe fn test_readlink(dir_fd: wasi::Fd) { in test_readlink() 6 create_file(dir_fd, "target"); in test_readlink() 9 wasi::path_symlink("target", dir_fd, "symlink").expect("creating a symlink"); in test_readlink() 13 let mut bufused = wasi::path_readlink(dir_fd, "symlink", buf.as_mut_ptr(), buf.len()) in test_readlink() 25 bufused = wasi::path_readlink(dir_fd, "symlink", buf.as_mut_ptr(), buf.len()) in test_readlink() 31 wasi::path_unlink_file(dir_fd, "target").expect("removing a file"); in test_readlink() 32 wasi::path_unlink_file(dir_fd, "symlink").expect("removing a file"); in test_readlink() 46 let dir_fd = match open_scratch_directory(&arg) { in main() localVariable 47 Ok(dir_fd) => dir_fd, in main() 55 unsafe { test_readlink(dir_fd) } in main()
|
H A D | remove_nonempty_directory.rs | 4 unsafe fn test_remove_nonempty_directory(dir_fd: wasi::Fd) { in test_remove_nonempty_directory() 6 wasi::path_create_directory(dir_fd, "dir").expect("creating a directory"); in test_remove_nonempty_directory() 9 wasi::path_create_directory(dir_fd, "dir/nested").expect("creating a subdirectory"); in test_remove_nonempty_directory() 13 wasi::path_remove_directory(dir_fd, "dir") in test_remove_nonempty_directory() 21 wasi::path_remove_directory(dir_fd, "dir/nested") in test_remove_nonempty_directory() 23 wasi::path_remove_directory(dir_fd, "dir").expect("removing a directory"); in test_remove_nonempty_directory() 37 let dir_fd = match open_scratch_directory(&arg) { in main() localVariable 38 Ok(dir_fd) => dir_fd, in main() 46 unsafe { test_remove_nonempty_directory(dir_fd) } in main()
|
H A D | path_open_read_without_rights.rs | 7 unsafe fn try_read_file(dir_fd: wasi::Fd) { in try_read_file() 8 let fd = wasi::path_open(dir_fd, 0, TEST_FILENAME, 0, 0, 0, 0).expect("opening the file"); in try_read_file() 39 unsafe fn test_read_rights(dir_fd: wasi::Fd) { in test_read_rights() 40 create_file(dir_fd, TEST_FILENAME); in test_read_rights() 41 drop_rights(dir_fd, wasi::RIGHTS_FD_READ, wasi::RIGHTS_FD_READ); in test_read_rights() 43 let (rbase, rinher) = fd_get_rights(dir_fd); in test_read_rights() 55 try_read_file(dir_fd); in test_read_rights() 69 let dir_fd = match open_scratch_directory(&arg) { in main() localVariable 70 Ok(dir_fd) => dir_fd, in main() 78 unsafe { test_read_rights(dir_fd) } in main()
|
H A D | close_preopen.rs | 5 unsafe fn test_close_preopen(dir_fd: wasi::Fd) { in test_close_preopen() 8 assert_gt!(dir_fd, pre_fd, "dir_fd number"); in test_close_preopen() 21 wasi::fd_renumber(dir_fd, pre_fd) in test_close_preopen() 29 let dir_fdstat = wasi::fd_fdstat_get(dir_fd).expect("failed fd_fdstat_get"); in test_close_preopen() 38 wasi::fd_renumber(pre_fd, dir_fd) in test_close_preopen() 46 let dir_fdstat = wasi::fd_fdstat_get(dir_fd).expect("failed fd_fdstat_get"); in test_close_preopen() 65 let dir_fd = match open_scratch_directory(&arg) { in main() localVariable 66 Ok(dir_fd) => dir_fd, in main() 74 unsafe { test_close_preopen(dir_fd) } in main()
|
H A D | dangling_symlink.rs | 4 unsafe fn test_dangling_symlink(dir_fd: wasi::Fd) { in test_dangling_symlink() 6 wasi::path_symlink("target", dir_fd, "symlink").expect("creating a symlink"); in test_dangling_symlink() 10 wasi::path_open(dir_fd, 0, "symlink", wasi::OFLAGS_DIRECTORY, 0, 0, 0) in test_dangling_symlink() 18 wasi::path_unlink_file(dir_fd, "symlink").expect("failed to remove file"); in test_dangling_symlink() 32 let dir_fd = match open_scratch_directory(&arg) { in main() localVariable 33 Ok(dir_fd) => dir_fd, in main() 41 unsafe { test_dangling_symlink(dir_fd) } in main()
|
H A D | readlink_no_buffer.rs | 4 unsafe fn test_readlink_no_buffer(dir_fd: wasi::Fd) { in test_readlink_no_buffer() 6 wasi::path_symlink("target", dir_fd, "symlink").expect("creating a symlink"); in test_readlink_no_buffer() 9 let bufused = wasi::path_readlink(dir_fd, "symlink", (&mut []).as_mut_ptr(), 0) in test_readlink_no_buffer() 17 wasi::path_unlink_file(dir_fd, "symlink").expect("removing a file"); in test_readlink_no_buffer() 31 let dir_fd = match open_scratch_directory(&arg) { in main() localVariable 32 Ok(dir_fd) => dir_fd, in main() 40 unsafe { test_readlink_no_buffer(dir_fd) } in main()
|
H A D | symlink_loop.rs | 4 unsafe fn test_symlink_loop(dir_fd: wasi::Fd) { in test_symlink_loop() 6 wasi::path_symlink("symlink", dir_fd, "symlink").expect("creating a symlink"); in test_symlink_loop() 10 wasi::path_open(dir_fd, 0, "symlink", 0, 0, 0, 0) in test_symlink_loop() 18 wasi::path_unlink_file(dir_fd, "symlink").expect("removing a file"); in test_symlink_loop() 32 let dir_fd = match open_scratch_directory(&arg) { in main() localVariable 33 Ok(dir_fd) => dir_fd, in main() 41 unsafe { test_symlink_loop(dir_fd) } in main()
|
H A D | path_open_create_existing.rs | 4 unsafe fn test_path_open_create_existing(dir_fd: wasi::Fd) { in test_path_open_create_existing() 5 create_file(dir_fd, "file"); in test_path_open_create_existing() 8 dir_fd, in test_path_open_create_existing() 21 wasi::path_unlink_file(dir_fd, "file").expect("removing a file"); in test_path_open_create_existing() 35 let dir_fd = match open_scratch_directory(&arg) { in main() localVariable 36 Ok(dir_fd) => dir_fd, in main() 44 unsafe { test_path_open_create_existing(dir_fd) } in main()
|
H A D | directory_seek.rs | 5 unsafe fn test_directory_seek(dir_fd: wasi::Fd) { in test_directory_seek() 7 wasi::path_create_directory(dir_fd, "dir").expect("failed to make directory"); in test_directory_seek() 10 let fd = wasi::path_open(dir_fd, 0, "dir", 0, wasi::RIGHTS_FD_SEEK, 0, 0) in test_directory_seek() 42 wasi::path_remove_directory(dir_fd, "dir").expect("failed to remove dir"); in test_directory_seek() 56 let dir_fd = match open_scratch_directory(&arg) { in main() localVariable 57 Ok(dir_fd) => dir_fd, in main() 65 unsafe { test_directory_seek(dir_fd) } in main()
|
/dports/lang/python310/Python-3.10.1/Lib/ |
H A D | glob.py | 24 return list(iglob(pathname, root_dir=root_dir, dir_fd=dir_fd, recursive=recursive)) 106 if _isdir(dirname, dir_fd): 132 if dir_fd is not None: 134 fd = arg = os.open(dirname, _dir_open_flags, dir_fd=dir_fd) 136 arg = dir_fd 177 def _lexists(pathname, dir_fd): argument 179 if dir_fd is None: 182 os.lstat(pathname, dir_fd=dir_fd) 188 def _isdir(pathname, dir_fd): argument 190 if dir_fd is None: [all …]
|
/dports/lang/python311/Python-3.11.0a3/Lib/ |
H A D | glob.py | 24 return list(iglob(pathname, root_dir=root_dir, dir_fd=dir_fd, recursive=recursive)) 106 if _isdir(dirname, dir_fd): 132 if dir_fd is not None: 134 fd = arg = os.open(dirname, _dir_open_flags, dir_fd=dir_fd) 136 arg = dir_fd 177 def _lexists(pathname, dir_fd): argument 179 if dir_fd is None: 182 os.lstat(pathname, dir_fd=dir_fd) 188 def _isdir(pathname, dir_fd): argument 190 if dir_fd is None: [all …]
|
/dports/benchmarks/stress-ng/stress-ng-0.13.09/ |
H A D | stress-dir.c | 71 (void)shim_fsync(dir_fd); in stress_dir_sync() 73 (void)dir_fd; in stress_dir_sync() 87 if (dir_fd >= 0) { in stress_dir_flock() 92 (void)dir_fd; in stress_dir_flock() 104 if (dir_fd >= 0) { in stress_dir_truncate() 122 if (dir_fd >= 0) { in stress_dir_mmap() 130 (void)dir_fd; in stress_dir_mmap() 210 (void)dir_fd; in stress_mkdir() 285 int dir_fd = -1; in stress_dir() local 352 if (dir_fd >= 0) in stress_dir() [all …]
|
/dports/mail/dovecot/dovecot-2.3.17/src/lib/ |
H A D | unlink-directory.c | 71 int dir_fd, old_errno; in unlink_directory_r() local 75 if (dir_fd == -1) { in unlink_directory_r() 101 dir_fd = open(dir, O_RDONLY); in unlink_directory_r() 102 if (dir_fd == -1) { in unlink_directory_r() 107 if (fstat(dir_fd, &st2) < 0) { in unlink_directory_r() 108 i_close_fd(&dir_fd); in unlink_directory_r() 116 i_close_fd(&dir_fd); in unlink_directory_r() 122 if (fchdir(dir_fd) < 0) { in unlink_directory_r() 130 i_close_fd(&dir_fd); in unlink_directory_r() 179 if (fchdir(dir_fd) < 0) { in unlink_directory_r() [all …]
|
/dports/textproc/py-wcmatch/wcmatch-8.3/wcmatch/ |
H A D | _wcmatch.py | 56 dir_fd: Optional[int] 95 key = (dir_fd, base) 99 if dir_fd is None: 104 st = os.lstat(base, dir_fd=dir_fd) 123 dir_fd: Optional[int] 135 if dir_fd is None: 139 st = os.stat(os.path.join(root, self.filename), dir_fd=dir_fd) 178 dir_fd = None 199 elif dir_fd is None: 203 os.lstat(os.path.join(root, self.filename), dir_fd=dir_fd) [all …]
|