Make fs-mistrust tests pass on Windows
The fs-mistrust
crate is currently the biggest source of test failures when trying to build Arti on Windows. I am adding this issue to track the different problems here.
Running cargo test --verbose -p fs-mistrust --lib
currently yields the following result:
failures:
---- dir::test::bad_paths stdout ----
thread 'dir::test::bad_paths' panicked at 'called `Result::unwrap()` on an `Err` value: CouldNotInspect("\\\\?\\C:", Os { code: 1, kind: Uncategorized, message: "Incorrect function." })', crates\fs-mistrust\src\dir.rs:326:55
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
---- test::want_type stdout ----
thread 'test::want_type' panicked at 'called `Result::unwrap()` on an `Err` value: CouldNotInspect("\\\\?\\C:", Os { code: 1, kind: Uncategorized, message: "Incorrect function." })', crates\fs-mistrust\src\lib.rs:903:61
---- walk::test::repeats stdout ----
thread 'walk::test::repeats' panicked at 'assertion failed: `(left == right)`
left: `[]`,
right: `["\\\\?\\C:\\Users\\ahf\\AppData\\Local\\Temp\\.tmpl3GolD\\a", "\\\\?\\C:\\Users\\ahf\\AppData\\Local\\Temp\\.tmpl3GolD\\a\\b", "\\\\?\\C:\\Users\\ahf\\AppData\\Local\\Temp\\.tmpl3GolD\\a\\b\\c", "\\\\?\\C:\\Users\\ahf\\AppData\\Local\\Temp\\.tmpl3GolD\\a\\b\\c\\d"]`', crates\fs-mistrust\src\walk.rs:440:9
---- dir::test::read_and_write stdout ----
thread 'dir::test::read_and_write' panicked at 'called `Result::unwrap()` on an `Err` value: CouldNotInspect("\\\\?\\C:", Os { code: 1, kind: Uncategorized, message: "Incorrect function." })', crates\fs-mistrust\src\dir.rs:346:60
---- test::multiple_errors stdout ----
thread 'test::multiple_errors' panicked at 'assertion failed: matches!(e, Error :: NotFound(_))', crates\fs-mistrust\src\lib.rs:976:9
---- test::readable_ok stdout ----
thread 'test::readable_ok' panicked at 'assertion failed: matches!(e, Error :: BadPermission(..))', crates\fs-mistrust\src\lib.rs:941:9
---- test::check_contents stdout ----
thread 'test::check_contents' panicked at 'called `Result::unwrap()` on an `Err` value: CouldNotInspect("\\\\?\\C:", Os { code: 1, kind: Uncategorized, message: "Incorrect function." })', crates\fs-mistrust\src\lib.rs:1112:42
---- walk::test::simple_path stdout ----
thread 'walk::test::simple_path' panicked at 'assertion failed: `(left == right)`
left: `""`,
right: `"\\\\?\\C:\\Users\\ahf\\AppData\\Local\\Temp\\.tmpLxygGM\\a\\b\\c"`', crates\fs-mistrust\src\walk.rs:390:9
---- test::make_directory stdout ----
thread 'test::make_directory' panicked at 'called `Result::unwrap()` on an `Err` value: CouldNotInspect("\\\\?\\C:", Os { code: 1, kind: Uncategorized, message: "Incorrect function." })', crates\fs-mistrust\src\lib.rs:1087:45
---- walk::test::looping stdout ----
thread 'walk::test::looping' panicked at 'Can't symlink: Os { code: 1314, kind: Uncategorized, message: "A required privilege is not held by the client." }', crates\fs-mistrust\src\testing.rs:118:10
---- dir::test::easy_case stdout ----
thread 'dir::test::easy_case' panicked at 'called `Result::unwrap()` on an `Err` value: CouldNotInspect("\\\\?\\C:", Os { code: 1, kind: Uncategorized, message: "Incorrect function." })', crates\fs-mistrust\src\dir.rs:278:57
---- test::simple_cases stdout ----
thread 'test::simple_cases' panicked at 'Can't symlink: Os { code: 1314, kind: Uncategorized, message: "A required privilege is not held by the client." }', crates\fs-mistrust\src\testing.rs:118:10
---- walk::test::past_root stdout ----
thread 'walk::test::past_root' panicked at 'called `Result::unwrap()` on an `Err` value: CouldNotInspect("\\\\?\\C:", Os { code: 1, kind: Uncategorized, message: "Incorrect function." })', crates\fs-mistrust\src\walk.rs:631:44
failures:
dir::test::bad_paths
dir::test::easy_case
dir::test::read_and_write
test::check_contents
test::make_directory
test::multiple_errors
test::readable_ok
test::simple_cases
test::want_type
walk::test::looping
walk::test::past_root
walk::test::repeats
walk::test::simple_path
test result: FAILED. 5 passed; 13 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.19s
error: test failed, to rerun pass '-p fs-mistrust --lib'