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(()) Ok(())
} }
cfg_if::cfg_if! { #[cfg(not(windows))]
if #[cfg(not(windows))] { /// Ignore tests that aren't supported yet.
/// Ignore tests that aren't supported yet. fn ignore(testsuite: &str, name: &str) -> bool {
fn ignore(testsuite: &str, name: &str) -> bool { if testsuite == "wasi-tests" {
if testsuite == "wasi-tests" { match name {
false // Trailing slash related bugs:
} else { "path_rename_file_trailing_slashes" => true,
unreachable!() "remove_directory_trailing_slashes" => true,
} _ => false,
} }
} else { } else {
/// Ignore tests that aren't supported yet. unreachable!()
fn ignore(testsuite: &str, name: &str) -> bool { }
if testsuite == "wasi-tests" { }
false
/* #[cfg(windows)]
match name { /// Ignore tests that aren't supported yet.
"readlink_no_buffer" => true, fn ignore(testsuite: &str, name: &str) -> bool {
"dangling_symlink" => true, if testsuite == "wasi-tests" {
"symlink_loop" => true, match name {
"truncation_rights" => true, // Panic: Metadata not associated with open file
"dangling_fd" => true, // https://github.com/bytecodealliance/cap-std/issues/142
_ => false, "fd_readdir" => true,
} "fd_flags_set" => true,
*/ "path_filestat" => true,
} else { "symlink_filestat" => true,
unreachable!() // 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!()
} }
} }