diff --git a/Makefile b/Makefile index 736746e63..b5ae65bf9 100644 --- a/Makefile +++ b/Makefile @@ -35,13 +35,18 @@ generate: generate-emtests generate-wasitests # Spectests spectests-singlepass: - cargo test test_run_spectests --release --no-default-features --features "wasi backend-singlepass" -- --nocapture --test-threads 1 + SPECTEST_TEST_SINGLEPASS=1 cargo test test_run_spectests --release --no-default-features --features "wasi backend-singlepass" -- --nocapture --test-threads 1 spectests-cranelift: cargo test test_run_spectests --release --no-default-features --features "wasi backend-cranelift" -- --nocapture spectests-llvm: - cargo test test_run_spectests --release --no-default-features --features "wasi backend-llvm" -- --nocapture + SPECTEST_TEST_LLVM=1 cargo test test_run_spectests --release --no-default-features --features "wasi backend-llvm wasmer-llvm-backend/test" -- --nocapture + +spectests-all: + SPECTEST_TEST_CLIF=1 SPECTEST_TEST_LLVM=1 SPECTEST_TEST_SINGLEPASS=1 \ + cargo test test_run_spectests --release --no-default-features --features "wasi backend-cranelift backend-singlepass backend-llvm wasmer-llvm-backend/test" -- --nocapture --test-threads 1 + spectests: spectests-singlepass spectests-cranelift spectests-llvm @@ -81,7 +86,7 @@ wasitests-setup: mkdir -p tests/wasi_test_resources/test_fs/temp wasitests-singlepass: wasitests-setup - cargo test wasitest --release --no-default-features --features "wasi singlepass" -- --test-threads=1 + cargo test wasitest --release --no-default-features --features "wasi backend-singlepass" -- --test-threads=1 wasitests-cranelift: wasitests-setup cargo test wasitest --release --no-default-features --features "wasi backend-cranelift" -- --test-threads=1 --nocapture diff --git a/benches/metering_benchmark.rs b/benches/metering_benchmark.rs index 4a4ee51be..a2384bcd3 100644 --- a/benches/metering_benchmark.rs +++ b/benches/metering_benchmark.rs @@ -169,6 +169,7 @@ fn get_compiler(limit: u64, metering: bool) -> impl Compiler { )))] compile_error!("compiler not specified, activate a compiler via features"); +#[cfg(feature = "backend-cranelift")] fn get_compiler(_limit: u64, metering: bool) -> impl Compiler { unimplemented!("cranelift does not implement metering"); use wasmer_clif_backend::CraneliftCompiler; diff --git a/ci/docker/x86_64-linux-android/Dockerfile b/ci/docker/x86_64-linux-android/Dockerfile index d8f89b13f..2ccc1baac 100644 --- a/ci/docker/x86_64-linux-android/Dockerfile +++ b/ci/docker/x86_64-linux-android/Dockerfile @@ -5,6 +5,7 @@ RUN apt-get update && \ ca-certificates \ curl \ gcc \ + g++ \ libc-dev \ python \ unzip \ diff --git a/lib/emscripten/src/syscalls/unix.rs b/lib/emscripten/src/syscalls/unix.rs index 80dfb31a7..d9ea55858 100644 --- a/lib/emscripten/src/syscalls/unix.rs +++ b/lib/emscripten/src/syscalls/unix.rs @@ -140,10 +140,12 @@ extern "C" { pub fn lstat(path: *const libc::c_char, buf: *mut stat) -> c_int; } +#[cfg(not(any(target_os = "freebsd", target_os = "macos", target_os = "android")))] +use libc::fallocate; #[cfg(target_os = "freebsd")] use libc::madvise; #[cfg(not(any(target_os = "freebsd", target_os = "macos")))] -use libc::{fallocate, fdatasync, ftruncate64, lstat, madvise, wait4}; +use libc::{fdatasync, ftruncate64, lstat, madvise, wait4}; // Another conditional constant for name resolution: Macos et iOS use // SO_NOSIGPIPE as a setsockopt flag to disable SIGPIPE emission on socket. @@ -1131,11 +1133,11 @@ pub fn ___syscall324(ctx: &mut Ctx, _which: c_int, mut varargs: VarArgs) -> c_in let _mode: c_int = varargs.get(ctx); let _offset: off_t = varargs.get(ctx); let _len: off_t = varargs.get(ctx); - #[cfg(not(any(target_os = "freebsd", target_os = "macos")))] + #[cfg(not(any(target_os = "freebsd", target_os = "macos", target_os = "android")))] unsafe { fallocate(_fd, _mode, _offset, _len) } - #[cfg(any(target_os = "freebsd", target_os = "macos"))] + #[cfg(any(target_os = "freebsd", target_os = "macos", target_os = "android"))] { unimplemented!("emscripten::___syscall324 (fallocate) {}", _which) } diff --git a/lib/emscripten/src/time.rs b/lib/emscripten/src/time.rs index be6beee4d..c341d4be8 100644 --- a/lib/emscripten/src/time.rs +++ b/lib/emscripten/src/time.rs @@ -28,7 +28,7 @@ use time; use super::env; use wasmer_runtime_core::vm::Ctx; -#[cfg(target_os = "linux")] +#[cfg(any(target_os = "linux", target_os = "android"))] use libc::{CLOCK_MONOTONIC, CLOCK_MONOTONIC_COARSE, CLOCK_REALTIME}; #[cfg(target_os = "freebsd")] diff --git a/tests/imports.rs b/tests/imports.rs index 7903d433f..51f283930 100644 --- a/tests/imports.rs +++ b/tests/imports.rs @@ -100,6 +100,7 @@ const SHIFT: i32 = 10; #[allow(non_upper_case_globals)] const shift: i32 = 100; +#[cfg(all(unix, target_arch = "x86_64"))] fn imported_functions_forms(test: &dyn Fn(&Instance)) { const MODULE: &str = r#" (module @@ -391,6 +392,7 @@ fn callback_fn_trap_with_vmctx(vmctx: &mut vm::Ctx, n: i32) -> Result $output:ty, ( $( $arguments:expr ),* ) == $expected_value:expr) => { + #[cfg(all(unix, target_arch = "x86_64"))] #[test] fn $test_name() { imported_functions_forms(&|instance| { diff --git a/tests/spectest.rs b/tests/spectest.rs index 5fc126cfa..f1812443a 100644 --- a/tests/spectest.rs +++ b/tests/spectest.rs @@ -7,6 +7,13 @@ unreachable_patterns )] +#[cfg(not(any( + feature = "backend-llvm", + feature = "backend-cranelift", + feature = "backend-singlepass" +)))] +compile_error!("No compiler backend detected: please specify at least one compiler backend!"); + #[cfg(test)] mod tests { @@ -19,6 +26,7 @@ mod tests { // TODO Allow running WAST &str directly (E.g. for use outside of spectests) use std::collections::HashSet; + use std::env; use std::sync::{Arc, Mutex}; struct SpecFailure { @@ -72,19 +80,36 @@ mod tests { } } - #[cfg(feature = "backend-cranelift")] - fn get_compiler_name() -> &'static str { - "clif" + fn get_available_compilers() -> &'static [&'static str] { + &[ + #[cfg(feature = "backend-cranelift")] + "clif", + #[cfg(feature = "backend-llvm")] + "llvm", + #[cfg(feature = "backend-singlepass")] + "singlepass", + ] } - #[cfg(feature = "backend-llvm")] - fn get_compiler_name() -> &'static str { - "llvm" - } + fn get_compilers_to_test() -> Vec<&'static str> { + let mut out = vec![]; + if let Ok(v) = env::var("SPECTEST_TEST_CLIF") { + if v == "1" { + out.push("clif"); + } + } + if let Ok(v) = env::var("SPECTEST_TEST_LLVM") { + if v == "1" { + out.push("llvm"); + } + } + if let Ok(v) = env::var("SPECTEST_TEST_SINGLEPASS") { + if v == "1" { + out.push("singlepass"); + } + } - #[cfg(feature = "backend-singlepass")] - fn get_compiler_name() -> &'static str { - "singlepass" + out } #[cfg(unix)] @@ -216,16 +241,6 @@ mod tests { } } - #[cfg(not(any( - feature = "backend-llvm", - feature = "backend-cranelift", - feature = "backend-singlepass" - )))] - fn get_compiler_name() -> &'static str { - panic!("compiler not specified, activate a compiler via features"); - "unknown" - } - fn with_instance( maybe_instance: Option>>, named_modules: &HashMap>>, @@ -249,15 +264,16 @@ mod tests { use std::fs; use std::panic::AssertUnwindSafe; use std::path::PathBuf; + use std::str::FromStr; use wabt::script::{Action, Command, CommandKind, ScriptParser, Value}; use wasmer_runtime::{ - compile_with_config, + compile_with_config_with, compiler_for_backend, error::CompileError, func, imports, types::{ElementType, MemoryDescriptor, TableDescriptor}, units::Pages, - CompilerConfig, Ctx, Export, Features, Global, ImportObject, Instance, LikeNamespace, - Memory, Table, + Backend, CompilerConfig, Ctx, Export, Features, Global, ImportObject, Instance, + LikeNamespace, Memory, Table, }; fn format_panic(e: &dyn std::any::Any) -> String { @@ -274,6 +290,7 @@ mod tests { path: &PathBuf, file_excludes: &HashSet, excludes: &HashMap>, + backend: &'static str, ) -> Result { let mut test_report = TestReport { failures: vec![], @@ -310,8 +327,12 @@ mod tests { .map(|file| file.iter().map(|x| Some(x.clone())).collect()) .unwrap_or(vec![]); let excludes = &mut excludes; - - let backend = get_compiler_name(); + let backend_enum = Backend::from_str(if backend == "clif" { + "cranelift" + } else { + backend + }) + .unwrap(); while let Some(Command { kind, line }) = parser.next().map_err(|e| format!("Parse err: {:?}", e))? @@ -344,8 +365,11 @@ mod tests { enable_verification: true, ..Default::default() }; - let module = compile_with_config(&module.into_vec(), config) - .expect("WASM can't be compiled"); + + let compiler = compiler_for_backend(backend_enum).unwrap(); + let module = + compile_with_config_with(&module.into_vec(), config, &*compiler) + .expect("WASM can't be compiled"); let i = module .instantiate(&spectest_import_object) .expect("WASM can't be instantiated"); @@ -784,7 +808,9 @@ mod tests { enable_verification: true, ..Default::default() }; - compile_with_config(&module.into_vec(), config) + + let compiler = compiler_for_backend(backend_enum).unwrap(); + compile_with_config_with(&module.into_vec(), config, &*compiler) }); match result { Ok(module) => { @@ -838,7 +864,9 @@ mod tests { enable_verification: true, ..Default::default() }; - compile_with_config(&module.into_vec(), config) + + let compiler = compiler_for_backend(backend_enum).unwrap(); + compile_with_config_with(&module.into_vec(), config, &*compiler) }); match result { @@ -891,7 +919,9 @@ mod tests { enable_verification: true, ..Default::default() }; - let module = compile_with_config(&module.into_vec(), config) + + let compiler = compiler_for_backend(backend_enum).unwrap(); + let module = compile_with_config_with(&module.into_vec(), config, &*compiler) .expect("WASM can't be compiled"); let result = panic::catch_unwind(AssertUnwindSafe(|| { module @@ -988,8 +1018,11 @@ mod tests { enable_verification: true, ..Default::default() }; - let module = compile_with_config(&module.into_vec(), config) - .expect("WASM can't be compiled"); + + let compiler = compiler_for_backend(backend_enum).unwrap(); + let module = + compile_with_config_with(&module.into_vec(), config, &*compiler) + .expect("WASM can't be compiled"); module.instantiate(&spectest_import_object) })); match result { @@ -1294,16 +1327,15 @@ mod tests { use std::io::{BufRead, BufReader}; /// Reads the excludes.txt file into a hash map - fn read_excludes() -> (HashMap>, HashSet) { + fn read_excludes(current_backend: &str) -> (HashMap>, HashSet) { let mut excludes_path = PathBuf::from(env!("CARGO_MANIFEST_DIR")); excludes_path.push("tests"); excludes_path.push("spectests"); excludes_path.push("excludes.txt"); - let input = File::open(dbg!(excludes_path)).unwrap(); + let input = File::open(excludes_path).unwrap(); let buffered = BufReader::new(input); let mut result = HashMap::new(); let mut file_excludes = HashSet::new(); - let current_backend = get_compiler_name(); let current_target_os = get_target_os(); let current_target_family = get_target_family(); let current_target_arch = get_target_arch(); @@ -1374,72 +1406,96 @@ mod tests { #[test] fn test_run_spectests() { - let mut success = true; - let mut test_reports = vec![]; - - let (excludes, file_excludes) = read_excludes(); - let mut glob_path = PathBuf::from(env!("CARGO_MANIFEST_DIR")); glob_path.push("tests"); glob_path.push("spectests"); glob_path.push("*.wast"); + let available_compilers = get_available_compilers() + .iter() + .cloned() + .collect::>(); + let desired_compilers = get_compilers_to_test(); + // default to testing all enabled compilers + let compilers_to_test = if desired_compilers.is_empty() { + available_compilers.iter().cloned().collect::>() + } else { + desired_compilers + .iter() + .cloned() + .filter(|c| available_compilers.contains(c)) + .collect::>() + }; + + // if we've asked to run specific compilers, make sure they're all actually enabled + if !desired_compilers.is_empty() && desired_compilers.len() != compilers_to_test.len() { + panic!("Asked to run spectests with `{:?}` compilers but `{:?}` compilers are enabled (found {} of them: {:?})", desired_compilers, get_compilers_to_test(), compilers_to_test.len(), compilers_to_test); + } + let glob_str = glob_path.to_str().unwrap(); - for entry in glob(glob_str).expect("Failed to read glob pattern") { - match entry { - Ok(wast_path) => { - let result = parse_and_run(&wast_path, &file_excludes, &excludes); - match result { - Ok(test_report) => { - if test_report.has_failures() { - success = false + for backend in compilers_to_test { + println!("Testing `{}` backend", backend); + let (excludes, file_excludes) = read_excludes(backend); + let mut test_reports = vec![]; + let mut success = true; + for entry in glob(glob_str).expect("Failed to read glob pattern") { + match entry { + Ok(wast_path) => { + let result = parse_and_run(&wast_path, &file_excludes, &excludes, backend); + match result { + Ok(test_report) => { + if test_report.has_failures() { + success = false + } + test_reports.push(test_report); + } + Err(e) => { + success = false; + println!("Unexpected test run error: {:?}", e) } - test_reports.push(test_report); - } - Err(e) => { - success = false; - println!("Unexpected test run error: {:?}", e) } } + Err(e) => panic!("glob err: {:?}", e), } - Err(e) => panic!("glob err: {:?}", e), } - } - // Print summary - let mut failures = vec![]; - let mut total_passed = 0; - let mut total_failed = 0; - let mut total_allowed_failures = 0; - for mut test_report in test_reports.into_iter() { - total_passed += test_report.passed; - total_failed += test_report.failed; - total_allowed_failures += test_report.allowed_failure; - failures.append(&mut test_report.failures); - } + // Print summary + let mut failures = vec![]; + let mut total_passed = 0; + let mut total_failed = 0; + let mut total_allowed_failures = 0; + for mut test_report in test_reports.into_iter() { + total_passed += test_report.passed; + total_failed += test_report.failed; + total_allowed_failures += test_report.allowed_failure; + failures.append(&mut test_report.failures); + } - println!(""); - println!("Failures:"); - let backend = get_compiler_name(); - for failure in failures.iter() { - // To print excludes for all failures: + println!(""); + println!("{} backend results:", backend); + println!("Failures:"); + for failure in failures.iter() { + // To print excludes for all failures: + println!( + "{}:fail:{}:{} # {} - {}", + backend, failure.file, failure.line, failure.kind, failure.message + ); + } + println!(""); + println!(""); + println!("Spec tests summary report: "); println!( - "{}:fail:{}:{} # {} - {}", - backend, failure.file, failure.line, failure.kind, failure.message + "total: {}", + total_passed + total_failed + total_allowed_failures ); + println!("passed: {}", total_passed); + println!("failed: {}", total_failed); + println!("allowed failures: {}", total_allowed_failures); + println!(""); + println!("Tests {}.", if success { "passed" } else { "failed" }); + println!(""); + assert!(success, "tests passed") } - println!(""); - println!(""); - println!("Spec tests summary report: "); - println!( - "total: {}", - total_passed + total_failed + total_allowed_failures - ); - println!("passed: {}", total_passed); - println!("failed: {}", total_failed); - println!("allowed failures: {}", total_allowed_failures); - println!(""); - assert!(success, "tests passed") } /// Bit pattern of an f32 value: diff --git a/tests/wasitests/snapshot1_close_preopen_fd.rs b/tests/wasitests/snapshot1_close_preopen_fd.rs index b44a3375f..232d4ec0b 100644 --- a/tests/wasitests/snapshot1_close_preopen_fd.rs +++ b/tests/wasitests/snapshot1_close_preopen_fd.rs @@ -2,7 +2,6 @@ // ANY MANUAL EDITS MAY BE OVERWRITTEN AT ANY TIME // Files autogenerated with cargo build. - #[test] #[ignore] fn test_snapshot1_close_preopen_fd() { @@ -10,7 +9,10 @@ fn test_snapshot1_close_preopen_fd() { "../wasi_test_resources/snapshot1/close_preopen_fd.wasm", "snapshot1_close_preopen_fd", vec![], - vec![("hamlet".to_string(), ::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/hamlet")),], + vec![( + "hamlet".to_string(), + ::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/hamlet") + ),], vec![], "../wasi_test_resources/close_preopen_fd.out" ); diff --git a/tests/wasitests/snapshot1_create_dir.rs b/tests/wasitests/snapshot1_create_dir.rs index b55905356..bb665e296 100644 --- a/tests/wasitests/snapshot1_create_dir.rs +++ b/tests/wasitests/snapshot1_create_dir.rs @@ -2,7 +2,6 @@ // ANY MANUAL EDITS MAY BE OVERWRITTEN AT ANY TIME // Files autogenerated with cargo build. - #[test] fn test_snapshot1_create_dir() { assert_wasi_output!( diff --git a/tests/wasitests/snapshot1_envvar.rs b/tests/wasitests/snapshot1_envvar.rs index dc32954eb..cecf52017 100644 --- a/tests/wasitests/snapshot1_envvar.rs +++ b/tests/wasitests/snapshot1_envvar.rs @@ -2,7 +2,6 @@ // ANY MANUAL EDITS MAY BE OVERWRITTEN AT ANY TIME // Files autogenerated with cargo build. - #[test] fn test_snapshot1_envvar() { assert_wasi_output!( @@ -10,7 +9,7 @@ fn test_snapshot1_envvar() { "snapshot1_envvar", vec![], vec![], - vec!["DOG=1".to_string(),"CAT=2".to_string(),], + vec!["DOG=1".to_string(), "CAT=2".to_string(),], "../wasi_test_resources/envvar.out" ); } diff --git a/tests/wasitests/snapshot1_fd_allocate.rs b/tests/wasitests/snapshot1_fd_allocate.rs index a9a86b11c..631adc917 100644 --- a/tests/wasitests/snapshot1_fd_allocate.rs +++ b/tests/wasitests/snapshot1_fd_allocate.rs @@ -2,7 +2,6 @@ // ANY MANUAL EDITS MAY BE OVERWRITTEN AT ANY TIME // Files autogenerated with cargo build. - #[test] #[ignore] fn test_snapshot1_fd_allocate() { @@ -10,7 +9,10 @@ fn test_snapshot1_fd_allocate() { "../wasi_test_resources/snapshot1/fd_allocate.wasm", "snapshot1_fd_allocate", vec![], - vec![(".".to_string(), ::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/temp")),], + vec![( + ".".to_string(), + ::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/temp") + ),], vec![], "../wasi_test_resources/fd_allocate.out" ); diff --git a/tests/wasitests/snapshot1_fd_append.rs b/tests/wasitests/snapshot1_fd_append.rs index 645da14ed..800cb1ad3 100644 --- a/tests/wasitests/snapshot1_fd_append.rs +++ b/tests/wasitests/snapshot1_fd_append.rs @@ -2,14 +2,16 @@ // ANY MANUAL EDITS MAY BE OVERWRITTEN AT ANY TIME // Files autogenerated with cargo build. - #[test] fn test_snapshot1_fd_append() { assert_wasi_output!( "../wasi_test_resources/snapshot1/fd_append.wasm", "snapshot1_fd_append", vec![], - vec![(".".to_string(), ::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/temp")),], + vec![( + ".".to_string(), + ::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/temp") + ),], vec![], "../wasi_test_resources/fd_append.out" ); diff --git a/tests/wasitests/snapshot1_fd_close.rs b/tests/wasitests/snapshot1_fd_close.rs index 32a46a98f..76494cd16 100644 --- a/tests/wasitests/snapshot1_fd_close.rs +++ b/tests/wasitests/snapshot1_fd_close.rs @@ -2,7 +2,6 @@ // ANY MANUAL EDITS MAY BE OVERWRITTEN AT ANY TIME // Files autogenerated with cargo build. - #[test] #[ignore] fn test_snapshot1_fd_close() { @@ -10,7 +9,10 @@ fn test_snapshot1_fd_close() { "../wasi_test_resources/snapshot1/fd_close.wasm", "snapshot1_fd_close", vec![], - vec![(".".to_string(), ::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/hamlet")),], + vec![( + ".".to_string(), + ::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/hamlet") + ),], vec![], "../wasi_test_resources/fd_close.out" ); diff --git a/tests/wasitests/snapshot1_fd_pread.rs b/tests/wasitests/snapshot1_fd_pread.rs index 95dcf7d98..2c0f01956 100644 --- a/tests/wasitests/snapshot1_fd_pread.rs +++ b/tests/wasitests/snapshot1_fd_pread.rs @@ -2,7 +2,6 @@ // ANY MANUAL EDITS MAY BE OVERWRITTEN AT ANY TIME // Files autogenerated with cargo build. - #[test] #[ignore] fn test_snapshot1_fd_pread() { @@ -10,7 +9,10 @@ fn test_snapshot1_fd_pread() { "../wasi_test_resources/snapshot1/fd_pread.wasm", "snapshot1_fd_pread", vec![], - vec![(".".to_string(), ::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/hamlet")),], + vec![( + ".".to_string(), + ::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/hamlet") + ),], vec![], "../wasi_test_resources/fd_pread.out" ); diff --git a/tests/wasitests/snapshot1_fd_read.rs b/tests/wasitests/snapshot1_fd_read.rs index eb6ef923b..68c7d3a8a 100644 --- a/tests/wasitests/snapshot1_fd_read.rs +++ b/tests/wasitests/snapshot1_fd_read.rs @@ -2,7 +2,6 @@ // ANY MANUAL EDITS MAY BE OVERWRITTEN AT ANY TIME // Files autogenerated with cargo build. - #[test] #[ignore] fn test_snapshot1_fd_read() { @@ -10,7 +9,10 @@ fn test_snapshot1_fd_read() { "../wasi_test_resources/snapshot1/fd_read.wasm", "snapshot1_fd_read", vec![], - vec![(".".to_string(), ::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/hamlet")),], + vec![( + ".".to_string(), + ::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/hamlet") + ),], vec![], "../wasi_test_resources/fd_read.out" ); diff --git a/tests/wasitests/snapshot1_fd_sync.rs b/tests/wasitests/snapshot1_fd_sync.rs index 07a7b0a32..abda06f32 100644 --- a/tests/wasitests/snapshot1_fd_sync.rs +++ b/tests/wasitests/snapshot1_fd_sync.rs @@ -2,14 +2,16 @@ // ANY MANUAL EDITS MAY BE OVERWRITTEN AT ANY TIME // Files autogenerated with cargo build. - #[test] fn test_snapshot1_fd_sync() { assert_wasi_output!( "../wasi_test_resources/snapshot1/fd_sync.wasm", "snapshot1_fd_sync", vec![], - vec![(".".to_string(), ::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/temp")),], + vec![( + ".".to_string(), + ::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/temp") + ),], vec![], "../wasi_test_resources/fd_sync.out" ); diff --git a/tests/wasitests/snapshot1_file_metadata.rs b/tests/wasitests/snapshot1_file_metadata.rs index 2793d3e12..9a15fcdfc 100644 --- a/tests/wasitests/snapshot1_file_metadata.rs +++ b/tests/wasitests/snapshot1_file_metadata.rs @@ -2,7 +2,6 @@ // ANY MANUAL EDITS MAY BE OVERWRITTEN AT ANY TIME // Files autogenerated with cargo build. - #[test] fn test_snapshot1_file_metadata() { assert_wasi_output!( diff --git a/tests/wasitests/snapshot1_fs_sandbox_test.rs b/tests/wasitests/snapshot1_fs_sandbox_test.rs index 600ba1b5d..80bac2752 100644 --- a/tests/wasitests/snapshot1_fs_sandbox_test.rs +++ b/tests/wasitests/snapshot1_fs_sandbox_test.rs @@ -2,7 +2,6 @@ // ANY MANUAL EDITS MAY BE OVERWRITTEN AT ANY TIME // Files autogenerated with cargo build. - #[test] fn test_snapshot1_fs_sandbox_test() { assert_wasi_output!( diff --git a/tests/wasitests/snapshot1_fseek.rs b/tests/wasitests/snapshot1_fseek.rs index 58d2838cc..6258e07fe 100644 --- a/tests/wasitests/snapshot1_fseek.rs +++ b/tests/wasitests/snapshot1_fseek.rs @@ -2,14 +2,16 @@ // ANY MANUAL EDITS MAY BE OVERWRITTEN AT ANY TIME // Files autogenerated with cargo build. - #[test] fn test_snapshot1_fseek() { assert_wasi_output!( "../wasi_test_resources/snapshot1/fseek.wasm", "snapshot1_fseek", vec![], - vec![(".".to_string(), ::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/hamlet")),], + vec![( + ".".to_string(), + ::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/hamlet") + ),], vec![], "../wasi_test_resources/fseek.out" ); diff --git a/tests/wasitests/snapshot1_hello.rs b/tests/wasitests/snapshot1_hello.rs index 0e869db15..0522b9344 100644 --- a/tests/wasitests/snapshot1_hello.rs +++ b/tests/wasitests/snapshot1_hello.rs @@ -2,7 +2,6 @@ // ANY MANUAL EDITS MAY BE OVERWRITTEN AT ANY TIME // Files autogenerated with cargo build. - #[test] fn test_snapshot1_hello() { assert_wasi_output!( diff --git a/tests/wasitests/snapshot1_isatty.rs b/tests/wasitests/snapshot1_isatty.rs index b5d888706..192628454 100644 --- a/tests/wasitests/snapshot1_isatty.rs +++ b/tests/wasitests/snapshot1_isatty.rs @@ -2,7 +2,6 @@ // ANY MANUAL EDITS MAY BE OVERWRITTEN AT ANY TIME // Files autogenerated with cargo build. - #[test] fn test_snapshot1_isatty() { assert_wasi_output!( diff --git a/tests/wasitests/snapshot1_mapdir.rs b/tests/wasitests/snapshot1_mapdir.rs index e20c240da..9ac9074d1 100644 --- a/tests/wasitests/snapshot1_mapdir.rs +++ b/tests/wasitests/snapshot1_mapdir.rs @@ -2,14 +2,16 @@ // ANY MANUAL EDITS MAY BE OVERWRITTEN AT ANY TIME // Files autogenerated with cargo build. - #[test] fn test_snapshot1_mapdir() { assert_wasi_output!( "../wasi_test_resources/snapshot1/mapdir.wasm", "snapshot1_mapdir", vec![], - vec![(".".to_string(), ::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/hamlet")),], + vec![( + ".".to_string(), + ::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/hamlet") + ),], vec![], "../wasi_test_resources/mapdir.out" ); diff --git a/tests/wasitests/snapshot1_path_link.rs b/tests/wasitests/snapshot1_path_link.rs index cf958cbdb..c919c3458 100644 --- a/tests/wasitests/snapshot1_path_link.rs +++ b/tests/wasitests/snapshot1_path_link.rs @@ -2,14 +2,22 @@ // ANY MANUAL EDITS MAY BE OVERWRITTEN AT ANY TIME // Files autogenerated with cargo build. - #[test] fn test_snapshot1_path_link() { assert_wasi_output!( "../wasi_test_resources/snapshot1/path_link.wasm", "snapshot1_path_link", vec![], - vec![("act5".to_string(), ::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/hamlet/act5")),("temp".to_string(), ::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/temp")),], + vec![ + ( + "act5".to_string(), + ::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/hamlet/act5") + ), + ( + "temp".to_string(), + ::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/temp") + ), + ], vec![], "../wasi_test_resources/path_link.out" ); diff --git a/tests/wasitests/snapshot1_path_rename.rs b/tests/wasitests/snapshot1_path_rename.rs index 1fc705c23..406c4b6f6 100644 --- a/tests/wasitests/snapshot1_path_rename.rs +++ b/tests/wasitests/snapshot1_path_rename.rs @@ -2,14 +2,16 @@ // ANY MANUAL EDITS MAY BE OVERWRITTEN AT ANY TIME // Files autogenerated with cargo build. - #[test] fn test_snapshot1_path_rename() { assert_wasi_output!( "../wasi_test_resources/snapshot1/path_rename.wasm", "snapshot1_path_rename", vec![], - vec![("temp".to_string(), ::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/temp")),], + vec![( + "temp".to_string(), + ::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/temp") + ),], vec![], "../wasi_test_resources/path_rename.out" ); diff --git a/tests/wasitests/snapshot1_path_symlink.rs b/tests/wasitests/snapshot1_path_symlink.rs index e8837c0e3..f5f2c8c4c 100644 --- a/tests/wasitests/snapshot1_path_symlink.rs +++ b/tests/wasitests/snapshot1_path_symlink.rs @@ -2,14 +2,22 @@ // ANY MANUAL EDITS MAY BE OVERWRITTEN AT ANY TIME // Files autogenerated with cargo build. - #[test] fn test_snapshot1_path_symlink() { assert_wasi_output!( "../wasi_test_resources/snapshot1/path_symlink.wasm", "snapshot1_path_symlink", vec![], - vec![("temp".to_string(), ::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/temp")),("hamlet".to_string(), ::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/hamlet")),], + vec![ + ( + "temp".to_string(), + ::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/temp") + ), + ( + "hamlet".to_string(), + ::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/hamlet") + ), + ], vec![], "../wasi_test_resources/path_symlink.out" ); diff --git a/tests/wasitests/snapshot1_poll_oneoff.rs b/tests/wasitests/snapshot1_poll_oneoff.rs index c51b56469..be7f55b9a 100644 --- a/tests/wasitests/snapshot1_poll_oneoff.rs +++ b/tests/wasitests/snapshot1_poll_oneoff.rs @@ -2,7 +2,6 @@ // ANY MANUAL EDITS MAY BE OVERWRITTEN AT ANY TIME // Files autogenerated with cargo build. - #[test] #[ignore] fn test_snapshot1_poll_oneoff() { @@ -10,7 +9,16 @@ fn test_snapshot1_poll_oneoff() { "../wasi_test_resources/snapshot1/poll_oneoff.wasm", "snapshot1_poll_oneoff", vec![], - vec![("hamlet".to_string(), ::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/hamlet")),("temp".to_string(), ::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/temp")),], + vec![ + ( + "hamlet".to_string(), + ::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/hamlet") + ), + ( + "temp".to_string(), + ::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/temp") + ), + ], vec![], "../wasi_test_resources/poll_oneoff.out" ); diff --git a/tests/wasitests/snapshot1_quine.rs b/tests/wasitests/snapshot1_quine.rs index 8389e6f1b..8ba0cd8d0 100644 --- a/tests/wasitests/snapshot1_quine.rs +++ b/tests/wasitests/snapshot1_quine.rs @@ -2,7 +2,6 @@ // ANY MANUAL EDITS MAY BE OVERWRITTEN AT ANY TIME // Files autogenerated with cargo build. - #[test] fn test_snapshot1_quine() { assert_wasi_output!( diff --git a/tests/wasitests/snapshot1_readlink.rs b/tests/wasitests/snapshot1_readlink.rs index 4655b19f4..ec97fce81 100644 --- a/tests/wasitests/snapshot1_readlink.rs +++ b/tests/wasitests/snapshot1_readlink.rs @@ -2,14 +2,16 @@ // ANY MANUAL EDITS MAY BE OVERWRITTEN AT ANY TIME // Files autogenerated with cargo build. - #[test] fn test_snapshot1_readlink() { assert_wasi_output!( "../wasi_test_resources/snapshot1/readlink.wasm", "snapshot1_readlink", vec![], - vec![(".".to_string(), ::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/hamlet")),], + vec![( + ".".to_string(), + ::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/hamlet") + ),], vec![], "../wasi_test_resources/readlink.out" ); diff --git a/tests/wasitests/snapshot1_wasi_sees_virtual_root.rs b/tests/wasitests/snapshot1_wasi_sees_virtual_root.rs index 25e160c4e..87a33b022 100644 --- a/tests/wasitests/snapshot1_wasi_sees_virtual_root.rs +++ b/tests/wasitests/snapshot1_wasi_sees_virtual_root.rs @@ -2,14 +2,26 @@ // ANY MANUAL EDITS MAY BE OVERWRITTEN AT ANY TIME // Files autogenerated with cargo build. - #[test] fn test_snapshot1_wasi_sees_virtual_root() { assert_wasi_output!( "../wasi_test_resources/snapshot1/wasi_sees_virtual_root.wasm", "snapshot1_wasi_sees_virtual_root", vec![], - vec![("act1".to_string(), ::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/hamlet/act1")),("act2".to_string(), ::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/hamlet/act2")),("act1-again".to_string(), ::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/hamlet/act1")),], + vec![ + ( + "act1".to_string(), + ::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/hamlet/act1") + ), + ( + "act2".to_string(), + ::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/hamlet/act2") + ), + ( + "act1-again".to_string(), + ::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/hamlet/act1") + ), + ], vec![], "../wasi_test_resources/wasi_sees_virtual_root.out" ); diff --git a/tests/wasitests/snapshot1_writing.rs b/tests/wasitests/snapshot1_writing.rs index c0d242563..971142fbd 100644 --- a/tests/wasitests/snapshot1_writing.rs +++ b/tests/wasitests/snapshot1_writing.rs @@ -2,14 +2,26 @@ // ANY MANUAL EDITS MAY BE OVERWRITTEN AT ANY TIME // Files autogenerated with cargo build. - #[test] fn test_snapshot1_writing() { assert_wasi_output!( "../wasi_test_resources/snapshot1/writing.wasm", "snapshot1_writing", vec![], - vec![("act1".to_string(), ::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/hamlet/act1")),("act2".to_string(), ::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/hamlet/act2")),("act1-again".to_string(), ::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/hamlet/act1")),], + vec![ + ( + "act1".to_string(), + ::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/hamlet/act1") + ), + ( + "act2".to_string(), + ::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/hamlet/act2") + ), + ( + "act1-again".to_string(), + ::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/hamlet/act1") + ), + ], vec![], "../wasi_test_resources/writing.out" ); diff --git a/tests/wasitests/unstable_close_preopen_fd.rs b/tests/wasitests/unstable_close_preopen_fd.rs index 423d7ce4b..2945d14aa 100644 --- a/tests/wasitests/unstable_close_preopen_fd.rs +++ b/tests/wasitests/unstable_close_preopen_fd.rs @@ -2,14 +2,16 @@ // ANY MANUAL EDITS MAY BE OVERWRITTEN AT ANY TIME // Files autogenerated with cargo build. - #[test] fn test_unstable_close_preopen_fd() { assert_wasi_output!( "../wasi_test_resources/unstable/close_preopen_fd.wasm", "unstable_close_preopen_fd", vec![], - vec![("hamlet".to_string(), ::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/hamlet")),], + vec![( + "hamlet".to_string(), + ::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/hamlet") + ),], vec![], "../wasi_test_resources/close_preopen_fd.out" ); diff --git a/tests/wasitests/unstable_create_dir.rs b/tests/wasitests/unstable_create_dir.rs index fa3629086..47f51d212 100644 --- a/tests/wasitests/unstable_create_dir.rs +++ b/tests/wasitests/unstable_create_dir.rs @@ -2,7 +2,6 @@ // ANY MANUAL EDITS MAY BE OVERWRITTEN AT ANY TIME // Files autogenerated with cargo build. - #[test] fn test_unstable_create_dir() { assert_wasi_output!( diff --git a/tests/wasitests/unstable_envvar.rs b/tests/wasitests/unstable_envvar.rs index 1df2e55f5..b4088afbe 100644 --- a/tests/wasitests/unstable_envvar.rs +++ b/tests/wasitests/unstable_envvar.rs @@ -2,7 +2,6 @@ // ANY MANUAL EDITS MAY BE OVERWRITTEN AT ANY TIME // Files autogenerated with cargo build. - #[test] fn test_unstable_envvar() { assert_wasi_output!( @@ -10,7 +9,7 @@ fn test_unstable_envvar() { "unstable_envvar", vec![], vec![], - vec!["DOG=1".to_string(),"CAT=2".to_string(),], + vec!["DOG=1".to_string(), "CAT=2".to_string(),], "../wasi_test_resources/envvar.out" ); } diff --git a/tests/wasitests/unstable_fd_allocate.rs b/tests/wasitests/unstable_fd_allocate.rs index a4281eebf..2a55ac499 100644 --- a/tests/wasitests/unstable_fd_allocate.rs +++ b/tests/wasitests/unstable_fd_allocate.rs @@ -2,14 +2,16 @@ // ANY MANUAL EDITS MAY BE OVERWRITTEN AT ANY TIME // Files autogenerated with cargo build. - #[test] fn test_unstable_fd_allocate() { assert_wasi_output!( "../wasi_test_resources/unstable/fd_allocate.wasm", "unstable_fd_allocate", vec![], - vec![(".".to_string(), ::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/temp")),], + vec![( + ".".to_string(), + ::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/temp") + ),], vec![], "../wasi_test_resources/fd_allocate.out" ); diff --git a/tests/wasitests/unstable_fd_append.rs b/tests/wasitests/unstable_fd_append.rs index 7f786f684..f5c5b8c8f 100644 --- a/tests/wasitests/unstable_fd_append.rs +++ b/tests/wasitests/unstable_fd_append.rs @@ -2,14 +2,16 @@ // ANY MANUAL EDITS MAY BE OVERWRITTEN AT ANY TIME // Files autogenerated with cargo build. - #[test] fn test_unstable_fd_append() { assert_wasi_output!( "../wasi_test_resources/unstable/fd_append.wasm", "unstable_fd_append", vec![], - vec![(".".to_string(), ::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/temp")),], + vec![( + ".".to_string(), + ::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/temp") + ),], vec![], "../wasi_test_resources/fd_append.out" ); diff --git a/tests/wasitests/unstable_fd_close.rs b/tests/wasitests/unstable_fd_close.rs index 4f9ba5aec..3114823a9 100644 --- a/tests/wasitests/unstable_fd_close.rs +++ b/tests/wasitests/unstable_fd_close.rs @@ -2,14 +2,16 @@ // ANY MANUAL EDITS MAY BE OVERWRITTEN AT ANY TIME // Files autogenerated with cargo build. - #[test] fn test_unstable_fd_close() { assert_wasi_output!( "../wasi_test_resources/unstable/fd_close.wasm", "unstable_fd_close", vec![], - vec![(".".to_string(), ::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/hamlet")),], + vec![( + ".".to_string(), + ::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/hamlet") + ),], vec![], "../wasi_test_resources/fd_close.out" ); diff --git a/tests/wasitests/unstable_fd_pread.rs b/tests/wasitests/unstable_fd_pread.rs index 930a332df..9725a0409 100644 --- a/tests/wasitests/unstable_fd_pread.rs +++ b/tests/wasitests/unstable_fd_pread.rs @@ -2,14 +2,16 @@ // ANY MANUAL EDITS MAY BE OVERWRITTEN AT ANY TIME // Files autogenerated with cargo build. - #[test] fn test_unstable_fd_pread() { assert_wasi_output!( "../wasi_test_resources/unstable/fd_pread.wasm", "unstable_fd_pread", vec![], - vec![(".".to_string(), ::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/hamlet")),], + vec![( + ".".to_string(), + ::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/hamlet") + ),], vec![], "../wasi_test_resources/fd_pread.out" ); diff --git a/tests/wasitests/unstable_fd_read.rs b/tests/wasitests/unstable_fd_read.rs index 876a3906a..fbfba15b0 100644 --- a/tests/wasitests/unstable_fd_read.rs +++ b/tests/wasitests/unstable_fd_read.rs @@ -2,14 +2,16 @@ // ANY MANUAL EDITS MAY BE OVERWRITTEN AT ANY TIME // Files autogenerated with cargo build. - #[test] fn test_unstable_fd_read() { assert_wasi_output!( "../wasi_test_resources/unstable/fd_read.wasm", "unstable_fd_read", vec![], - vec![(".".to_string(), ::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/hamlet")),], + vec![( + ".".to_string(), + ::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/hamlet") + ),], vec![], "../wasi_test_resources/fd_read.out" ); diff --git a/tests/wasitests/unstable_fd_sync.rs b/tests/wasitests/unstable_fd_sync.rs index 9862434ce..020b545f5 100644 --- a/tests/wasitests/unstable_fd_sync.rs +++ b/tests/wasitests/unstable_fd_sync.rs @@ -2,14 +2,16 @@ // ANY MANUAL EDITS MAY BE OVERWRITTEN AT ANY TIME // Files autogenerated with cargo build. - #[test] fn test_unstable_fd_sync() { assert_wasi_output!( "../wasi_test_resources/unstable/fd_sync.wasm", "unstable_fd_sync", vec![], - vec![(".".to_string(), ::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/temp")),], + vec![( + ".".to_string(), + ::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/temp") + ),], vec![], "../wasi_test_resources/fd_sync.out" ); diff --git a/tests/wasitests/unstable_file_metadata.rs b/tests/wasitests/unstable_file_metadata.rs index b8cc47018..91ba1bc29 100644 --- a/tests/wasitests/unstable_file_metadata.rs +++ b/tests/wasitests/unstable_file_metadata.rs @@ -2,7 +2,6 @@ // ANY MANUAL EDITS MAY BE OVERWRITTEN AT ANY TIME // Files autogenerated with cargo build. - #[test] fn test_unstable_file_metadata() { assert_wasi_output!( diff --git a/tests/wasitests/unstable_fs_sandbox_test.rs b/tests/wasitests/unstable_fs_sandbox_test.rs index f478b7e4c..82048a3c8 100644 --- a/tests/wasitests/unstable_fs_sandbox_test.rs +++ b/tests/wasitests/unstable_fs_sandbox_test.rs @@ -2,7 +2,6 @@ // ANY MANUAL EDITS MAY BE OVERWRITTEN AT ANY TIME // Files autogenerated with cargo build. - #[test] fn test_unstable_fs_sandbox_test() { assert_wasi_output!( diff --git a/tests/wasitests/unstable_fseek.rs b/tests/wasitests/unstable_fseek.rs index cb457469f..282c67de7 100644 --- a/tests/wasitests/unstable_fseek.rs +++ b/tests/wasitests/unstable_fseek.rs @@ -2,14 +2,16 @@ // ANY MANUAL EDITS MAY BE OVERWRITTEN AT ANY TIME // Files autogenerated with cargo build. - #[test] fn test_unstable_fseek() { assert_wasi_output!( "../wasi_test_resources/unstable/fseek.wasm", "unstable_fseek", vec![], - vec![(".".to_string(), ::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/hamlet")),], + vec![( + ".".to_string(), + ::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/hamlet") + ),], vec![], "../wasi_test_resources/fseek.out" ); diff --git a/tests/wasitests/unstable_hello.rs b/tests/wasitests/unstable_hello.rs index 4aa58526a..93f662906 100644 --- a/tests/wasitests/unstable_hello.rs +++ b/tests/wasitests/unstable_hello.rs @@ -2,7 +2,6 @@ // ANY MANUAL EDITS MAY BE OVERWRITTEN AT ANY TIME // Files autogenerated with cargo build. - #[test] fn test_unstable_hello() { assert_wasi_output!( diff --git a/tests/wasitests/unstable_isatty.rs b/tests/wasitests/unstable_isatty.rs index 07fabd454..9313980db 100644 --- a/tests/wasitests/unstable_isatty.rs +++ b/tests/wasitests/unstable_isatty.rs @@ -2,7 +2,6 @@ // ANY MANUAL EDITS MAY BE OVERWRITTEN AT ANY TIME // Files autogenerated with cargo build. - #[test] fn test_unstable_isatty() { assert_wasi_output!( diff --git a/tests/wasitests/unstable_mapdir.rs b/tests/wasitests/unstable_mapdir.rs index 3ca14c9e3..69b51e609 100644 --- a/tests/wasitests/unstable_mapdir.rs +++ b/tests/wasitests/unstable_mapdir.rs @@ -2,14 +2,16 @@ // ANY MANUAL EDITS MAY BE OVERWRITTEN AT ANY TIME // Files autogenerated with cargo build. - #[test] fn test_unstable_mapdir() { assert_wasi_output!( "../wasi_test_resources/unstable/mapdir.wasm", "unstable_mapdir", vec![], - vec![(".".to_string(), ::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/hamlet")),], + vec![( + ".".to_string(), + ::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/hamlet") + ),], vec![], "../wasi_test_resources/mapdir.out" ); diff --git a/tests/wasitests/unstable_path_link.rs b/tests/wasitests/unstable_path_link.rs index 4158d4b0c..340fa3c55 100644 --- a/tests/wasitests/unstable_path_link.rs +++ b/tests/wasitests/unstable_path_link.rs @@ -2,14 +2,22 @@ // ANY MANUAL EDITS MAY BE OVERWRITTEN AT ANY TIME // Files autogenerated with cargo build. - #[test] fn test_unstable_path_link() { assert_wasi_output!( "../wasi_test_resources/unstable/path_link.wasm", "unstable_path_link", vec![], - vec![("act5".to_string(), ::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/hamlet/act5")),("temp".to_string(), ::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/temp")),], + vec![ + ( + "act5".to_string(), + ::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/hamlet/act5") + ), + ( + "temp".to_string(), + ::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/temp") + ), + ], vec![], "../wasi_test_resources/path_link.out" ); diff --git a/tests/wasitests/unstable_path_rename.rs b/tests/wasitests/unstable_path_rename.rs index 62171d0dc..51c194d17 100644 --- a/tests/wasitests/unstable_path_rename.rs +++ b/tests/wasitests/unstable_path_rename.rs @@ -2,14 +2,16 @@ // ANY MANUAL EDITS MAY BE OVERWRITTEN AT ANY TIME // Files autogenerated with cargo build. - #[test] fn test_unstable_path_rename() { assert_wasi_output!( "../wasi_test_resources/unstable/path_rename.wasm", "unstable_path_rename", vec![], - vec![("temp".to_string(), ::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/temp")),], + vec![( + "temp".to_string(), + ::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/temp") + ),], vec![], "../wasi_test_resources/path_rename.out" ); diff --git a/tests/wasitests/unstable_path_symlink.rs b/tests/wasitests/unstable_path_symlink.rs index f8f3b2c86..2bafcd8b0 100644 --- a/tests/wasitests/unstable_path_symlink.rs +++ b/tests/wasitests/unstable_path_symlink.rs @@ -2,14 +2,22 @@ // ANY MANUAL EDITS MAY BE OVERWRITTEN AT ANY TIME // Files autogenerated with cargo build. - #[test] fn test_unstable_path_symlink() { assert_wasi_output!( "../wasi_test_resources/unstable/path_symlink.wasm", "unstable_path_symlink", vec![], - vec![("temp".to_string(), ::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/temp")),("hamlet".to_string(), ::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/hamlet")),], + vec![ + ( + "temp".to_string(), + ::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/temp") + ), + ( + "hamlet".to_string(), + ::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/hamlet") + ), + ], vec![], "../wasi_test_resources/path_symlink.out" ); diff --git a/tests/wasitests/unstable_poll_oneoff.rs b/tests/wasitests/unstable_poll_oneoff.rs index 81603d00a..00e9d8fd2 100644 --- a/tests/wasitests/unstable_poll_oneoff.rs +++ b/tests/wasitests/unstable_poll_oneoff.rs @@ -2,14 +2,22 @@ // ANY MANUAL EDITS MAY BE OVERWRITTEN AT ANY TIME // Files autogenerated with cargo build. - #[test] fn test_unstable_poll_oneoff() { assert_wasi_output!( "../wasi_test_resources/unstable/poll_oneoff.wasm", "unstable_poll_oneoff", vec![], - vec![("hamlet".to_string(), ::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/hamlet")),("temp".to_string(), ::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/temp")),], + vec![ + ( + "hamlet".to_string(), + ::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/hamlet") + ), + ( + "temp".to_string(), + ::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/temp") + ), + ], vec![], "../wasi_test_resources/poll_oneoff.out" ); diff --git a/tests/wasitests/unstable_quine.rs b/tests/wasitests/unstable_quine.rs index 3db685b80..ea0adac47 100644 --- a/tests/wasitests/unstable_quine.rs +++ b/tests/wasitests/unstable_quine.rs @@ -2,7 +2,6 @@ // ANY MANUAL EDITS MAY BE OVERWRITTEN AT ANY TIME // Files autogenerated with cargo build. - #[test] fn test_unstable_quine() { assert_wasi_output!( diff --git a/tests/wasitests/unstable_readlink.rs b/tests/wasitests/unstable_readlink.rs index 4f8449cf7..c9a15afef 100644 --- a/tests/wasitests/unstable_readlink.rs +++ b/tests/wasitests/unstable_readlink.rs @@ -2,14 +2,16 @@ // ANY MANUAL EDITS MAY BE OVERWRITTEN AT ANY TIME // Files autogenerated with cargo build. - #[test] fn test_unstable_readlink() { assert_wasi_output!( "../wasi_test_resources/unstable/readlink.wasm", "unstable_readlink", vec![], - vec![(".".to_string(), ::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/hamlet")),], + vec![( + ".".to_string(), + ::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/hamlet") + ),], vec![], "../wasi_test_resources/readlink.out" ); diff --git a/tests/wasitests/unstable_wasi_sees_virtual_root.rs b/tests/wasitests/unstable_wasi_sees_virtual_root.rs index 719de8260..68affa54c 100644 --- a/tests/wasitests/unstable_wasi_sees_virtual_root.rs +++ b/tests/wasitests/unstable_wasi_sees_virtual_root.rs @@ -2,14 +2,26 @@ // ANY MANUAL EDITS MAY BE OVERWRITTEN AT ANY TIME // Files autogenerated with cargo build. - #[test] fn test_unstable_wasi_sees_virtual_root() { assert_wasi_output!( "../wasi_test_resources/unstable/wasi_sees_virtual_root.wasm", "unstable_wasi_sees_virtual_root", vec![], - vec![("act1".to_string(), ::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/hamlet/act1")),("act2".to_string(), ::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/hamlet/act2")),("act1-again".to_string(), ::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/hamlet/act1")),], + vec![ + ( + "act1".to_string(), + ::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/hamlet/act1") + ), + ( + "act2".to_string(), + ::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/hamlet/act2") + ), + ( + "act1-again".to_string(), + ::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/hamlet/act1") + ), + ], vec![], "../wasi_test_resources/wasi_sees_virtual_root.out" ); diff --git a/tests/wasitests/unstable_writing.rs b/tests/wasitests/unstable_writing.rs index 91d864070..e3124333d 100644 --- a/tests/wasitests/unstable_writing.rs +++ b/tests/wasitests/unstable_writing.rs @@ -2,14 +2,26 @@ // ANY MANUAL EDITS MAY BE OVERWRITTEN AT ANY TIME // Files autogenerated with cargo build. - #[test] fn test_unstable_writing() { assert_wasi_output!( "../wasi_test_resources/unstable/writing.wasm", "unstable_writing", vec![], - vec![("act1".to_string(), ::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/hamlet/act1")),("act2".to_string(), ::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/hamlet/act2")),("act1-again".to_string(), ::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/hamlet/act1")),], + vec![ + ( + "act1".to_string(), + ::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/hamlet/act1") + ), + ( + "act2".to_string(), + ::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/hamlet/act2") + ), + ( + "act1-again".to_string(), + ::std::path::PathBuf::from("tests/wasi_test_resources/test_fs/hamlet/act1") + ), + ], vec![], "../wasi_test_resources/writing.out" );