move test failures into ignores in build.rs

This commit is contained in:
Pat Hickey
2021-01-28 15:07:48 -08:00
parent 1d057af64d
commit d628677fae
2 changed files with 37 additions and 63 deletions

View File

@@ -1,37 +0,0 @@
# Linux
* path_rename_file_trailing_slashes
- trailing slash behavior of files is wrong: trailing slashes are ignored,
should cause an error.
* remove_directory_trailing_slashes
- cap-std Dir::remove_dir gives EINVAL when trying to remove dir with
trailing slash. otherwise, everything passes.
# Windows
* fd_readdir
- DirEntry metadata ino panics on windows: https://github.com/bytecodealliance/cap-std/issues/142
* fd_flags_set
- same metadata panic as fd_readdir
* path_filestat
- same metadata panic as fd_readdir
* symlink_filestat
- same metadata panic as fd_readdir
* nofollow_errors
- fix merged; in next cap-std release
* symlink_create
- dan is doing the upstream fix rn (dirext will have method to delete file or symlink)
* path_rename
- somehow, windows lets us rename an empty directory to an existing empty file??? line 76.
## "Trailing slashes are a bonified boondoggle" - Dan
* interesting_paths
- on windows, opening a directory with a trailing slash fails.
* path_rename_file_trailing_slashes
- same incorrect behavior as linux
* remove_directory_trailing_slashes
- same incorrect behavior as linux

View File

@@ -159,35 +159,46 @@ mod wasi_tests {
Ok(())
}
cfg_if::cfg_if! {
if #[cfg(not(windows))] {
/// Ignore tests that aren't supported yet.
fn ignore(testsuite: &str, name: &str) -> bool {
if testsuite == "wasi-tests" {
false
} else {
unreachable!()
}
#[cfg(not(windows))]
/// Ignore tests that aren't supported yet.
fn ignore(testsuite: &str, name: &str) -> bool {
if testsuite == "wasi-tests" {
match name {
// Trailing slash related bugs:
"path_rename_file_trailing_slashes" => true,
"remove_directory_trailing_slashes" => true,
_ => false,
}
} else {
/// Ignore tests that aren't supported yet.
fn ignore(testsuite: &str, name: &str) -> bool {
if testsuite == "wasi-tests" {
false
/*
match name {
"readlink_no_buffer" => true,
"dangling_symlink" => true,
"symlink_loop" => true,
"truncation_rights" => true,
"dangling_fd" => true,
_ => false,
}
*/
} else {
unreachable!()
}
unreachable!()
}
}
#[cfg(windows)]
/// Ignore tests that aren't supported yet.
fn ignore(testsuite: &str, name: &str) -> bool {
if testsuite == "wasi-tests" {
match name {
// Panic: Metadata not associated with open file
// https://github.com/bytecodealliance/cap-std/issues/142
"fd_readdir" => true,
"fd_flags_set" => true,
"path_filestat" => true,
"symlink_filestat" => true,
// Fix merged, waiting for cap-std release
"nofollow_errors" => true,
// waiting on DirExt::delete_file_or_symlink
"symlink_create" => true,
// Bug: windows lets us rename an empty directory to a path containing an empty file
"path_rename" => true,
// Trailing slash related bugs
"interesting_paths" => true,
"path_rename_file_trailing_slashes" => true,
"remove_directory_trailing_slashes" => true,
_ => false,
}
} else {
unreachable!()
}
}