* wasi-common: remove allocate from WasiFile trait, always fail with NOTSUP This operation from cloudabi is linux-specific, isn't even supported across all linux filesystems, and has no support on macos or windows. Rather than ship spotty support, it has been removed from preview 2, and we are no longer supporting it in preview 1 as well. The preview 1 implementation will still check if fd is a file, and has rights, just to reject those cases with the errors expected. * wasi-tests: expect fd_allocate to always fail now. rewrite the file_allocate test to just check for failure. remove use of fd_allocate from fd_advise test, and remove test configuration setting used for excluding use of fd_allocate on macos and windows.
29 lines
956 B
Rust
29 lines
956 B
Rust
pub mod cap_std_sync;
|
|
pub mod tokio;
|
|
|
|
// Configure the test suite environment.
|
|
// Test programs use these environment variables to determine what behavior
|
|
// is expected: different errnos are expected on windows, mac, and other unixes,
|
|
// and other filesystem operations are supported or not.
|
|
pub fn test_suite_environment() -> &'static [(&'static str, &'static str)] {
|
|
#[cfg(windows)]
|
|
{
|
|
&[
|
|
("ERRNO_MODE_WINDOWS", "1"),
|
|
// Windows does not support dangling links or symlinks in the filesystem.
|
|
("NO_DANGLING_FILESYSTEM", "1"),
|
|
// Windows does not support renaming a directory to an empty directory -
|
|
// empty directory must be deleted.
|
|
("NO_RENAME_DIR_TO_EMPTY_DIR", "1"),
|
|
]
|
|
}
|
|
#[cfg(all(unix, not(target_os = "macos")))]
|
|
{
|
|
&[("ERRNO_MODE_UNIX", "1")]
|
|
}
|
|
#[cfg(target_os = "macos")]
|
|
{
|
|
&[("ERRNO_MODE_MACOS", "1")]
|
|
}
|
|
}
|