A lightweight WebAssembly runtime that is fast, secure, and standards-compliant
Rename test programs (#11828)
Yoshb315a0a89319
diff --git a/crates/test-programs/artifacts/build.rs b/crates/test-programs/artifacts/build.rsindex ef35e09023..7b215aa1cc 100644--- a/crates/test-programs/artifacts/build.rs+++ b/crates/test-programs/artifacts/build.rs@@ -73,11 +73,11 @@ impl Artifacts {// Bucket, based on the name of the test, into a "kind" which// generates a `foreach_*` macro below.let kind = match test.name.as_str() {- s if s.starts_with("http_") => "http",- s if s.starts_with("preview1_") => "preview1",- s if s.starts_with("preview2_") => "preview2",- s if s.starts_with("cli_") => "cli",- s if s.starts_with("api_") => "api",+ s if s.starts_with("p1_") => "p1",+ s if s.starts_with("p2_http_") => "p2_http",+ s if s.starts_with("p2_cli_") => "p2_cli",+ s if s.starts_with("p2_api_") => "p2_api",+ s if s.starts_with("p2_") => "p2",s if s.starts_with("nn_") => "nn",s if s.starts_with("piped_") => "piped",s if s.starts_with("dwarf_") => "dwarf",@@ -111,7 +111,7 @@ impl Artifacts {let adapter = match test.name.as_str() {"reactor" => &reactor_adapter,s if s.starts_with("p3_") => &reactor_adapter,- s if s.starts_with("api_proxy") => &proxy_adapter,+ s if s.starts_with("p2_api_proxy") => &proxy_adapter,_ => &command_adapter,};let path = match &test.core_wasm {diff --git a/crates/test-programs/src/bin/preview1_big_random_buf.rs b/crates/test-programs/src/bin/p1_big_random_buf.rssimilarity index 100%rename from crates/test-programs/src/bin/preview1_big_random_buf.rsrename to crates/test-programs/src/bin/p1_big_random_buf.rsdiff --git a/crates/test-programs/src/bin/cli_p1_much_stdout.rs b/crates/test-programs/src/bin/p1_cli_much_stdout.rssimilarity index 100%rename from crates/test-programs/src/bin/cli_p1_much_stdout.rsrename to crates/test-programs/src/bin/p1_cli_much_stdout.rsdiff --git a/crates/test-programs/src/bin/preview1_clock_time_get.rs b/crates/test-programs/src/bin/p1_clock_time_get.rssimilarity index 100%rename from crates/test-programs/src/bin/preview1_clock_time_get.rsrename to crates/test-programs/src/bin/p1_clock_time_get.rsdiff --git a/crates/test-programs/src/bin/preview1_close_preopen.rs b/crates/test-programs/src/bin/p1_close_preopen.rssimilarity index 100%rename from crates/test-programs/src/bin/preview1_close_preopen.rsrename to crates/test-programs/src/bin/p1_close_preopen.rsdiff --git a/crates/test-programs/src/bin/preview1_dangling_fd.rs b/crates/test-programs/src/bin/p1_dangling_fd.rssimilarity index 100%rename from crates/test-programs/src/bin/preview1_dangling_fd.rsrename to crates/test-programs/src/bin/p1_dangling_fd.rsdiff --git a/crates/test-programs/src/bin/preview1_dangling_symlink.rs b/crates/test-programs/src/bin/p1_dangling_symlink.rssimilarity index 100%rename from crates/test-programs/src/bin/preview1_dangling_symlink.rsrename to crates/test-programs/src/bin/p1_dangling_symlink.rsdiff --git a/crates/test-programs/src/bin/preview1_dir_fd_op_failures.rs b/crates/test-programs/src/bin/p1_dir_fd_op_failures.rssimilarity index 100%rename from crates/test-programs/src/bin/preview1_dir_fd_op_failures.rsrename to crates/test-programs/src/bin/p1_dir_fd_op_failures.rsdiff --git a/crates/test-programs/src/bin/preview1_directory_seek.rs b/crates/test-programs/src/bin/p1_directory_seek.rssimilarity index 100%rename from crates/test-programs/src/bin/preview1_directory_seek.rsrename to crates/test-programs/src/bin/p1_directory_seek.rsdiff --git a/crates/test-programs/src/bin/preview1_fd_advise.rs b/crates/test-programs/src/bin/p1_fd_advise.rssimilarity index 100%rename from crates/test-programs/src/bin/preview1_fd_advise.rsrename to crates/test-programs/src/bin/p1_fd_advise.rsdiff --git a/crates/test-programs/src/bin/preview1_fd_filestat_get.rs b/crates/test-programs/src/bin/p1_fd_filestat_get.rssimilarity index 100%rename from crates/test-programs/src/bin/preview1_fd_filestat_get.rsrename to crates/test-programs/src/bin/p1_fd_filestat_get.rsdiff --git a/crates/test-programs/src/bin/preview1_fd_filestat_set.rs b/crates/test-programs/src/bin/p1_fd_filestat_set.rssimilarity index 100%rename from crates/test-programs/src/bin/preview1_fd_filestat_set.rsrename to crates/test-programs/src/bin/p1_fd_filestat_set.rsdiff --git a/crates/test-programs/src/bin/preview1_fd_flags_set.rs b/crates/test-programs/src/bin/p1_fd_flags_set.rssimilarity index 100%rename from crates/test-programs/src/bin/preview1_fd_flags_set.rsrename to crates/test-programs/src/bin/p1_fd_flags_set.rsdiff --git a/crates/test-programs/src/bin/preview1_fd_readdir.rs b/crates/test-programs/src/bin/p1_fd_readdir.rssimilarity index 100%rename from crates/test-programs/src/bin/preview1_fd_readdir.rsrename to crates/test-programs/src/bin/p1_fd_readdir.rsdiff --git a/crates/test-programs/src/bin/preview1_file_allocate.rs b/crates/test-programs/src/bin/p1_file_allocate.rssimilarity index 100%rename from crates/test-programs/src/bin/preview1_file_allocate.rsrename to crates/test-programs/src/bin/p1_file_allocate.rsdiff --git a/crates/test-programs/src/bin/preview1_file_pread_pwrite.rs b/crates/test-programs/src/bin/p1_file_pread_pwrite.rssimilarity index 100%rename from crates/test-programs/src/bin/preview1_file_pread_pwrite.rsrename to crates/test-programs/src/bin/p1_file_pread_pwrite.rsdiff --git a/crates/test-programs/src/bin/preview1_file_read_write.rs b/crates/test-programs/src/bin/p1_file_read_write.rssimilarity index 100%rename from crates/test-programs/src/bin/preview1_file_read_write.rsrename to crates/test-programs/src/bin/p1_file_read_write.rsdiff --git a/crates/test-programs/src/bin/preview1_file_seek_tell.rs b/crates/test-programs/src/bin/p1_file_seek_tell.rssimilarity index 100%rename from crates/test-programs/src/bin/preview1_file_seek_tell.rsrename to crates/test-programs/src/bin/p1_file_seek_tell.rsdiff --git a/crates/test-programs/src/bin/preview1_file_truncation.rs b/crates/test-programs/src/bin/p1_file_truncation.rssimilarity index 100%rename from crates/test-programs/src/bin/preview1_file_truncation.rsrename to crates/test-programs/src/bin/p1_file_truncation.rsdiff --git a/crates/test-programs/src/bin/preview1_file_unbuffered_write.rs b/crates/test-programs/src/bin/p1_file_unbuffered_write.rssimilarity index 100%rename from crates/test-programs/src/bin/preview1_file_unbuffered_write.rsrename to crates/test-programs/src/bin/p1_file_unbuffered_write.rsdiff --git a/crates/test-programs/src/bin/preview1_file_write.rs b/crates/test-programs/src/bin/p1_file_write.rssimilarity index 100%rename from crates/test-programs/src/bin/preview1_file_write.rsrename to crates/test-programs/src/bin/p1_file_write.rsdiff --git a/crates/test-programs/src/bin/preview1_interesting_paths.rs b/crates/test-programs/src/bin/p1_interesting_paths.rssimilarity index 100%rename from crates/test-programs/src/bin/preview1_interesting_paths.rsrename to crates/test-programs/src/bin/p1_interesting_paths.rsdiff --git a/crates/test-programs/src/bin/preview1_nofollow_errors.rs b/crates/test-programs/src/bin/p1_nofollow_errors.rssimilarity index 100%rename from crates/test-programs/src/bin/preview1_nofollow_errors.rsrename to crates/test-programs/src/bin/p1_nofollow_errors.rsdiff --git a/crates/test-programs/src/bin/preview1_overwrite_preopen.rs b/crates/test-programs/src/bin/p1_overwrite_preopen.rssimilarity index 100%rename from crates/test-programs/src/bin/preview1_overwrite_preopen.rsrename to crates/test-programs/src/bin/p1_overwrite_preopen.rsdiff --git a/crates/test-programs/src/bin/preview1_path_exists.rs b/crates/test-programs/src/bin/p1_path_exists.rssimilarity index 100%rename from crates/test-programs/src/bin/preview1_path_exists.rsrename to crates/test-programs/src/bin/p1_path_exists.rsdiff --git a/crates/test-programs/src/bin/preview1_path_filestat.rs b/crates/test-programs/src/bin/p1_path_filestat.rssimilarity index 100%rename from crates/test-programs/src/bin/preview1_path_filestat.rsrename to crates/test-programs/src/bin/p1_path_filestat.rsdiff --git a/crates/test-programs/src/bin/preview1_path_link.rs b/crates/test-programs/src/bin/p1_path_link.rssimilarity index 100%rename from crates/test-programs/src/bin/preview1_path_link.rsrename to crates/test-programs/src/bin/p1_path_link.rsdiff --git a/crates/test-programs/src/bin/preview1_path_open_create_existing.rs b/crates/test-programs/src/bin/p1_path_open_create_existing.rssimilarity index 100%rename from crates/test-programs/src/bin/preview1_path_open_create_existing.rsrename to crates/test-programs/src/bin/p1_path_open_create_existing.rsdiff --git a/crates/test-programs/src/bin/preview1_path_open_dirfd_not_dir.rs b/crates/test-programs/src/bin/p1_path_open_dirfd_not_dir.rssimilarity index 100%rename from crates/test-programs/src/bin/preview1_path_open_dirfd_not_dir.rsrename to crates/test-programs/src/bin/p1_path_open_dirfd_not_dir.rsdiff --git a/crates/test-programs/src/bin/preview1_path_open_lots.rs b/crates/test-programs/src/bin/p1_path_open_lots.rssimilarity index 100%rename from crates/test-programs/src/bin/preview1_path_open_lots.rsrename to crates/test-programs/src/bin/p1_path_open_lots.rsdiff --git a/crates/test-programs/src/bin/preview1_path_open_missing.rs b/crates/test-programs/src/bin/p1_path_open_missing.rssimilarity index 100%rename from crates/test-programs/src/bin/preview1_path_open_missing.rsrename to crates/test-programs/src/bin/p1_path_open_missing.rsdiff --git a/crates/test-programs/src/bin/preview1_path_open_nonblock.rs b/crates/test-programs/src/bin/p1_path_open_nonblock.rssimilarity index 100%rename from crates/test-programs/src/bin/preview1_path_open_nonblock.rsrename to crates/test-programs/src/bin/p1_path_open_nonblock.rsdiff --git a/crates/test-programs/src/bin/preview1_path_open_preopen.rs b/crates/test-programs/src/bin/p1_path_open_preopen.rssimilarity index 100%rename from crates/test-programs/src/bin/preview1_path_open_preopen.rsrename to crates/test-programs/src/bin/p1_path_open_preopen.rsdiff --git a/crates/test-programs/src/bin/preview1_path_open_read_write.rs b/crates/test-programs/src/bin/p1_path_open_read_write.rssimilarity index 100%rename from crates/test-programs/src/bin/preview1_path_open_read_write.rsrename to crates/test-programs/src/bin/p1_path_open_read_write.rsdiff --git a/crates/test-programs/src/bin/preview1_path_rename.rs b/crates/test-programs/src/bin/p1_path_rename.rssimilarity index 100%rename from crates/test-programs/src/bin/preview1_path_rename.rsrename to crates/test-programs/src/bin/p1_path_rename.rsdiff --git a/crates/test-programs/src/bin/preview1_path_rename_dir_trailing_slashes.rs b/crates/test-programs/src/bin/p1_path_rename_dir_trailing_slashes.rssimilarity index 100%rename from crates/test-programs/src/bin/preview1_path_rename_dir_trailing_slashes.rsrename to crates/test-programs/src/bin/p1_path_rename_dir_trailing_slashes.rsdiff --git a/crates/test-programs/src/bin/preview1_path_symlink_trailing_slashes.rs b/crates/test-programs/src/bin/p1_path_symlink_trailing_slashes.rssimilarity index 100%rename from crates/test-programs/src/bin/preview1_path_symlink_trailing_slashes.rsrename to crates/test-programs/src/bin/p1_path_symlink_trailing_slashes.rsdiff --git a/crates/test-programs/src/bin/preview1_poll_oneoff_files.rs b/crates/test-programs/src/bin/p1_poll_oneoff_files.rssimilarity index 100%rename from crates/test-programs/src/bin/preview1_poll_oneoff_files.rsrename to crates/test-programs/src/bin/p1_poll_oneoff_files.rsdiff --git a/crates/test-programs/src/bin/preview1_poll_oneoff_stdio.rs b/crates/test-programs/src/bin/p1_poll_oneoff_stdio.rssimilarity index 100%rename from crates/test-programs/src/bin/preview1_poll_oneoff_stdio.rsrename to crates/test-programs/src/bin/p1_poll_oneoff_stdio.rsdiff --git a/crates/test-programs/src/bin/preview1_readlink.rs b/crates/test-programs/src/bin/p1_readlink.rssimilarity index 100%rename from crates/test-programs/src/bin/preview1_readlink.rsrename to crates/test-programs/src/bin/p1_readlink.rsdiff --git a/crates/test-programs/src/bin/preview1_regular_file_isatty.rs b/crates/test-programs/src/bin/p1_regular_file_isatty.rssimilarity index 100%rename from crates/test-programs/src/bin/preview1_regular_file_isatty.rsrename to crates/test-programs/src/bin/p1_regular_file_isatty.rsdiff --git a/crates/test-programs/src/bin/preview1_remove_directory.rs b/crates/test-programs/src/bin/p1_remove_directory.rssimilarity index 100%rename from crates/test-programs/src/bin/preview1_remove_directory.rsrename to crates/test-programs/src/bin/p1_remove_directory.rsdiff --git a/crates/test-programs/src/bin/preview1_remove_nonempty_directory.rs b/crates/test-programs/src/bin/p1_remove_nonempty_directory.rssimilarity index 100%rename from crates/test-programs/src/bin/preview1_remove_nonempty_directory.rsrename to crates/test-programs/src/bin/p1_remove_nonempty_directory.rsdiff --git a/crates/test-programs/src/bin/preview1_renumber.rs b/crates/test-programs/src/bin/p1_renumber.rssimilarity index 100%rename from crates/test-programs/src/bin/preview1_renumber.rsrename to crates/test-programs/src/bin/p1_renumber.rsdiff --git a/crates/test-programs/src/bin/preview1_sched_yield.rs b/crates/test-programs/src/bin/p1_sched_yield.rssimilarity index 100%rename from crates/test-programs/src/bin/preview1_sched_yield.rsrename to crates/test-programs/src/bin/p1_sched_yield.rsdiff --git a/crates/test-programs/src/bin/preview1_stdio.rs b/crates/test-programs/src/bin/p1_stdio.rssimilarity index 100%rename from crates/test-programs/src/bin/preview1_stdio.rsrename to crates/test-programs/src/bin/p1_stdio.rsdiff --git a/crates/test-programs/src/bin/preview1_stdio_isatty.rs b/crates/test-programs/src/bin/p1_stdio_isatty.rssimilarity index 100%rename from crates/test-programs/src/bin/preview1_stdio_isatty.rsrename to crates/test-programs/src/bin/p1_stdio_isatty.rsdiff --git a/crates/test-programs/src/bin/preview1_stdio_not_isatty.rs b/crates/test-programs/src/bin/p1_stdio_not_isatty.rssimilarity index 100%rename from crates/test-programs/src/bin/preview1_stdio_not_isatty.rsrename to crates/test-programs/src/bin/p1_stdio_not_isatty.rsdiff --git a/crates/test-programs/src/bin/preview1_symlink_create.rs b/crates/test-programs/src/bin/p1_symlink_create.rssimilarity index 100%rename from crates/test-programs/src/bin/preview1_symlink_create.rsrename to crates/test-programs/src/bin/p1_symlink_create.rsdiff --git a/crates/test-programs/src/bin/preview1_symlink_filestat.rs b/crates/test-programs/src/bin/p1_symlink_filestat.rssimilarity index 100%rename from crates/test-programs/src/bin/preview1_symlink_filestat.rsrename to crates/test-programs/src/bin/p1_symlink_filestat.rsdiff --git a/crates/test-programs/src/bin/preview1_symlink_loop.rs b/crates/test-programs/src/bin/p1_symlink_loop.rssimilarity index 100%rename from crates/test-programs/src/bin/preview1_symlink_loop.rsrename to crates/test-programs/src/bin/p1_symlink_loop.rsdiff --git a/crates/test-programs/src/bin/preview1_unicode_output.rs b/crates/test-programs/src/bin/p1_unicode_output.rssimilarity index 100%rename from crates/test-programs/src/bin/preview1_unicode_output.rsrename to crates/test-programs/src/bin/p1_unicode_output.rsdiff --git a/crates/test-programs/src/bin/preview1_unlink_file_trailing_slashes.rs b/crates/test-programs/src/bin/p1_unlink_file_trailing_slashes.rssimilarity index 100%rename from crates/test-programs/src/bin/preview1_unlink_file_trailing_slashes.rsrename to crates/test-programs/src/bin/p1_unlink_file_trailing_slashes.rsdiff --git a/crates/test-programs/src/bin/preview2_adapter_badfd.rs b/crates/test-programs/src/bin/p2_adapter_badfd.rssimilarity index 100%rename from crates/test-programs/src/bin/preview2_adapter_badfd.rsrename to crates/test-programs/src/bin/p2_adapter_badfd.rsdiff --git a/crates/test-programs/src/bin/api_proxy.rs b/crates/test-programs/src/bin/p2_api_proxy.rssimilarity index 100%rename from crates/test-programs/src/bin/api_proxy.rsrename to crates/test-programs/src/bin/p2_api_proxy.rsdiff --git a/crates/test-programs/src/bin/api_proxy_forward_request.rs b/crates/test-programs/src/bin/p2_api_proxy_forward_request.rssimilarity index 100%rename from crates/test-programs/src/bin/api_proxy_forward_request.rsrename to crates/test-programs/src/bin/p2_api_proxy_forward_request.rsdiff --git a/crates/test-programs/src/bin/api_proxy_streaming.rs b/crates/test-programs/src/bin/p2_api_proxy_streaming.rssimilarity index 100%rename from crates/test-programs/src/bin/api_proxy_streaming.rsrename to crates/test-programs/src/bin/p2_api_proxy_streaming.rsdiff --git a/crates/test-programs/src/bin/api_reactor.rs b/crates/test-programs/src/bin/p2_api_reactor.rssimilarity index 100%rename from crates/test-programs/src/bin/api_reactor.rsrename to crates/test-programs/src/bin/p2_api_reactor.rsdiff --git a/crates/test-programs/src/bin/api_read_only.rs b/crates/test-programs/src/bin/p2_api_read_only.rssimilarity index 100%rename from crates/test-programs/src/bin/api_read_only.rsrename to crates/test-programs/src/bin/p2_api_read_only.rsdiff --git a/crates/test-programs/src/bin/api_time.rs b/crates/test-programs/src/bin/p2_api_time.rssimilarity index 100%rename from crates/test-programs/src/bin/api_time.rsrename to crates/test-programs/src/bin/p2_api_time.rsdiff --git a/crates/test-programs/src/bin/cli_args.rs b/crates/test-programs/src/bin/p2_cli_args.rssimilarity index 100%rename from crates/test-programs/src/bin/cli_args.rsrename to crates/test-programs/src/bin/p2_cli_args.rsdiff --git a/crates/test-programs/src/bin/cli_argv0.rs b/crates/test-programs/src/bin/p2_cli_argv0.rssimilarity index 100%rename from crates/test-programs/src/bin/cli_argv0.rsrename to crates/test-programs/src/bin/p2_cli_argv0.rsdiff --git a/crates/test-programs/src/bin/cli_default_clocks.rs b/crates/test-programs/src/bin/p2_cli_default_clocks.rssimilarity index 100%rename from crates/test-programs/src/bin/cli_default_clocks.rsrename to crates/test-programs/src/bin/p2_cli_default_clocks.rsdiff --git a/crates/test-programs/src/bin/cli_directory_list.rs b/crates/test-programs/src/bin/p2_cli_directory_list.rssimilarity index 100%rename from crates/test-programs/src/bin/cli_directory_list.rsrename to crates/test-programs/src/bin/p2_cli_directory_list.rsdiff --git a/crates/test-programs/src/bin/cli_env.rs b/crates/test-programs/src/bin/p2_cli_env.rssimilarity index 100%rename from crates/test-programs/src/bin/cli_env.rsrename to crates/test-programs/src/bin/p2_cli_env.rsdiff --git a/crates/test-programs/src/bin/cli_exit_default.rs b/crates/test-programs/src/bin/p2_cli_exit_default.rssimilarity index 100%rename from crates/test-programs/src/bin/cli_exit_default.rsrename to crates/test-programs/src/bin/p2_cli_exit_default.rsdiff --git a/crates/test-programs/src/bin/cli_exit_failure.rs b/crates/test-programs/src/bin/p2_cli_exit_failure.rssimilarity index 100%rename from crates/test-programs/src/bin/cli_exit_failure.rsrename to crates/test-programs/src/bin/p2_cli_exit_failure.rsdiff --git a/crates/test-programs/src/bin/cli_exit_panic.rs b/crates/test-programs/src/bin/p2_cli_exit_panic.rssimilarity index 100%rename from crates/test-programs/src/bin/cli_exit_panic.rsrename to crates/test-programs/src/bin/p2_cli_exit_panic.rsdiff --git a/crates/test-programs/src/bin/cli_exit_success.rs b/crates/test-programs/src/bin/p2_cli_exit_success.rssimilarity index 100%rename from crates/test-programs/src/bin/cli_exit_success.rsrename to crates/test-programs/src/bin/p2_cli_exit_success.rsdiff --git a/crates/test-programs/src/bin/cli_exit_with_code.rs b/crates/test-programs/src/bin/p2_cli_exit_with_code.rssimilarity index 100%rename from crates/test-programs/src/bin/cli_exit_with_code.rsrename to crates/test-programs/src/bin/p2_cli_exit_with_code.rsdiff --git a/crates/test-programs/src/bin/cli_export_cabi_realloc.rs b/crates/test-programs/src/bin/p2_cli_export_cabi_realloc.rssimilarity index 100%rename from crates/test-programs/src/bin/cli_export_cabi_realloc.rsrename to crates/test-programs/src/bin/p2_cli_export_cabi_realloc.rsdiff --git a/crates/test-programs/src/bin/cli_file_append.rs b/crates/test-programs/src/bin/p2_cli_file_append.rssimilarity index 100%rename from crates/test-programs/src/bin/cli_file_append.rsrename to crates/test-programs/src/bin/p2_cli_file_append.rsdiff --git a/crates/test-programs/src/bin/cli_file_dir_sync.rs b/crates/test-programs/src/bin/p2_cli_file_dir_sync.rssimilarity index 100%rename from crates/test-programs/src/bin/cli_file_dir_sync.rsrename to crates/test-programs/src/bin/p2_cli_file_dir_sync.rsdiff --git a/crates/test-programs/src/bin/cli_file_read.rs b/crates/test-programs/src/bin/p2_cli_file_read.rssimilarity index 100%rename from crates/test-programs/src/bin/cli_file_read.rsrename to crates/test-programs/src/bin/p2_cli_file_read.rsdiff --git a/crates/test-programs/src/bin/cli_hello_stdout.rs b/crates/test-programs/src/bin/p2_cli_hello_stdout.rssimilarity index 100%rename from crates/test-programs/src/bin/cli_hello_stdout.rsrename to crates/test-programs/src/bin/p2_cli_hello_stdout.rsdiff --git a/crates/test-programs/src/bin/cli_invoke_async.rs b/crates/test-programs/src/bin/p2_cli_invoke_async.rssimilarity index 100%rename from crates/test-programs/src/bin/cli_invoke_async.rsrename to crates/test-programs/src/bin/p2_cli_invoke_async.rsdiff --git a/crates/test-programs/src/bin/cli_large_env.rs b/crates/test-programs/src/bin/p2_cli_large_env.rssimilarity index 100%rename from crates/test-programs/src/bin/cli_large_env.rsrename to crates/test-programs/src/bin/p2_cli_large_env.rsdiff --git a/crates/test-programs/src/bin/cli_p2_much_stdout.rs b/crates/test-programs/src/bin/p2_cli_much_stdout.rssimilarity index 100%rename from crates/test-programs/src/bin/cli_p2_much_stdout.rsrename to crates/test-programs/src/bin/p2_cli_much_stdout.rsdiff --git a/crates/test-programs/src/bin/cli_multiple_preopens.rs b/crates/test-programs/src/bin/p2_cli_multiple_preopens.rssimilarity index 100%rename from crates/test-programs/src/bin/cli_multiple_preopens.rsrename to crates/test-programs/src/bin/p2_cli_multiple_preopens.rsdiff --git a/crates/test-programs/src/bin/cli_no_ip_name_lookup.rs b/crates/test-programs/src/bin/p2_cli_no_ip_name_lookup.rssimilarity index 100%rename from crates/test-programs/src/bin/cli_no_ip_name_lookup.rsrename to crates/test-programs/src/bin/p2_cli_no_ip_name_lookup.rsdiff --git a/crates/test-programs/src/bin/cli_no_tcp.rs b/crates/test-programs/src/bin/p2_cli_no_tcp.rssimilarity index 100%rename from crates/test-programs/src/bin/cli_no_tcp.rsrename to crates/test-programs/src/bin/p2_cli_no_tcp.rsdiff --git a/crates/test-programs/src/bin/cli_no_udp.rs b/crates/test-programs/src/bin/p2_cli_no_udp.rssimilarity index 100%rename from crates/test-programs/src/bin/cli_no_udp.rsrename to crates/test-programs/src/bin/p2_cli_no_udp.rsdiff --git a/crates/test-programs/src/bin/cli_serve_authority_and_scheme.rs b/crates/test-programs/src/bin/p2_cli_serve_authority_and_scheme.rssimilarity index 100%rename from crates/test-programs/src/bin/cli_serve_authority_and_scheme.rsrename to crates/test-programs/src/bin/p2_cli_serve_authority_and_scheme.rsdiff --git a/crates/test-programs/src/bin/cli_serve_config.rs b/crates/test-programs/src/bin/p2_cli_serve_config.rssimilarity index 100%rename from crates/test-programs/src/bin/cli_serve_config.rsrename to crates/test-programs/src/bin/p2_cli_serve_config.rsdiff --git a/crates/test-programs/src/bin/cli_serve_echo_env.rs b/crates/test-programs/src/bin/p2_cli_serve_echo_env.rssimilarity index 100%rename from crates/test-programs/src/bin/cli_serve_echo_env.rsrename to crates/test-programs/src/bin/p2_cli_serve_echo_env.rsdiff --git a/crates/test-programs/src/bin/cli_serve_keyvalue.rs b/crates/test-programs/src/bin/p2_cli_serve_keyvalue.rssimilarity index 100%rename from crates/test-programs/src/bin/cli_serve_keyvalue.rsrename to crates/test-programs/src/bin/p2_cli_serve_keyvalue.rsdiff --git a/crates/test-programs/src/bin/cli_serve_return_before_set.rs b/crates/test-programs/src/bin/p2_cli_serve_return_before_set.rssimilarity index 100%rename from crates/test-programs/src/bin/cli_serve_return_before_set.rsrename to crates/test-programs/src/bin/p2_cli_serve_return_before_set.rsdiff --git a/crates/test-programs/src/bin/cli_serve_sleep.rs b/crates/test-programs/src/bin/p2_cli_serve_sleep.rssimilarity index 100%rename from crates/test-programs/src/bin/cli_serve_sleep.rsrename to crates/test-programs/src/bin/p2_cli_serve_sleep.rsdiff --git a/crates/test-programs/src/bin/cli_serve_trap_before_set.rs b/crates/test-programs/src/bin/p2_cli_serve_trap_before_set.rssimilarity index 100%rename from crates/test-programs/src/bin/cli_serve_trap_before_set.rsrename to crates/test-programs/src/bin/p2_cli_serve_trap_before_set.rsdiff --git a/crates/test-programs/src/bin/cli_serve_with_print.rs b/crates/test-programs/src/bin/p2_cli_serve_with_print.rssimilarity index 100%rename from crates/test-programs/src/bin/cli_serve_with_print.rsrename to crates/test-programs/src/bin/p2_cli_serve_with_print.rsdiff --git a/crates/test-programs/src/bin/cli_sleep.rs b/crates/test-programs/src/bin/p2_cli_sleep.rssimilarity index 100%rename from crates/test-programs/src/bin/cli_sleep.rsrename to crates/test-programs/src/bin/p2_cli_sleep.rsdiff --git a/crates/test-programs/src/bin/cli_sleep_forever.rs b/crates/test-programs/src/bin/p2_cli_sleep_forever.rssimilarity index 100%rename from crates/test-programs/src/bin/cli_sleep_forever.rsrename to crates/test-programs/src/bin/p2_cli_sleep_forever.rsdiff --git a/crates/test-programs/src/bin/cli_splice_stdin.rs b/crates/test-programs/src/bin/p2_cli_splice_stdin.rssimilarity index 100%rename from crates/test-programs/src/bin/cli_splice_stdin.rsrename to crates/test-programs/src/bin/p2_cli_splice_stdin.rsdiff --git a/crates/test-programs/src/bin/cli_stdin.rs b/crates/test-programs/src/bin/p2_cli_stdin.rssimilarity index 100%rename from crates/test-programs/src/bin/cli_stdin.rsrename to crates/test-programs/src/bin/p2_cli_stdin.rsdiff --git a/crates/test-programs/src/bin/cli_stdin_empty.rs b/crates/test-programs/src/bin/p2_cli_stdin_empty.rssimilarity index 100%rename from crates/test-programs/src/bin/cli_stdin_empty.rsrename to crates/test-programs/src/bin/p2_cli_stdin_empty.rsdiff --git a/crates/test-programs/src/bin/cli_stdio_write_flushes.rs b/crates/test-programs/src/bin/p2_cli_stdio_write_flushes.rssimilarity index 100%rename from crates/test-programs/src/bin/cli_stdio_write_flushes.rsrename to crates/test-programs/src/bin/p2_cli_stdio_write_flushes.rsdiff --git a/crates/test-programs/src/bin/preview2_file_read_write.rs b/crates/test-programs/src/bin/p2_file_read_write.rssimilarity index 100%rename from crates/test-programs/src/bin/preview2_file_read_write.rsrename to crates/test-programs/src/bin/p2_file_read_write.rsdiff --git a/crates/test-programs/src/bin/http_outbound_request_content_length.rs b/crates/test-programs/src/bin/p2_http_outbound_request_content_length.rssimilarity index 100%rename from crates/test-programs/src/bin/http_outbound_request_content_length.rsrename to crates/test-programs/src/bin/p2_http_outbound_request_content_length.rsdiff --git a/crates/test-programs/src/bin/http_outbound_request_get.rs b/crates/test-programs/src/bin/p2_http_outbound_request_get.rssimilarity index 100%rename from crates/test-programs/src/bin/http_outbound_request_get.rsrename to crates/test-programs/src/bin/p2_http_outbound_request_get.rsdiff --git a/crates/test-programs/src/bin/http_outbound_request_invalid_dnsname.rs b/crates/test-programs/src/bin/p2_http_outbound_request_invalid_dnsname.rssimilarity index 100%rename from crates/test-programs/src/bin/http_outbound_request_invalid_dnsname.rsrename to crates/test-programs/src/bin/p2_http_outbound_request_invalid_dnsname.rsdiff --git a/crates/test-programs/src/bin/http_outbound_request_invalid_header.rs b/crates/test-programs/src/bin/p2_http_outbound_request_invalid_header.rssimilarity index 100%rename from crates/test-programs/src/bin/http_outbound_request_invalid_header.rsrename to crates/test-programs/src/bin/p2_http_outbound_request_invalid_header.rsdiff --git a/crates/test-programs/src/bin/http_outbound_request_invalid_port.rs b/crates/test-programs/src/bin/p2_http_outbound_request_invalid_port.rssimilarity index 100%rename from crates/test-programs/src/bin/http_outbound_request_invalid_port.rsrename to crates/test-programs/src/bin/p2_http_outbound_request_invalid_port.rsdiff --git a/crates/test-programs/src/bin/http_outbound_request_invalid_version.rs b/crates/test-programs/src/bin/p2_http_outbound_request_invalid_version.rssimilarity index 100%rename from crates/test-programs/src/bin/http_outbound_request_invalid_version.rsrename to crates/test-programs/src/bin/p2_http_outbound_request_invalid_version.rsdiff --git a/crates/test-programs/src/bin/http_outbound_request_large_post.rs b/crates/test-programs/src/bin/p2_http_outbound_request_large_post.rssimilarity index 100%rename from crates/test-programs/src/bin/http_outbound_request_large_post.rsrename to crates/test-programs/src/bin/p2_http_outbound_request_large_post.rsdiff --git a/crates/test-programs/src/bin/http_outbound_request_missing_path_and_query.rs b/crates/test-programs/src/bin/p2_http_outbound_request_missing_path_and_query.rssimilarity index 100%rename from crates/test-programs/src/bin/http_outbound_request_missing_path_and_query.rsrename to crates/test-programs/src/bin/p2_http_outbound_request_missing_path_and_query.rsdiff --git a/crates/test-programs/src/bin/http_outbound_request_post.rs b/crates/test-programs/src/bin/p2_http_outbound_request_post.rssimilarity index 100%rename from crates/test-programs/src/bin/http_outbound_request_post.rsrename to crates/test-programs/src/bin/p2_http_outbound_request_post.rsdiff --git a/crates/test-programs/src/bin/http_outbound_request_put.rs b/crates/test-programs/src/bin/p2_http_outbound_request_put.rssimilarity index 100%rename from crates/test-programs/src/bin/http_outbound_request_put.rsrename to crates/test-programs/src/bin/p2_http_outbound_request_put.rsdiff --git a/crates/test-programs/src/bin/http_outbound_request_response_build.rs b/crates/test-programs/src/bin/p2_http_outbound_request_response_build.rssimilarity index 100%rename from crates/test-programs/src/bin/http_outbound_request_response_build.rsrename to crates/test-programs/src/bin/p2_http_outbound_request_response_build.rsdiff --git a/crates/test-programs/src/bin/http_outbound_request_timeout.rs b/crates/test-programs/src/bin/p2_http_outbound_request_timeout.rssimilarity index 100%rename from crates/test-programs/src/bin/http_outbound_request_timeout.rsrename to crates/test-programs/src/bin/p2_http_outbound_request_timeout.rsdiff --git a/crates/test-programs/src/bin/http_outbound_request_unknown_method.rs b/crates/test-programs/src/bin/p2_http_outbound_request_unknown_method.rssimilarity index 100%rename from crates/test-programs/src/bin/http_outbound_request_unknown_method.rsrename to crates/test-programs/src/bin/p2_http_outbound_request_unknown_method.rsdiff --git a/crates/test-programs/src/bin/http_outbound_request_unsupported_scheme.rs b/crates/test-programs/src/bin/p2_http_outbound_request_unsupported_scheme.rssimilarity index 100%rename from crates/test-programs/src/bin/http_outbound_request_unsupported_scheme.rsrename to crates/test-programs/src/bin/p2_http_outbound_request_unsupported_scheme.rsdiff --git a/crates/test-programs/src/bin/preview2_ip_name_lookup.rs b/crates/test-programs/src/bin/p2_ip_name_lookup.rssimilarity index 100%rename from crates/test-programs/src/bin/preview2_ip_name_lookup.rsrename to crates/test-programs/src/bin/p2_ip_name_lookup.rsdiff --git a/crates/test-programs/src/bin/preview2_pollable_correct.rs b/crates/test-programs/src/bin/p2_pollable_correct.rssimilarity index 100%rename from crates/test-programs/src/bin/preview2_pollable_correct.rsrename to crates/test-programs/src/bin/p2_pollable_correct.rsdiff --git a/crates/test-programs/src/bin/preview2_pollable_traps.rs b/crates/test-programs/src/bin/p2_pollable_traps.rssimilarity index 100%rename from crates/test-programs/src/bin/preview2_pollable_traps.rsrename to crates/test-programs/src/bin/p2_pollable_traps.rsdiff --git a/crates/test-programs/src/bin/preview2_random.rs b/crates/test-programs/src/bin/p2_random.rssimilarity index 100%rename from crates/test-programs/src/bin/preview2_random.rsrename to crates/test-programs/src/bin/p2_random.rsdiff --git a/crates/test-programs/src/bin/preview2_sleep.rs b/crates/test-programs/src/bin/p2_sleep.rssimilarity index 100%rename from crates/test-programs/src/bin/preview2_sleep.rsrename to crates/test-programs/src/bin/p2_sleep.rsdiff --git a/crates/test-programs/src/bin/preview2_stream_pollable_correct.rs b/crates/test-programs/src/bin/p2_stream_pollable_correct.rssimilarity index 100%rename from crates/test-programs/src/bin/preview2_stream_pollable_correct.rsrename to crates/test-programs/src/bin/p2_stream_pollable_correct.rsdiff --git a/crates/test-programs/src/bin/preview2_stream_pollable_traps.rs b/crates/test-programs/src/bin/p2_stream_pollable_traps.rssimilarity index 100%rename from crates/test-programs/src/bin/preview2_stream_pollable_traps.rsrename to crates/test-programs/src/bin/p2_stream_pollable_traps.rsdiff --git a/crates/test-programs/src/bin/preview2_tcp_bind.rs b/crates/test-programs/src/bin/p2_tcp_bind.rssimilarity index 100%rename from crates/test-programs/src/bin/preview2_tcp_bind.rsrename to crates/test-programs/src/bin/p2_tcp_bind.rsdiff --git a/crates/test-programs/src/bin/preview2_tcp_connect.rs b/crates/test-programs/src/bin/p2_tcp_connect.rssimilarity index 100%rename from crates/test-programs/src/bin/preview2_tcp_connect.rsrename to crates/test-programs/src/bin/p2_tcp_connect.rsdiff --git a/crates/test-programs/src/bin/preview2_tcp_sample_application.rs b/crates/test-programs/src/bin/p2_tcp_sample_application.rssimilarity index 100%rename from crates/test-programs/src/bin/preview2_tcp_sample_application.rsrename to crates/test-programs/src/bin/p2_tcp_sample_application.rsdiff --git a/crates/test-programs/src/bin/preview2_tcp_sockopts.rs b/crates/test-programs/src/bin/p2_tcp_sockopts.rssimilarity index 100%rename from crates/test-programs/src/bin/preview2_tcp_sockopts.rsrename to crates/test-programs/src/bin/p2_tcp_sockopts.rsdiff --git a/crates/test-programs/src/bin/preview2_tcp_states.rs b/crates/test-programs/src/bin/p2_tcp_states.rssimilarity index 100%rename from crates/test-programs/src/bin/preview2_tcp_states.rsrename to crates/test-programs/src/bin/p2_tcp_states.rsdiff --git a/crates/test-programs/src/bin/preview2_tcp_streams.rs b/crates/test-programs/src/bin/p2_tcp_streams.rssimilarity index 100%rename from crates/test-programs/src/bin/preview2_tcp_streams.rsrename to crates/test-programs/src/bin/p2_tcp_streams.rsdiff --git a/crates/test-programs/src/bin/preview2_udp_bind.rs b/crates/test-programs/src/bin/p2_udp_bind.rssimilarity index 100%rename from crates/test-programs/src/bin/preview2_udp_bind.rsrename to crates/test-programs/src/bin/p2_udp_bind.rsdiff --git a/crates/test-programs/src/bin/preview2_udp_connect.rs b/crates/test-programs/src/bin/p2_udp_connect.rssimilarity index 100%rename from crates/test-programs/src/bin/preview2_udp_connect.rsrename to crates/test-programs/src/bin/p2_udp_connect.rsdiff --git a/crates/test-programs/src/bin/preview2_udp_sample_application.rs b/crates/test-programs/src/bin/p2_udp_sample_application.rssimilarity index 100%rename from crates/test-programs/src/bin/preview2_udp_sample_application.rsrename to crates/test-programs/src/bin/p2_udp_sample_application.rsdiff --git a/crates/test-programs/src/bin/preview2_udp_sockopts.rs b/crates/test-programs/src/bin/p2_udp_sockopts.rssimilarity index 100%rename from crates/test-programs/src/bin/preview2_udp_sockopts.rsrename to crates/test-programs/src/bin/p2_udp_sockopts.rsdiff --git a/crates/test-programs/src/bin/preview2_udp_states.rs b/crates/test-programs/src/bin/p2_udp_states.rssimilarity index 100%rename from crates/test-programs/src/bin/preview2_udp_states.rsrename to crates/test-programs/src/bin/p2_udp_states.rsdiff --git a/crates/test-programs/src/bin/cli_p3_hello_stdout.rs b/crates/test-programs/src/bin/p3_cli_hello_stdout.rssimilarity index 100%rename from crates/test-programs/src/bin/cli_p3_hello_stdout.rsrename to crates/test-programs/src/bin/p3_cli_hello_stdout.rsdiff --git a/crates/test-programs/src/bin/cli_p3_much_stdout.rs b/crates/test-programs/src/bin/p3_cli_much_stdout.rssimilarity index 100%rename from crates/test-programs/src/bin/cli_p3_much_stdout.rsrename to crates/test-programs/src/bin/p3_cli_much_stdout.rsdiff --git a/crates/test-programs/src/bin/cli_serve_p3_hello_world.rs b/crates/test-programs/src/bin/p3_cli_serve_hello_world.rssimilarity index 100%rename from crates/test-programs/src/bin/cli_serve_p3_hello_world.rsrename to crates/test-programs/src/bin/p3_cli_serve_hello_world.rsdiff --git a/crates/wasi-common/tests/all/async_.rs b/crates/wasi-common/tests/all/async_.rsindex 02ad3430c8..115059d021 100644--- a/crates/wasi-common/tests/all/async_.rs+++ b/crates/wasi-common/tests/all/async_.rs@@ -3,7 +3,7 @@ use test_programs_artifacts::*;use wasi_common::WasiCtx;use wasi_common::tokio::{WasiCtxBuilder, add_to_linker};-foreach_preview1!(assert_test_exists);+foreach_p1!(assert_test_exists);pub fn prepare_workspace(exe_name: &str) -> Result<TempDir> {let prefix = format!("wasi_tokio_{exe_name}_");@@ -77,219 +77,221 @@ async fn run(path: &str, inherit_stdio: bool) -> Result<()> {// Below here is mechanical: there should be one test for every binary in// wasi-tests.#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_big_random_buf() {- run(PREVIEW1_BIG_RANDOM_BUF, true).await.unwrap()+async fn p1_big_random_buf() {+ run(P1_BIG_RANDOM_BUF, true).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_clock_time_get() {- run(PREVIEW1_CLOCK_TIME_GET, true).await.unwrap()+async fn p1_clock_time_get() {+ run(P1_CLOCK_TIME_GET, true).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_close_preopen() {- run(PREVIEW1_CLOSE_PREOPEN, true).await.unwrap()+async fn p1_close_preopen() {+ run(P1_CLOSE_PREOPEN, true).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_dangling_fd() {- run(PREVIEW1_DANGLING_FD, true).await.unwrap()+async fn p1_dangling_fd() {+ run(P1_DANGLING_FD, true).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_dangling_symlink() {- run(PREVIEW1_DANGLING_SYMLINK, true).await.unwrap()+async fn p1_dangling_symlink() {+ run(P1_DANGLING_SYMLINK, true).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_directory_seek() {- run(PREVIEW1_DIRECTORY_SEEK, true).await.unwrap()+async fn p1_directory_seek() {+ run(P1_DIRECTORY_SEEK, true).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_dir_fd_op_failures() {- run(PREVIEW1_DIR_FD_OP_FAILURES, true).await.unwrap()+async fn p1_dir_fd_op_failures() {+ run(P1_DIR_FD_OP_FAILURES, true).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_fd_advise() {- run(PREVIEW1_FD_ADVISE, true).await.unwrap()+async fn p1_fd_advise() {+ run(P1_FD_ADVISE, true).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_fd_filestat_get() {- run(PREVIEW1_FD_FILESTAT_GET, true).await.unwrap()+async fn p1_fd_filestat_get() {+ run(P1_FD_FILESTAT_GET, true).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_fd_filestat_set() {- run(PREVIEW1_FD_FILESTAT_SET, true).await.unwrap()+async fn p1_fd_filestat_set() {+ run(P1_FD_FILESTAT_SET, true).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_fd_flags_set() {- run(PREVIEW1_FD_FLAGS_SET, true).await.unwrap()+async fn p1_fd_flags_set() {+ run(P1_FD_FLAGS_SET, true).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_fd_readdir() {- run(PREVIEW1_FD_READDIR, true).await.unwrap()+async fn p1_fd_readdir() {+ run(P1_FD_READDIR, true).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_file_allocate() {- run(PREVIEW1_FILE_ALLOCATE, true).await.unwrap()+async fn p1_file_allocate() {+ run(P1_FILE_ALLOCATE, true).await.unwrap()}// see sync.rs for notes about ignores here#[test_log::test(tokio::test(flavor = "multi_thread"))]#[cfg_attr(not(target_os = "linux"), ignore)]-async fn preview1_file_pread_pwrite() {- run(PREVIEW1_FILE_PREAD_PWRITE, true).await.unwrap()+async fn p1_file_pread_pwrite() {+ run(P1_FILE_PREAD_PWRITE, true).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_file_read_write() {- run(PREVIEW1_FILE_READ_WRITE, true).await.unwrap()+async fn p1_file_read_write() {+ run(P1_FILE_READ_WRITE, true).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_file_seek_tell() {- run(PREVIEW1_FILE_SEEK_TELL, true).await.unwrap()+async fn p1_file_seek_tell() {+ run(P1_FILE_SEEK_TELL, true).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_file_truncation() {- run(PREVIEW1_FILE_TRUNCATION, true).await.unwrap()+async fn p1_file_truncation() {+ run(P1_FILE_TRUNCATION, true).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_file_unbuffered_write() {- run(PREVIEW1_FILE_UNBUFFERED_WRITE, true).await.unwrap()+async fn p1_file_unbuffered_write() {+ run(P1_FILE_UNBUFFERED_WRITE, true).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_interesting_paths() {- run(PREVIEW1_INTERESTING_PATHS, true).await.unwrap()+async fn p1_interesting_paths() {+ run(P1_INTERESTING_PATHS, true).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_regular_file_isatty() {- run(PREVIEW1_REGULAR_FILE_ISATTY, false).await.unwrap()+async fn p1_regular_file_isatty() {+ run(P1_REGULAR_FILE_ISATTY, false).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_nofollow_errors() {- run(PREVIEW1_NOFOLLOW_ERRORS, true).await.unwrap()+async fn p1_nofollow_errors() {+ run(P1_NOFOLLOW_ERRORS, true).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_overwrite_preopen() {- run(PREVIEW1_OVERWRITE_PREOPEN, true).await.unwrap()+async fn p1_overwrite_preopen() {+ run(P1_OVERWRITE_PREOPEN, true).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_path_exists() {- run(PREVIEW1_PATH_EXISTS, true).await.unwrap()+async fn p1_path_exists() {+ run(P1_PATH_EXISTS, true).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_path_filestat() {- run(PREVIEW1_PATH_FILESTAT, true).await.unwrap()+async fn p1_path_filestat() {+ run(P1_PATH_FILESTAT, true).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_path_link() {- run(PREVIEW1_PATH_LINK, true).await.unwrap()+async fn p1_path_link() {+ run(P1_PATH_LINK, true).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_path_open_create_existing() {- run(PREVIEW1_PATH_OPEN_CREATE_EXISTING, true).await.unwrap()+async fn p1_path_open_create_existing() {+ run(P1_PATH_OPEN_CREATE_EXISTING, true).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_path_open_read_write() {- run(PREVIEW1_PATH_OPEN_READ_WRITE, true).await.unwrap()+async fn p1_path_open_read_write() {+ run(P1_PATH_OPEN_READ_WRITE, true).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_path_open_dirfd_not_dir() {- run(PREVIEW1_PATH_OPEN_DIRFD_NOT_DIR, true).await.unwrap()+async fn p1_path_open_dirfd_not_dir() {+ run(P1_PATH_OPEN_DIRFD_NOT_DIR, true).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_path_open_missing() {- run(PREVIEW1_PATH_OPEN_MISSING, true).await.unwrap()+async fn p1_path_open_missing() {+ run(P1_PATH_OPEN_MISSING, true).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_path_open_nonblock() {- run(PREVIEW1_PATH_OPEN_NONBLOCK, true).await.unwrap()+async fn p1_path_open_nonblock() {+ run(P1_PATH_OPEN_NONBLOCK, true).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_path_rename_dir_trailing_slashes() {- run(PREVIEW1_PATH_RENAME_DIR_TRAILING_SLASHES, true)+async fn p1_path_rename_dir_trailing_slashes() {+ run(P1_PATH_RENAME_DIR_TRAILING_SLASHES, true).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_path_rename() {- run(PREVIEW1_PATH_RENAME, true).await.unwrap()+async fn p1_path_rename() {+ run(P1_PATH_RENAME, true).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_path_symlink_trailing_slashes() {- run(PREVIEW1_PATH_SYMLINK_TRAILING_SLASHES, true)- .await- .unwrap()+async fn p1_path_symlink_trailing_slashes() {+ run(P1_PATH_SYMLINK_TRAILING_SLASHES, true).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_poll_oneoff_files() {- run(PREVIEW1_POLL_ONEOFF_FILES, false).await.unwrap()+async fn p1_poll_oneoff_files() {+ run(P1_POLL_ONEOFF_FILES, false).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_poll_oneoff_stdio() {- run(PREVIEW1_POLL_ONEOFF_STDIO, true).await.unwrap()+async fn p1_poll_oneoff_stdio() {+ run(P1_POLL_ONEOFF_STDIO, true).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_readlink() {- run(PREVIEW1_READLINK, true).await.unwrap()+async fn p1_readlink() {+ run(P1_READLINK, true).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_remove_directory() {- run(PREVIEW1_REMOVE_DIRECTORY, true).await.unwrap()+async fn p1_remove_directory() {+ run(P1_REMOVE_DIRECTORY, true).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_remove_nonempty_directory() {- run(PREVIEW1_REMOVE_NONEMPTY_DIRECTORY, true).await.unwrap()+async fn p1_remove_nonempty_directory() {+ run(P1_REMOVE_NONEMPTY_DIRECTORY, true).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_renumber() {- run(PREVIEW1_RENUMBER, true).await.unwrap()+async fn p1_renumber() {+ run(P1_RENUMBER, true).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_sched_yield() {- run(PREVIEW1_SCHED_YIELD, true).await.unwrap()+async fn p1_sched_yield() {+ run(P1_SCHED_YIELD, true).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_stdio() {- run(PREVIEW1_STDIO, true).await.unwrap()+async fn p1_stdio() {+ run(P1_STDIO, true).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_stdio_isatty() {+async fn p1_stdio_isatty() {// Only a valid test if the host executable's stdio is a terminal:if test_programs_artifacts::stdio_is_terminal() {// Inherit stdio, test asserts it is a tty:- run(PREVIEW1_STDIO_ISATTY, true).await.unwrap()+ run(P1_STDIO_ISATTY, true).await.unwrap()}}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_stdio_not_isatty() {+async fn p1_stdio_not_isatty() {// Don't inherit stdio, test asserts each is not tty:- run(PREVIEW1_STDIO_NOT_ISATTY, false).await.unwrap()+ run(P1_STDIO_NOT_ISATTY, false).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_symlink_create() {- run(PREVIEW1_SYMLINK_CREATE, true).await.unwrap()+async fn p1_symlink_create() {+ run(P1_SYMLINK_CREATE, true).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_symlink_filestat() {- run(PREVIEW1_SYMLINK_FILESTAT, true).await.unwrap()+async fn p1_symlink_filestat() {+ run(P1_SYMLINK_FILESTAT, true).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_symlink_loop() {- run(PREVIEW1_SYMLINK_LOOP, true).await.unwrap()+async fn p1_symlink_loop() {+ run(P1_SYMLINK_LOOP, true).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_unlink_file_trailing_slashes() {- run(PREVIEW1_UNLINK_FILE_TRAILING_SLASHES, true)- .await- .unwrap()+async fn p1_unlink_file_trailing_slashes() {+ run(P1_UNLINK_FILE_TRAILING_SLASHES, true).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_path_open_preopen() {- run(PREVIEW1_PATH_OPEN_PREOPEN, true).await.unwrap()+async fn p1_path_open_preopen() {+ run(P1_PATH_OPEN_PREOPEN, true).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_unicode_output() {- run(PREVIEW1_UNICODE_OUTPUT, true).await.unwrap()+async fn p1_unicode_output() {+ run(P1_UNICODE_OUTPUT, true).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_file_write() {- run(PREVIEW1_FILE_WRITE, true).await.unwrap()+async fn p1_file_write() {+ run(P1_FILE_WRITE, true).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_path_open_lots() {- run(PREVIEW1_PATH_OPEN_LOTS, true).await.unwrap()+async fn p1_path_open_lots() {+ run(P1_PATH_OPEN_LOTS, true).await.unwrap()}++#[expect(+ dead_code,+ reason = "tested in the wasi-cli crate, satisfying foreach_api! macro"+)]+fn p1_cli_much_stdout() {}diff --git a/crates/wasi-common/tests/all/sync.rs b/crates/wasi-common/tests/all/sync.rsindex b9980faa1c..4245cf8d4d 100644--- a/crates/wasi-common/tests/all/sync.rs+++ b/crates/wasi-common/tests/all/sync.rs@@ -2,7 +2,7 @@ use super::*;use test_programs_artifacts::*;use wasi_common::sync::{WasiCtxBuilder, add_to_linker};-foreach_preview1!(assert_test_exists);+foreach_p1!(assert_test_exists);fn run(path: &str, inherit_stdio: bool) -> Result<()> {let path = Path::new(path);@@ -68,56 +68,56 @@ fn run(path: &str, inherit_stdio: bool) -> Result<()> {// Below here is mechanical: there should be one test for every binary in// wasi-tests.#[test_log::test]-fn preview1_big_random_buf() {- run(PREVIEW1_BIG_RANDOM_BUF, true).unwrap()+fn p1_big_random_buf() {+ run(P1_BIG_RANDOM_BUF, true).unwrap()}#[test_log::test]-fn preview1_clock_time_get() {- run(PREVIEW1_CLOCK_TIME_GET, true).unwrap()+fn p1_clock_time_get() {+ run(P1_CLOCK_TIME_GET, true).unwrap()}#[test_log::test]-fn preview1_close_preopen() {- run(PREVIEW1_CLOSE_PREOPEN, true).unwrap()+fn p1_close_preopen() {+ run(P1_CLOSE_PREOPEN, true).unwrap()}#[test_log::test]-fn preview1_dangling_fd() {- run(PREVIEW1_DANGLING_FD, true).unwrap()+fn p1_dangling_fd() {+ run(P1_DANGLING_FD, true).unwrap()}#[test_log::test]-fn preview1_dangling_symlink() {- run(PREVIEW1_DANGLING_SYMLINK, true).unwrap()+fn p1_dangling_symlink() {+ run(P1_DANGLING_SYMLINK, true).unwrap()}#[test_log::test]-fn preview1_directory_seek() {- run(PREVIEW1_DIRECTORY_SEEK, true).unwrap()+fn p1_directory_seek() {+ run(P1_DIRECTORY_SEEK, true).unwrap()}#[test_log::test]-fn preview1_dir_fd_op_failures() {- run(PREVIEW1_DIR_FD_OP_FAILURES, true).unwrap()+fn p1_dir_fd_op_failures() {+ run(P1_DIR_FD_OP_FAILURES, true).unwrap()}#[test_log::test]-fn preview1_fd_advise() {- run(PREVIEW1_FD_ADVISE, true).unwrap()+fn p1_fd_advise() {+ run(P1_FD_ADVISE, true).unwrap()}#[test_log::test]-fn preview1_fd_filestat_get() {- run(PREVIEW1_FD_FILESTAT_GET, true).unwrap()+fn p1_fd_filestat_get() {+ run(P1_FD_FILESTAT_GET, true).unwrap()}#[test_log::test]-fn preview1_fd_filestat_set() {- run(PREVIEW1_FD_FILESTAT_SET, true).unwrap()+fn p1_fd_filestat_set() {+ run(P1_FD_FILESTAT_SET, true).unwrap()}#[test_log::test]-fn preview1_fd_flags_set() {- run(PREVIEW1_FD_FLAGS_SET, true).unwrap()+fn p1_fd_flags_set() {+ run(P1_FD_FLAGS_SET, true).unwrap()}#[test_log::test]-fn preview1_fd_readdir() {- run(PREVIEW1_FD_READDIR, true).unwrap()+fn p1_fd_readdir() {+ run(P1_FD_READDIR, true).unwrap()}#[test_log::test]-fn preview1_file_allocate() {- run(PREVIEW1_FILE_ALLOCATE, true).unwrap()+fn p1_file_allocate() {+ run(P1_FILE_ALLOCATE, true).unwrap()}// This test is outside of linux because the behavior of `pwrite`, which this// test bottoms out into, differs across platforms. The wasi-common crate@@ -125,159 +125,165 @@ fn preview1_file_allocate() {// flag easily, but `wasmtime-wasi` has the "correct" behavior here.#[test_log::test]#[cfg_attr(not(target_os = "linux"), ignore)]-fn preview1_file_pread_pwrite() {- run(PREVIEW1_FILE_PREAD_PWRITE, true).unwrap()+fn p1_file_pread_pwrite() {+ run(P1_FILE_PREAD_PWRITE, true).unwrap()}#[test_log::test]-fn preview1_file_read_write() {- run(PREVIEW1_FILE_READ_WRITE, true).unwrap()+fn p1_file_read_write() {+ run(P1_FILE_READ_WRITE, true).unwrap()}#[test_log::test]-fn preview1_file_seek_tell() {- run(PREVIEW1_FILE_SEEK_TELL, true).unwrap()+fn p1_file_seek_tell() {+ run(P1_FILE_SEEK_TELL, true).unwrap()}#[test_log::test]-fn preview1_file_truncation() {- run(PREVIEW1_FILE_TRUNCATION, true).unwrap()+fn p1_file_truncation() {+ run(P1_FILE_TRUNCATION, true).unwrap()}#[test_log::test]-fn preview1_file_unbuffered_write() {- run(PREVIEW1_FILE_UNBUFFERED_WRITE, true).unwrap()+fn p1_file_unbuffered_write() {+ run(P1_FILE_UNBUFFERED_WRITE, true).unwrap()}#[test_log::test]-fn preview1_interesting_paths() {- run(PREVIEW1_INTERESTING_PATHS, true).unwrap()+fn p1_interesting_paths() {+ run(P1_INTERESTING_PATHS, true).unwrap()}#[test_log::test]-fn preview1_regular_file_isatty() {- run(PREVIEW1_REGULAR_FILE_ISATTY, true).unwrap()+fn p1_regular_file_isatty() {+ run(P1_REGULAR_FILE_ISATTY, true).unwrap()}#[test_log::test]-fn preview1_nofollow_errors() {- run(PREVIEW1_NOFOLLOW_ERRORS, true).unwrap()+fn p1_nofollow_errors() {+ run(P1_NOFOLLOW_ERRORS, true).unwrap()}#[test_log::test]-fn preview1_overwrite_preopen() {- run(PREVIEW1_OVERWRITE_PREOPEN, true).unwrap()+fn p1_overwrite_preopen() {+ run(P1_OVERWRITE_PREOPEN, true).unwrap()}#[test_log::test]-fn preview1_path_exists() {- run(PREVIEW1_PATH_EXISTS, true).unwrap()+fn p1_path_exists() {+ run(P1_PATH_EXISTS, true).unwrap()}#[test_log::test]-fn preview1_path_filestat() {- run(PREVIEW1_PATH_FILESTAT, true).unwrap()+fn p1_path_filestat() {+ run(P1_PATH_FILESTAT, true).unwrap()}#[test_log::test]-fn preview1_path_link() {- run(PREVIEW1_PATH_LINK, true).unwrap()+fn p1_path_link() {+ run(P1_PATH_LINK, true).unwrap()}#[test_log::test]-fn preview1_path_open_create_existing() {- run(PREVIEW1_PATH_OPEN_CREATE_EXISTING, true).unwrap()+fn p1_path_open_create_existing() {+ run(P1_PATH_OPEN_CREATE_EXISTING, true).unwrap()}#[test_log::test]-fn preview1_path_open_read_write() {- run(PREVIEW1_PATH_OPEN_READ_WRITE, true).unwrap()+fn p1_path_open_read_write() {+ run(P1_PATH_OPEN_READ_WRITE, true).unwrap()}#[test_log::test]-fn preview1_path_open_dirfd_not_dir() {- run(PREVIEW1_PATH_OPEN_DIRFD_NOT_DIR, true).unwrap()+fn p1_path_open_dirfd_not_dir() {+ run(P1_PATH_OPEN_DIRFD_NOT_DIR, true).unwrap()}#[test_log::test]-fn preview1_path_open_missing() {- run(PREVIEW1_PATH_OPEN_MISSING, true).unwrap()+fn p1_path_open_missing() {+ run(P1_PATH_OPEN_MISSING, true).unwrap()}#[test_log::test]-fn preview1_path_open_nonblock() {- run(PREVIEW1_PATH_OPEN_NONBLOCK, true).unwrap()+fn p1_path_open_nonblock() {+ run(P1_PATH_OPEN_NONBLOCK, true).unwrap()}#[test_log::test]-fn preview1_path_rename_dir_trailing_slashes() {- run(PREVIEW1_PATH_RENAME_DIR_TRAILING_SLASHES, true).unwrap()+fn p1_path_rename_dir_trailing_slashes() {+ run(P1_PATH_RENAME_DIR_TRAILING_SLASHES, true).unwrap()}#[test_log::test]-fn preview1_path_rename() {- run(PREVIEW1_PATH_RENAME, true).unwrap()+fn p1_path_rename() {+ run(P1_PATH_RENAME, true).unwrap()}#[test_log::test]-fn preview1_path_symlink_trailing_slashes() {- run(PREVIEW1_PATH_SYMLINK_TRAILING_SLASHES, true).unwrap()+fn p1_path_symlink_trailing_slashes() {+ run(P1_PATH_SYMLINK_TRAILING_SLASHES, true).unwrap()}#[test_log::test]-fn preview1_poll_oneoff_files() {- run(PREVIEW1_POLL_ONEOFF_FILES, false).unwrap()+fn p1_poll_oneoff_files() {+ run(P1_POLL_ONEOFF_FILES, false).unwrap()}#[test_log::test]-fn preview1_poll_oneoff_stdio() {- run(PREVIEW1_POLL_ONEOFF_STDIO, true).unwrap()+fn p1_poll_oneoff_stdio() {+ run(P1_POLL_ONEOFF_STDIO, true).unwrap()}#[test_log::test]-fn preview1_readlink() {- run(PREVIEW1_READLINK, true).unwrap()+fn p1_readlink() {+ run(P1_READLINK, true).unwrap()}#[test_log::test]-fn preview1_remove_directory() {- run(PREVIEW1_REMOVE_DIRECTORY, true).unwrap()+fn p1_remove_directory() {+ run(P1_REMOVE_DIRECTORY, true).unwrap()}#[test_log::test]-fn preview1_remove_nonempty_directory() {- run(PREVIEW1_REMOVE_NONEMPTY_DIRECTORY, true).unwrap()+fn p1_remove_nonempty_directory() {+ run(P1_REMOVE_NONEMPTY_DIRECTORY, true).unwrap()}#[test_log::test]-fn preview1_renumber() {- run(PREVIEW1_RENUMBER, true).unwrap()+fn p1_renumber() {+ run(P1_RENUMBER, true).unwrap()}#[test_log::test]-fn preview1_sched_yield() {- run(PREVIEW1_SCHED_YIELD, true).unwrap()+fn p1_sched_yield() {+ run(P1_SCHED_YIELD, true).unwrap()}#[test_log::test]-fn preview1_stdio() {- run(PREVIEW1_STDIO, true).unwrap()+fn p1_stdio() {+ run(P1_STDIO, true).unwrap()}#[test_log::test]-fn preview1_stdio_isatty() {+fn p1_stdio_isatty() {if test_programs_artifacts::stdio_is_terminal() {// Inherit stdio, which is a terminal in the test runner's environment:- run(PREVIEW1_STDIO_ISATTY, true).unwrap()+ run(P1_STDIO_ISATTY, true).unwrap()}}#[test_log::test]-fn preview1_stdio_not_isatty() {+fn p1_stdio_not_isatty() {// Don't inherit stdio, test asserts each is not tty:- run(PREVIEW1_STDIO_NOT_ISATTY, false).unwrap()+ run(P1_STDIO_NOT_ISATTY, false).unwrap()}#[test_log::test]-fn preview1_symlink_create() {- run(PREVIEW1_SYMLINK_CREATE, true).unwrap()+fn p1_symlink_create() {+ run(P1_SYMLINK_CREATE, true).unwrap()}#[test_log::test]-fn preview1_symlink_filestat() {- run(PREVIEW1_SYMLINK_FILESTAT, true).unwrap()+fn p1_symlink_filestat() {+ run(P1_SYMLINK_FILESTAT, true).unwrap()}#[test_log::test]-fn preview1_symlink_loop() {- run(PREVIEW1_SYMLINK_LOOP, true).unwrap()+fn p1_symlink_loop() {+ run(P1_SYMLINK_LOOP, true).unwrap()}#[test_log::test]-fn preview1_unlink_file_trailing_slashes() {- run(PREVIEW1_UNLINK_FILE_TRAILING_SLASHES, true).unwrap()+fn p1_unlink_file_trailing_slashes() {+ run(P1_UNLINK_FILE_TRAILING_SLASHES, true).unwrap()}#[test_log::test]-fn preview1_path_open_preopen() {- run(PREVIEW1_PATH_OPEN_PREOPEN, true).unwrap()+fn p1_path_open_preopen() {+ run(P1_PATH_OPEN_PREOPEN, true).unwrap()}#[test_log::test]-fn preview1_unicode_output() {- run(PREVIEW1_UNICODE_OUTPUT, true).unwrap()+fn p1_unicode_output() {+ run(P1_UNICODE_OUTPUT, true).unwrap()}#[test_log::test]-fn preview1_file_write() {- run(PREVIEW1_FILE_WRITE, true).unwrap()+fn p1_file_write() {+ run(P1_FILE_WRITE, true).unwrap()}#[test_log::test]-fn preview1_path_open_lots() {- run(PREVIEW1_PATH_OPEN_LOTS, true).unwrap()+fn p1_path_open_lots() {+ run(P1_PATH_OPEN_LOTS, true).unwrap()}++#[expect(+ dead_code,+ reason = "tested in the wasi-cli crate, satisfying foreach_api! macro"+)]+fn p1_cli_much_stdout() {}diff --git a/crates/wasi-http/tests/all/p2.rs b/crates/wasi-http/tests/all/p2.rsindex c4a631f30e..5c5b2c962b 100644--- a/crates/wasi-http/tests/all/p2.rs+++ b/crates/wasi-http/tests/all/p2.rs@@ -214,7 +214,7 @@ async fn wasi_http_proxy_tests() -> anyhow::Result<()> {.method(http::Method::GET);let resp = run_wasi_http(- test_programs_artifacts::API_PROXY_COMPONENT,+ test_programs_artifacts::P2_API_PROXY_COMPONENT,req.body(body::empty())?,None,None,@@ -346,7 +346,7 @@ async fn do_wasi_http_hash_all(override_send_request: bool) -> Result<()> {let request = request.body(body::empty())?;let response = run_wasi_http(- test_programs_artifacts::API_PROXY_STREAMING_COMPONENT,+ test_programs_artifacts::P2_API_PROXY_STREAMING_COMPONENT,request,send_request,None,@@ -394,7 +394,7 @@ async fn wasi_http_hash_all_with_reject() -> Result<()> {let request = request.body(body::empty())?;let response = run_wasi_http(- test_programs_artifacts::API_PROXY_STREAMING_COMPONENT,+ test_programs_artifacts::P2_API_PROXY_STREAMING_COMPONENT,request,None,Some("forbidden.com".to_string()),@@ -514,7 +514,7 @@ async fn do_wasi_http_echo(uri: &str, url_header: Option<&str>) -> Result<()> {))))?;let response = run_wasi_http(- test_programs_artifacts::API_PROXY_STREAMING_COMPONENT,+ test_programs_artifacts::P2_API_PROXY_STREAMING_COMPONENT,request,None,None,@@ -546,7 +546,7 @@ async fn wasi_http_without_port() -> Result<()> {.uri("https://httpbin.org/get");let _response: hyper::Response<_> = run_wasi_http(- test_programs_artifacts::API_PROXY_FORWARD_REQUEST_COMPONENT,+ test_programs_artifacts::P2_API_PROXY_FORWARD_REQUEST_COMPONENT,req.body(body::empty())?,None,None,@@ -569,7 +569,7 @@ async fn wasi_http_no_trap_on_early_drop() -> Result<()> {.method(http::Method::GET);let resp = run_wasi_http(- test_programs_artifacts::API_PROXY_COMPONENT,+ test_programs_artifacts::P2_API_PROXY_COMPONENT,req.body(body::empty())?,None,None,diff --git a/crates/wasi-http/tests/all/p2/async_.rs b/crates/wasi-http/tests/all/p2/async_.rsindex d3dc1793eb..8d94a011df 100644--- a/crates/wasi-http/tests/all/p2/async_.rs+++ b/crates/wasi-http/tests/all/p2/async_.rs@@ -2,7 +2,7 @@ use super::*;use test_programs_artifacts::*;use wasmtime_wasi::p2::bindings::Command;-foreach_http!(assert_test_exists);+foreach_p2_http!(assert_test_exists);async fn run(path: &str, server: &Server) -> Result<()> {let engine = test_programs_artifacts::engine(|config| {@@ -20,88 +20,92 @@ async fn run(path: &str, server: &Server) -> Result<()> {}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn http_outbound_request_get() -> Result<()> {+async fn p2_http_outbound_request_get() -> Result<()> {let server = Server::http1(1)?;- run(HTTP_OUTBOUND_REQUEST_GET_COMPONENT, &server).await+ run(P2_HTTP_OUTBOUND_REQUEST_GET_COMPONENT, &server).await}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn http_outbound_request_timeout() -> Result<()> {+async fn p2_http_outbound_request_timeout() -> Result<()> {let server = Server::http1(1)?;- run(HTTP_OUTBOUND_REQUEST_TIMEOUT_COMPONENT, &server).await+ run(P2_HTTP_OUTBOUND_REQUEST_TIMEOUT_COMPONENT, &server).await}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn http_outbound_request_post() -> Result<()> {+async fn p2_http_outbound_request_post() -> Result<()> {let server = Server::http1(1)?;- run(HTTP_OUTBOUND_REQUEST_POST_COMPONENT, &server).await+ run(P2_HTTP_OUTBOUND_REQUEST_POST_COMPONENT, &server).await}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn http_outbound_request_large_post() -> Result<()> {+async fn p2_http_outbound_request_large_post() -> Result<()> {let server = Server::http1(1)?;- run(HTTP_OUTBOUND_REQUEST_LARGE_POST_COMPONENT, &server).await+ run(P2_HTTP_OUTBOUND_REQUEST_LARGE_POST_COMPONENT, &server).await}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn http_outbound_request_put() -> Result<()> {+async fn p2_http_outbound_request_put() -> Result<()> {let server = Server::http1(1)?;- run(HTTP_OUTBOUND_REQUEST_PUT_COMPONENT, &server).await+ run(P2_HTTP_OUTBOUND_REQUEST_PUT_COMPONENT, &server).await}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn http_outbound_request_invalid_version() -> Result<()> {+async fn p2_http_outbound_request_invalid_version() -> Result<()> {let server = Server::http2(1)?;- run(HTTP_OUTBOUND_REQUEST_INVALID_VERSION_COMPONENT, &server).await+ run(P2_HTTP_OUTBOUND_REQUEST_INVALID_VERSION_COMPONENT, &server).await}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn http_outbound_request_invalid_header() -> Result<()> {+async fn p2_http_outbound_request_invalid_header() -> Result<()> {let server = Server::http2(1)?;- run(HTTP_OUTBOUND_REQUEST_INVALID_HEADER_COMPONENT, &server).await+ run(P2_HTTP_OUTBOUND_REQUEST_INVALID_HEADER_COMPONENT, &server).await}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn http_outbound_request_unknown_method() -> Result<()> {+async fn p2_http_outbound_request_unknown_method() -> Result<()> {let server = Server::http1(1)?;- run(HTTP_OUTBOUND_REQUEST_UNKNOWN_METHOD_COMPONENT, &server).await+ run(P2_HTTP_OUTBOUND_REQUEST_UNKNOWN_METHOD_COMPONENT, &server).await}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn http_outbound_request_unsupported_scheme() -> Result<()> {+async fn p2_http_outbound_request_unsupported_scheme() -> Result<()> {let server = Server::http1(1)?;- run(HTTP_OUTBOUND_REQUEST_UNSUPPORTED_SCHEME_COMPONENT, &server).await+ run(+ P2_HTTP_OUTBOUND_REQUEST_UNSUPPORTED_SCHEME_COMPONENT,+ &server,+ )+ .await}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn http_outbound_request_invalid_port() -> Result<()> {+async fn p2_http_outbound_request_invalid_port() -> Result<()> {let server = Server::http1(1)?;- run(HTTP_OUTBOUND_REQUEST_INVALID_PORT_COMPONENT, &server).await+ run(P2_HTTP_OUTBOUND_REQUEST_INVALID_PORT_COMPONENT, &server).await}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn http_outbound_request_invalid_dnsname() -> Result<()> {+async fn p2_http_outbound_request_invalid_dnsname() -> Result<()> {let server = Server::http1(1)?;- run(HTTP_OUTBOUND_REQUEST_INVALID_DNSNAME_COMPONENT, &server).await+ run(P2_HTTP_OUTBOUND_REQUEST_INVALID_DNSNAME_COMPONENT, &server).await}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn http_outbound_request_response_build() -> Result<()> {+async fn p2_http_outbound_request_response_build() -> Result<()> {let server = Server::http1(1)?;- run(HTTP_OUTBOUND_REQUEST_RESPONSE_BUILD_COMPONENT, &server).await+ run(P2_HTTP_OUTBOUND_REQUEST_RESPONSE_BUILD_COMPONENT, &server).await}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn http_outbound_request_content_length() -> Result<()> {+async fn p2_http_outbound_request_content_length() -> Result<()> {let server = Server::http1(1)?;- run(HTTP_OUTBOUND_REQUEST_CONTENT_LENGTH_COMPONENT, &server).await+ run(P2_HTTP_OUTBOUND_REQUEST_CONTENT_LENGTH_COMPONENT, &server).await}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn http_outbound_request_missing_path_and_query() -> Result<()> {+async fn p2_http_outbound_request_missing_path_and_query() -> Result<()> {let server = Server::http1(1)?;run(- HTTP_OUTBOUND_REQUEST_MISSING_PATH_AND_QUERY_COMPONENT,+ P2_HTTP_OUTBOUND_REQUEST_MISSING_PATH_AND_QUERY_COMPONENT,&server,).awaitdiff --git a/crates/wasi-http/tests/all/p2/sync.rs b/crates/wasi-http/tests/all/p2/sync.rsindex 79b2e5de5d..849cf40564 100644--- a/crates/wasi-http/tests/all/p2/sync.rs+++ b/crates/wasi-http/tests/all/p2/sync.rs@@ -2,7 +2,7 @@ use super::*;use test_programs_artifacts::*;use wasmtime_wasi::p2::bindings::sync::Command;-foreach_http!(assert_test_exists);+foreach_p2_http!(assert_test_exists);fn run(path: &str, server: &Server) -> Result<()> {let engine = test_programs_artifacts::engine(|config| {@@ -19,88 +19,91 @@ fn run(path: &str, server: &Server) -> Result<()> {}#[test_log::test]-fn http_outbound_request_get() -> Result<()> {+fn p2_http_outbound_request_get() -> Result<()> {let server = Server::http1(1)?;- run(HTTP_OUTBOUND_REQUEST_GET_COMPONENT, &server)+ run(P2_HTTP_OUTBOUND_REQUEST_GET_COMPONENT, &server)}#[test_log::test]-fn http_outbound_request_timeout() -> Result<()> {+fn p2_http_outbound_request_timeout() -> Result<()> {let server = Server::http1(1)?;- run(HTTP_OUTBOUND_REQUEST_TIMEOUT_COMPONENT, &server)+ run(P2_HTTP_OUTBOUND_REQUEST_TIMEOUT_COMPONENT, &server)}#[test_log::test]-fn http_outbound_request_post() -> Result<()> {+fn p2_http_outbound_request_post() -> Result<()> {let server = Server::http1(1)?;- run(HTTP_OUTBOUND_REQUEST_POST_COMPONENT, &server)+ run(P2_HTTP_OUTBOUND_REQUEST_POST_COMPONENT, &server)}#[test_log::test]-fn http_outbound_request_large_post() -> Result<()> {+fn p2_http_outbound_request_large_post() -> Result<()> {let server = Server::http1(1)?;- run(HTTP_OUTBOUND_REQUEST_LARGE_POST_COMPONENT, &server)+ run(P2_HTTP_OUTBOUND_REQUEST_LARGE_POST_COMPONENT, &server)}#[test_log::test]-fn http_outbound_request_put() -> Result<()> {+fn p2_http_outbound_request_put() -> Result<()> {let server = Server::http1(1)?;- run(HTTP_OUTBOUND_REQUEST_PUT_COMPONENT, &server)+ run(P2_HTTP_OUTBOUND_REQUEST_PUT_COMPONENT, &server)}#[test_log::test]-fn http_outbound_request_invalid_version() -> Result<()> {+fn p2_http_outbound_request_invalid_version() -> Result<()> {let server = Server::http2(1)?;- run(HTTP_OUTBOUND_REQUEST_INVALID_VERSION_COMPONENT, &server)+ run(P2_HTTP_OUTBOUND_REQUEST_INVALID_VERSION_COMPONENT, &server)}#[test_log::test]-fn http_outbound_request_invalid_header() -> Result<()> {+fn p2_http_outbound_request_invalid_header() -> Result<()> {let server = Server::http2(1)?;- run(HTTP_OUTBOUND_REQUEST_INVALID_HEADER_COMPONENT, &server)+ run(P2_HTTP_OUTBOUND_REQUEST_INVALID_HEADER_COMPONENT, &server)}#[test_log::test]-fn http_outbound_request_unknown_method() -> Result<()> {+fn p2_http_outbound_request_unknown_method() -> Result<()> {let server = Server::http1(1)?;- run(HTTP_OUTBOUND_REQUEST_UNKNOWN_METHOD_COMPONENT, &server)+ run(P2_HTTP_OUTBOUND_REQUEST_UNKNOWN_METHOD_COMPONENT, &server)}#[test_log::test]-fn http_outbound_request_unsupported_scheme() -> Result<()> {+fn p2_http_outbound_request_unsupported_scheme() -> Result<()> {let server = Server::http1(1)?;- run(HTTP_OUTBOUND_REQUEST_UNSUPPORTED_SCHEME_COMPONENT, &server)+ run(+ P2_HTTP_OUTBOUND_REQUEST_UNSUPPORTED_SCHEME_COMPONENT,+ &server,+ )}#[test_log::test]-fn http_outbound_request_invalid_port() -> Result<()> {+fn p2_http_outbound_request_invalid_port() -> Result<()> {let server = Server::http1(1)?;- run(HTTP_OUTBOUND_REQUEST_INVALID_PORT_COMPONENT, &server)+ run(P2_HTTP_OUTBOUND_REQUEST_INVALID_PORT_COMPONENT, &server)}#[test_log::test]-fn http_outbound_request_invalid_dnsname() -> Result<()> {+fn p2_http_outbound_request_invalid_dnsname() -> Result<()> {let server = Server::http1(1)?;- run(HTTP_OUTBOUND_REQUEST_INVALID_DNSNAME_COMPONENT, &server)+ run(P2_HTTP_OUTBOUND_REQUEST_INVALID_DNSNAME_COMPONENT, &server)}#[test_log::test]-fn http_outbound_request_response_build() -> Result<()> {+fn p2_http_outbound_request_response_build() -> Result<()> {let server = Server::http1(1)?;- run(HTTP_OUTBOUND_REQUEST_RESPONSE_BUILD_COMPONENT, &server)+ run(P2_HTTP_OUTBOUND_REQUEST_RESPONSE_BUILD_COMPONENT, &server)}#[test_log::test]-fn http_outbound_request_content_length() -> Result<()> {+fn p2_http_outbound_request_content_length() -> Result<()> {let server = Server::http1(1)?;- run(HTTP_OUTBOUND_REQUEST_CONTENT_LENGTH_COMPONENT, &server)+ run(P2_HTTP_OUTBOUND_REQUEST_CONTENT_LENGTH_COMPONENT, &server)}#[test_log::test]-fn http_outbound_request_missing_path_and_query() -> Result<()> {+fn p2_http_outbound_request_missing_path_and_query() -> Result<()> {let server = Server::http1(1)?;run(- HTTP_OUTBOUND_REQUEST_MISSING_PATH_AND_QUERY_COMPONENT,+ P2_HTTP_OUTBOUND_REQUEST_MISSING_PATH_AND_QUERY_COMPONENT,&server,)}diff --git a/crates/wasi/tests/all/p1.rs b/crates/wasi/tests/all/p1.rsindex ee7af15271..3b95112e43 100644--- a/crates/wasi/tests/all/p1.rs+++ b/crates/wasi/tests/all/p1.rs@@ -27,227 +27,225 @@ async fn run(path: &str, inherit_stdio: bool) -> Result<()> {Ok(())}-foreach_preview1!(assert_test_exists);+foreach_p1!(assert_test_exists);// Below here is mechanical: there should be one test for every binary in// wasi-tests.#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_big_random_buf() {- run(PREVIEW1_BIG_RANDOM_BUF, false).await.unwrap()+async fn p1_big_random_buf() {+ run(P1_BIG_RANDOM_BUF, false).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_clock_time_get() {- run(PREVIEW1_CLOCK_TIME_GET, false).await.unwrap()+async fn p1_clock_time_get() {+ run(P1_CLOCK_TIME_GET, false).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_close_preopen() {- run(PREVIEW1_CLOSE_PREOPEN, false).await.unwrap()+async fn p1_close_preopen() {+ run(P1_CLOSE_PREOPEN, false).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_dangling_fd() {- run(PREVIEW1_DANGLING_FD, false).await.unwrap()+async fn p1_dangling_fd() {+ run(P1_DANGLING_FD, false).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_dangling_symlink() {- run(PREVIEW1_DANGLING_SYMLINK, false).await.unwrap()+async fn p1_dangling_symlink() {+ run(P1_DANGLING_SYMLINK, false).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_directory_seek() {- run(PREVIEW1_DIRECTORY_SEEK, false).await.unwrap()+async fn p1_directory_seek() {+ run(P1_DIRECTORY_SEEK, false).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_dir_fd_op_failures() {- run(PREVIEW1_DIR_FD_OP_FAILURES, false).await.unwrap()+async fn p1_dir_fd_op_failures() {+ run(P1_DIR_FD_OP_FAILURES, false).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_fd_advise() {- run(PREVIEW1_FD_ADVISE, false).await.unwrap()+async fn p1_fd_advise() {+ run(P1_FD_ADVISE, false).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_fd_filestat_get() {- run(PREVIEW1_FD_FILESTAT_GET, false).await.unwrap()+async fn p1_fd_filestat_get() {+ run(P1_FD_FILESTAT_GET, false).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_fd_filestat_set() {- run(PREVIEW1_FD_FILESTAT_SET, false).await.unwrap()+async fn p1_fd_filestat_set() {+ run(P1_FD_FILESTAT_SET, false).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_fd_flags_set() {- run(PREVIEW1_FD_FLAGS_SET, false).await.unwrap()+async fn p1_fd_flags_set() {+ run(P1_FD_FLAGS_SET, false).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_fd_readdir() {- run(PREVIEW1_FD_READDIR, false).await.unwrap()+async fn p1_fd_readdir() {+ run(P1_FD_READDIR, false).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_file_allocate() {- run(PREVIEW1_FILE_ALLOCATE, false).await.unwrap()+async fn p1_file_allocate() {+ run(P1_FILE_ALLOCATE, false).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_file_pread_pwrite() {- run(PREVIEW1_FILE_PREAD_PWRITE, false).await.unwrap()+async fn p1_file_pread_pwrite() {+ run(P1_FILE_PREAD_PWRITE, false).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_file_read_write() {- run(PREVIEW1_FILE_READ_WRITE, false).await.unwrap()+async fn p1_file_read_write() {+ run(P1_FILE_READ_WRITE, false).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_file_seek_tell() {- run(PREVIEW1_FILE_SEEK_TELL, false).await.unwrap()+async fn p1_file_seek_tell() {+ run(P1_FILE_SEEK_TELL, false).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_file_truncation() {- run(PREVIEW1_FILE_TRUNCATION, false).await.unwrap()+async fn p1_file_truncation() {+ run(P1_FILE_TRUNCATION, false).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_file_unbuffered_write() {- run(PREVIEW1_FILE_UNBUFFERED_WRITE, false).await.unwrap()+async fn p1_file_unbuffered_write() {+ run(P1_FILE_UNBUFFERED_WRITE, false).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_interesting_paths() {- run(PREVIEW1_INTERESTING_PATHS, true).await.unwrap()+async fn p1_interesting_paths() {+ run(P1_INTERESTING_PATHS, true).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_regular_file_isatty() {- run(PREVIEW1_REGULAR_FILE_ISATTY, false).await.unwrap()+async fn p1_regular_file_isatty() {+ run(P1_REGULAR_FILE_ISATTY, false).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_nofollow_errors() {- run(PREVIEW1_NOFOLLOW_ERRORS, false).await.unwrap()+async fn p1_nofollow_errors() {+ run(P1_NOFOLLOW_ERRORS, false).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_overwrite_preopen() {- run(PREVIEW1_OVERWRITE_PREOPEN, false).await.unwrap()+async fn p1_overwrite_preopen() {+ run(P1_OVERWRITE_PREOPEN, false).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_path_exists() {- run(PREVIEW1_PATH_EXISTS, false).await.unwrap()+async fn p1_path_exists() {+ run(P1_PATH_EXISTS, false).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_path_filestat() {- run(PREVIEW1_PATH_FILESTAT, false).await.unwrap()+async fn p1_path_filestat() {+ run(P1_PATH_FILESTAT, false).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_path_link() {- run(PREVIEW1_PATH_LINK, false).await.unwrap()+async fn p1_path_link() {+ run(P1_PATH_LINK, false).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_path_open_create_existing() {- run(PREVIEW1_PATH_OPEN_CREATE_EXISTING, false)- .await- .unwrap()+async fn p1_path_open_create_existing() {+ run(P1_PATH_OPEN_CREATE_EXISTING, false).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_path_open_read_write() {- run(PREVIEW1_PATH_OPEN_READ_WRITE, false).await.unwrap()+async fn p1_path_open_read_write() {+ run(P1_PATH_OPEN_READ_WRITE, false).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_path_open_dirfd_not_dir() {- run(PREVIEW1_PATH_OPEN_DIRFD_NOT_DIR, false).await.unwrap()+async fn p1_path_open_dirfd_not_dir() {+ run(P1_PATH_OPEN_DIRFD_NOT_DIR, false).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_path_open_missing() {- run(PREVIEW1_PATH_OPEN_MISSING, false).await.unwrap()+async fn p1_path_open_missing() {+ run(P1_PATH_OPEN_MISSING, false).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_path_open_nonblock() {- run(PREVIEW1_PATH_OPEN_NONBLOCK, false).await.unwrap()+async fn p1_path_open_nonblock() {+ run(P1_PATH_OPEN_NONBLOCK, false).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_path_rename_dir_trailing_slashes() {- run(PREVIEW1_PATH_RENAME_DIR_TRAILING_SLASHES, false)+async fn p1_path_rename_dir_trailing_slashes() {+ run(P1_PATH_RENAME_DIR_TRAILING_SLASHES, false).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_path_rename() {- run(PREVIEW1_PATH_RENAME, false).await.unwrap()+async fn p1_path_rename() {+ run(P1_PATH_RENAME, false).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_path_symlink_trailing_slashes() {- run(PREVIEW1_PATH_SYMLINK_TRAILING_SLASHES, false)- .await- .unwrap()+async fn p1_path_symlink_trailing_slashes() {+ run(P1_PATH_SYMLINK_TRAILING_SLASHES, false).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_poll_oneoff_files() {- run(PREVIEW1_POLL_ONEOFF_FILES, false).await.unwrap()+async fn p1_poll_oneoff_files() {+ run(P1_POLL_ONEOFF_FILES, false).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_poll_oneoff_stdio() {- run(PREVIEW1_POLL_ONEOFF_STDIO, true).await.unwrap()+async fn p1_poll_oneoff_stdio() {+ run(P1_POLL_ONEOFF_STDIO, true).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_readlink() {- run(PREVIEW1_READLINK, false).await.unwrap()+async fn p1_readlink() {+ run(P1_READLINK, false).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_remove_directory() {- run(PREVIEW1_REMOVE_DIRECTORY, false).await.unwrap()+async fn p1_remove_directory() {+ run(P1_REMOVE_DIRECTORY, false).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_remove_nonempty_directory() {- run(PREVIEW1_REMOVE_NONEMPTY_DIRECTORY, false)- .await- .unwrap()+async fn p1_remove_nonempty_directory() {+ run(P1_REMOVE_NONEMPTY_DIRECTORY, false).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_renumber() {- run(PREVIEW1_RENUMBER, false).await.unwrap()+async fn p1_renumber() {+ run(P1_RENUMBER, false).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_sched_yield() {- run(PREVIEW1_SCHED_YIELD, false).await.unwrap()+async fn p1_sched_yield() {+ run(P1_SCHED_YIELD, false).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_stdio() {- run(PREVIEW1_STDIO, false).await.unwrap()+async fn p1_stdio() {+ run(P1_STDIO, false).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_stdio_isatty() {+async fn p1_stdio_isatty() {// If the test process is setup such that stdio is a terminal:if test_programs_artifacts::stdio_is_terminal() {// Inherit stdio, test asserts each is not tty:- run(PREVIEW1_STDIO_ISATTY, true).await.unwrap()+ run(P1_STDIO_ISATTY, true).await.unwrap()}}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_stdio_not_isatty() {+async fn p1_stdio_not_isatty() {// Don't inherit stdio, test asserts each is not tty:- run(PREVIEW1_STDIO_NOT_ISATTY, false).await.unwrap()+ run(P1_STDIO_NOT_ISATTY, false).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_symlink_create() {- run(PREVIEW1_SYMLINK_CREATE, false).await.unwrap()+async fn p1_symlink_create() {+ run(P1_SYMLINK_CREATE, false).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_symlink_filestat() {- run(PREVIEW1_SYMLINK_FILESTAT, false).await.unwrap()+async fn p1_symlink_filestat() {+ run(P1_SYMLINK_FILESTAT, false).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_symlink_loop() {- run(PREVIEW1_SYMLINK_LOOP, false).await.unwrap()+async fn p1_symlink_loop() {+ run(P1_SYMLINK_LOOP, false).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_unlink_file_trailing_slashes() {- run(PREVIEW1_UNLINK_FILE_TRAILING_SLASHES, false)- .await- .unwrap()+async fn p1_unlink_file_trailing_slashes() {+ run(P1_UNLINK_FILE_TRAILING_SLASHES, false).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_path_open_preopen() {- run(PREVIEW1_PATH_OPEN_PREOPEN, false).await.unwrap()+async fn p1_path_open_preopen() {+ run(P1_PATH_OPEN_PREOPEN, false).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_unicode_output() {- run(PREVIEW1_UNICODE_OUTPUT, true).await.unwrap()+async fn p1_unicode_output() {+ run(P1_UNICODE_OUTPUT, true).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_file_write() {- run(PREVIEW1_FILE_WRITE, true).await.unwrap()+async fn p1_file_write() {+ run(P1_FILE_WRITE, true).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_path_open_lots() {- run(PREVIEW1_PATH_OPEN_LOTS, true).await.unwrap()+async fn p1_path_open_lots() {+ run(P1_PATH_OPEN_LOTS, true).await.unwrap()}++#[expect(+ dead_code,+ reason = "tested in the wasi-cli crate, satisfying foreach_api! macro"+)]+fn p1_cli_much_stdout() {}diff --git a/crates/wasi/tests/all/p2/api.rs b/crates/wasi/tests/all/p2/api.rsindex 306b395ef7..659ededcfa 100644--- a/crates/wasi/tests/all/p2/api.rs+++ b/crates/wasi/tests/all/p2/api.rs@@ -27,7 +27,7 @@ impl WasiView for CommandCtx {use test_programs_artifacts::*;-foreach_api!(assert_test_exists);+foreach_p2_api!(assert_test_exists);async fn instantiate(path: &str, ctx: CommandCtx) -> Result<(Store<CommandCtx>, Command)> {let engine = test_programs_artifacts::engine(|config| {@@ -43,7 +43,7 @@ async fn instantiate(path: &str, ctx: CommandCtx) -> Result<(Store<CommandCtx>,}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn api_time() -> Result<()> {+async fn p2_api_time() -> Result<()> {struct FakeWallClock;impl HostWallClock for FakeWallClock {@@ -79,7 +79,8 @@ async fn api_time() -> Result<()> {.wall_clock(FakeWallClock).build();- let (mut store, command) = instantiate(API_TIME_COMPONENT, CommandCtx { table, wasi }).await?;+ let (mut store, command) =+ instantiate(P2_API_TIME_COMPONENT, CommandCtx { table, wasi }).await?;command.wasi_cli_run()@@ -89,7 +90,7 @@ async fn api_time() -> Result<()> {}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn api_read_only() -> Result<()> {+async fn p2_api_read_only() -> Result<()> {let dir = tempfile::tempdir()?;std::fs::File::create(dir.path().join("bar.txt"))?.write_all(b"And stood awhile in thought")?;@@ -101,7 +102,7 @@ async fn api_read_only() -> Result<()> {.build();let (mut store, command) =- instantiate(API_READ_ONLY_COMPONENT, CommandCtx { table, wasi }).await?;+ instantiate(P2_API_READ_ONLY_COMPONENT, CommandCtx { table, wasi }).await?;command.wasi_cli_run()@@ -114,19 +115,19 @@ async fn api_read_only() -> Result<()> {dead_code,reason = "tested in the wasi-http crate, satisfying foreach_api! macro")]-fn api_proxy() {}+fn p2_api_proxy() {}#[expect(dead_code,reason = "tested in the wasi-http crate, satisfying foreach_api! macro")]-fn api_proxy_streaming() {}+fn p2_api_proxy_streaming() {}#[expect(dead_code,reason = "tested in the wasi-http crate, satisfying foreach_api! macro")]-fn api_proxy_forward_request() {}+fn p2_api_proxy_forward_request() {}wasmtime::component::bindgen!({path: "src/p2/wit",@@ -141,7 +142,7 @@ wasmtime::component::bindgen!({});#[test_log::test(tokio::test)]-async fn api_reactor() -> Result<()> {+async fn p2_api_reactor() -> Result<()> {let table = ResourceTable::new();let wasi = WasiCtxBuilder::new().env("GOOD_DOG", "gussie").build();let engine = test_programs_artifacts::engine(|config| {@@ -151,7 +152,7 @@ async fn api_reactor() -> Result<()> {add_to_linker_async(&mut linker)?;let mut store = Store::new(&engine, CommandCtx { table, wasi });- let component = Component::from_file(&engine, API_REACTOR_COMPONENT)?;+ let component = Component::from_file(&engine, P2_API_REACTOR_COMPONENT)?;let reactor = TestReactor::instantiate_async(&mut store, &component, &linker).await?;// Show that integration with the WASI context is working - the guest willdiff --git a/crates/wasi/tests/all/p2/async_.rs b/crates/wasi/tests/all/p2/async_.rsindex d5ecc4c39e..0d9680b8ce 100644--- a/crates/wasi/tests/all/p2/async_.rs+++ b/crates/wasi/tests/all/p2/async_.rs@@ -33,345 +33,305 @@ async fn run(path: &str, inherit_stdio: bool) -> Result<()> {.map_err(|()| anyhow::anyhow!("run returned a failure"))}-foreach_preview1!(assert_test_exists);-foreach_preview2!(assert_test_exists);+foreach_p1!(assert_test_exists);+foreach_p2!(assert_test_exists);// Below here is mechanical: there should be one test for every binary in// wasi-tests.#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_big_random_buf() {- run(PREVIEW1_BIG_RANDOM_BUF_COMPONENT, false).await.unwrap()+async fn p1_big_random_buf() {+ run(P1_BIG_RANDOM_BUF_COMPONENT, false).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_clock_time_get() {- run(PREVIEW1_CLOCK_TIME_GET_COMPONENT, false).await.unwrap()+async fn p1_clock_time_get() {+ run(P1_CLOCK_TIME_GET_COMPONENT, false).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_close_preopen() {- run(PREVIEW1_CLOSE_PREOPEN_COMPONENT, false).await.unwrap()+async fn p1_close_preopen() {+ run(P1_CLOSE_PREOPEN_COMPONENT, false).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_dangling_fd() {- run(PREVIEW1_DANGLING_FD_COMPONENT, false).await.unwrap()+async fn p1_dangling_fd() {+ run(P1_DANGLING_FD_COMPONENT, false).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_dangling_symlink() {- run(PREVIEW1_DANGLING_SYMLINK_COMPONENT, false)- .await- .unwrap()+async fn p1_dangling_symlink() {+ run(P1_DANGLING_SYMLINK_COMPONENT, false).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_directory_seek() {- run(PREVIEW1_DIRECTORY_SEEK_COMPONENT, false).await.unwrap()+async fn p1_directory_seek() {+ run(P1_DIRECTORY_SEEK_COMPONENT, false).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_dir_fd_op_failures() {- run(PREVIEW1_DIR_FD_OP_FAILURES_COMPONENT, false)- .await- .unwrap()+async fn p1_dir_fd_op_failures() {+ run(P1_DIR_FD_OP_FAILURES_COMPONENT, false).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_fd_advise() {- run(PREVIEW1_FD_ADVISE_COMPONENT, false).await.unwrap()+async fn p1_fd_advise() {+ run(P1_FD_ADVISE_COMPONENT, false).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_fd_filestat_get() {- run(PREVIEW1_FD_FILESTAT_GET_COMPONENT, false)- .await- .unwrap()+async fn p1_fd_filestat_get() {+ run(P1_FD_FILESTAT_GET_COMPONENT, false).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_fd_filestat_set() {- run(PREVIEW1_FD_FILESTAT_SET_COMPONENT, false)- .await- .unwrap()+async fn p1_fd_filestat_set() {+ run(P1_FD_FILESTAT_SET_COMPONENT, false).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_fd_flags_set() {- run(PREVIEW1_FD_FLAGS_SET_COMPONENT, false).await.unwrap()+async fn p1_fd_flags_set() {+ run(P1_FD_FLAGS_SET_COMPONENT, false).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_fd_readdir() {- run(PREVIEW1_FD_READDIR_COMPONENT, false).await.unwrap()+async fn p1_fd_readdir() {+ run(P1_FD_READDIR_COMPONENT, false).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_file_allocate() {- run(PREVIEW1_FILE_ALLOCATE_COMPONENT, false).await.unwrap()+async fn p1_file_allocate() {+ run(P1_FILE_ALLOCATE_COMPONENT, false).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_file_pread_pwrite() {- run(PREVIEW1_FILE_PREAD_PWRITE_COMPONENT, false)- .await- .unwrap()+async fn p1_file_pread_pwrite() {+ run(P1_FILE_PREAD_PWRITE_COMPONENT, false).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_file_read_write() {- run(PREVIEW1_FILE_READ_WRITE_COMPONENT, false)- .await- .unwrap()+async fn p1_file_read_write() {+ run(P1_FILE_READ_WRITE_COMPONENT, false).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_file_seek_tell() {- run(PREVIEW1_FILE_SEEK_TELL_COMPONENT, false).await.unwrap()+async fn p1_file_seek_tell() {+ run(P1_FILE_SEEK_TELL_COMPONENT, false).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_file_truncation() {- run(PREVIEW1_FILE_TRUNCATION_COMPONENT, false)- .await- .unwrap()+async fn p1_file_truncation() {+ run(P1_FILE_TRUNCATION_COMPONENT, false).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_file_unbuffered_write() {- run(PREVIEW1_FILE_UNBUFFERED_WRITE_COMPONENT, false)+async fn p1_file_unbuffered_write() {+ run(P1_FILE_UNBUFFERED_WRITE_COMPONENT, false).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_interesting_paths() {- run(PREVIEW1_INTERESTING_PATHS_COMPONENT, true)- .await- .unwrap()+async fn p1_interesting_paths() {+ run(P1_INTERESTING_PATHS_COMPONENT, true).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_regular_file_isatty() {- run(PREVIEW1_REGULAR_FILE_ISATTY_COMPONENT, false)- .await- .unwrap()+async fn p1_regular_file_isatty() {+ run(P1_REGULAR_FILE_ISATTY_COMPONENT, false).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_nofollow_errors() {- run(PREVIEW1_NOFOLLOW_ERRORS_COMPONENT, false)- .await- .unwrap()+async fn p1_nofollow_errors() {+ run(P1_NOFOLLOW_ERRORS_COMPONENT, false).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_overwrite_preopen() {- run(PREVIEW1_OVERWRITE_PREOPEN_COMPONENT, false)- .await- .unwrap()+async fn p1_overwrite_preopen() {+ run(P1_OVERWRITE_PREOPEN_COMPONENT, false).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_path_exists() {- run(PREVIEW1_PATH_EXISTS_COMPONENT, false).await.unwrap()+async fn p1_path_exists() {+ run(P1_PATH_EXISTS_COMPONENT, false).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_path_filestat() {- run(PREVIEW1_PATH_FILESTAT_COMPONENT, false).await.unwrap()+async fn p1_path_filestat() {+ run(P1_PATH_FILESTAT_COMPONENT, false).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_path_link() {- run(PREVIEW1_PATH_LINK_COMPONENT, false).await.unwrap()+async fn p1_path_link() {+ run(P1_PATH_LINK_COMPONENT, false).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_path_open_create_existing() {- run(PREVIEW1_PATH_OPEN_CREATE_EXISTING_COMPONENT, false)+async fn p1_path_open_create_existing() {+ run(P1_PATH_OPEN_CREATE_EXISTING_COMPONENT, false).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_path_open_read_write() {- run(PREVIEW1_PATH_OPEN_READ_WRITE_COMPONENT, false)- .await- .unwrap()+async fn p1_path_open_read_write() {+ run(P1_PATH_OPEN_READ_WRITE_COMPONENT, false).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_path_open_dirfd_not_dir() {- run(PREVIEW1_PATH_OPEN_DIRFD_NOT_DIR_COMPONENT, false)+async fn p1_path_open_dirfd_not_dir() {+ run(P1_PATH_OPEN_DIRFD_NOT_DIR_COMPONENT, false).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_path_open_missing() {- run(PREVIEW1_PATH_OPEN_MISSING_COMPONENT, false)- .await- .unwrap()+async fn p1_path_open_missing() {+ run(P1_PATH_OPEN_MISSING_COMPONENT, false).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_path_open_nonblock() {- run(PREVIEW1_PATH_OPEN_NONBLOCK_COMPONENT, false)- .await- .unwrap()+async fn p1_path_open_nonblock() {+ run(P1_PATH_OPEN_NONBLOCK_COMPONENT, false).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_path_rename_dir_trailing_slashes() {- run(PREVIEW1_PATH_RENAME_DIR_TRAILING_SLASHES_COMPONENT, false)+async fn p1_path_rename_dir_trailing_slashes() {+ run(P1_PATH_RENAME_DIR_TRAILING_SLASHES_COMPONENT, false).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_path_rename() {- run(PREVIEW1_PATH_RENAME_COMPONENT, false).await.unwrap()+async fn p1_path_rename() {+ run(P1_PATH_RENAME_COMPONENT, false).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_path_symlink_trailing_slashes() {- run(PREVIEW1_PATH_SYMLINK_TRAILING_SLASHES_COMPONENT, false)+async fn p1_path_symlink_trailing_slashes() {+ run(P1_PATH_SYMLINK_TRAILING_SLASHES_COMPONENT, false).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_poll_oneoff_files() {- run(PREVIEW1_POLL_ONEOFF_FILES_COMPONENT, false)- .await- .unwrap()+async fn p1_poll_oneoff_files() {+ run(P1_POLL_ONEOFF_FILES_COMPONENT, false).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_poll_oneoff_stdio() {- run(PREVIEW1_POLL_ONEOFF_STDIO_COMPONENT, true)- .await- .unwrap()+async fn p1_poll_oneoff_stdio() {+ run(P1_POLL_ONEOFF_STDIO_COMPONENT, true).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_readlink() {- run(PREVIEW1_READLINK_COMPONENT, false).await.unwrap()+async fn p1_readlink() {+ run(P1_READLINK_COMPONENT, false).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_remove_directory() {- run(PREVIEW1_REMOVE_DIRECTORY_COMPONENT, false)- .await- .unwrap()+async fn p1_remove_directory() {+ run(P1_REMOVE_DIRECTORY_COMPONENT, false).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_remove_nonempty_directory() {- run(PREVIEW1_REMOVE_NONEMPTY_DIRECTORY_COMPONENT, false)+async fn p1_remove_nonempty_directory() {+ run(P1_REMOVE_NONEMPTY_DIRECTORY_COMPONENT, false).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_renumber() {- run(PREVIEW1_RENUMBER_COMPONENT, false).await.unwrap()+async fn p1_renumber() {+ run(P1_RENUMBER_COMPONENT, false).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_sched_yield() {- run(PREVIEW1_SCHED_YIELD_COMPONENT, false).await.unwrap()+async fn p1_sched_yield() {+ run(P1_SCHED_YIELD_COMPONENT, false).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_stdio() {- run(PREVIEW1_STDIO_COMPONENT, false).await.unwrap()+async fn p1_stdio() {+ run(P1_STDIO_COMPONENT, false).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_stdio_isatty() {+async fn p1_stdio_isatty() {// If the test process is setup such that stdio is a terminal:if test_programs_artifacts::stdio_is_terminal() {// Inherit stdio, test asserts each is not tty:- run(PREVIEW1_STDIO_ISATTY_COMPONENT, true).await.unwrap()+ run(P1_STDIO_ISATTY_COMPONENT, true).await.unwrap()}}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_stdio_not_isatty() {+async fn p1_stdio_not_isatty() {// Don't inherit stdio, test asserts each is not tty:- run(PREVIEW1_STDIO_NOT_ISATTY_COMPONENT, false)- .await- .unwrap()+ run(P1_STDIO_NOT_ISATTY_COMPONENT, false).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_symlink_create() {- run(PREVIEW1_SYMLINK_CREATE_COMPONENT, false).await.unwrap()+async fn p1_symlink_create() {+ run(P1_SYMLINK_CREATE_COMPONENT, false).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_symlink_filestat() {- run(PREVIEW1_SYMLINK_FILESTAT_COMPONENT, false)- .await- .unwrap()+async fn p1_symlink_filestat() {+ run(P1_SYMLINK_FILESTAT_COMPONENT, false).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_symlink_loop() {- run(PREVIEW1_SYMLINK_LOOP_COMPONENT, false).await.unwrap()+async fn p1_symlink_loop() {+ run(P1_SYMLINK_LOOP_COMPONENT, false).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_unlink_file_trailing_slashes() {- run(PREVIEW1_UNLINK_FILE_TRAILING_SLASHES_COMPONENT, false)+async fn p1_unlink_file_trailing_slashes() {+ run(P1_UNLINK_FILE_TRAILING_SLASHES_COMPONENT, false).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_path_open_preopen() {- run(PREVIEW1_PATH_OPEN_PREOPEN_COMPONENT, false)- .await- .unwrap()+async fn p1_path_open_preopen() {+ run(P1_PATH_OPEN_PREOPEN_COMPONENT, false).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_unicode_output() {- run(PREVIEW1_UNICODE_OUTPUT_COMPONENT, true).await.unwrap()+async fn p1_unicode_output() {+ run(P1_UNICODE_OUTPUT_COMPONENT, true).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_file_write() {- run(PREVIEW1_FILE_WRITE_COMPONENT, false).await.unwrap()+async fn p1_file_write() {+ run(P1_FILE_WRITE_COMPONENT, false).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview1_path_open_lots() {- run(PREVIEW1_PATH_OPEN_LOTS_COMPONENT, false).await.unwrap()+async fn p1_path_open_lots() {+ run(P1_PATH_OPEN_LOTS_COMPONENT, false).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview2_sleep() {- run(PREVIEW2_SLEEP_COMPONENT, false).await.unwrap()+async fn p2_sleep() {+ run(P2_SLEEP_COMPONENT, false).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview2_random() {- run(PREVIEW2_RANDOM_COMPONENT, false).await.unwrap()+async fn p2_random() {+ run(P2_RANDOM_COMPONENT, false).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview2_ip_name_lookup() {- run(PREVIEW2_IP_NAME_LOOKUP_COMPONENT, false).await.unwrap()+async fn p2_ip_name_lookup() {+ run(P2_IP_NAME_LOOKUP_COMPONENT, false).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview2_tcp_sockopts() {- run(PREVIEW2_TCP_SOCKOPTS_COMPONENT, false).await.unwrap()+async fn p2_tcp_sockopts() {+ run(P2_TCP_SOCKOPTS_COMPONENT, false).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview2_tcp_sample_application() {- run(PREVIEW2_TCP_SAMPLE_APPLICATION_COMPONENT, false)+async fn p2_tcp_sample_application() {+ run(P2_TCP_SAMPLE_APPLICATION_COMPONENT, false).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview2_tcp_states() {- run(PREVIEW2_TCP_STATES_COMPONENT, false).await.unwrap()+async fn p2_tcp_states() {+ run(P2_TCP_STATES_COMPONENT, false).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview2_tcp_streams() {- run(PREVIEW2_TCP_STREAMS_COMPONENT, false).await.unwrap()+async fn p2_tcp_streams() {+ run(P2_TCP_STREAMS_COMPONENT, false).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview2_tcp_bind() {- run(PREVIEW2_TCP_BIND_COMPONENT, false).await.unwrap()+async fn p2_tcp_bind() {+ run(P2_TCP_BIND_COMPONENT, false).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview2_tcp_connect() {- run(PREVIEW2_TCP_CONNECT_COMPONENT, false).await.unwrap()+async fn p2_tcp_connect() {+ run(P2_TCP_CONNECT_COMPONENT, false).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview2_udp_sockopts() {- run(PREVIEW2_UDP_SOCKOPTS_COMPONENT, false).await.unwrap()+async fn p2_udp_sockopts() {+ run(P2_UDP_SOCKOPTS_COMPONENT, false).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview2_udp_sample_application() {- run(PREVIEW2_UDP_SAMPLE_APPLICATION_COMPONENT, false)+async fn p2_udp_sample_application() {+ run(P2_UDP_SAMPLE_APPLICATION_COMPONENT, false).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview2_udp_states() {- run(PREVIEW2_UDP_STATES_COMPONENT, false).await.unwrap()+async fn p2_udp_states() {+ run(P2_UDP_STATES_COMPONENT, false).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview2_udp_bind() {- run(PREVIEW2_UDP_BIND_COMPONENT, false).await.unwrap()+async fn p2_udp_bind() {+ run(P2_UDP_BIND_COMPONENT, false).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview2_udp_connect() {- run(PREVIEW2_UDP_CONNECT_COMPONENT, false).await.unwrap()+async fn p2_udp_connect() {+ run(P2_UDP_CONNECT_COMPONENT, false).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview2_stream_pollable_correct() {- run(PREVIEW2_STREAM_POLLABLE_CORRECT_COMPONENT, false)+async fn p2_stream_pollable_correct() {+ run(P2_STREAM_POLLABLE_CORRECT_COMPONENT, false).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview2_stream_pollable_traps() {- let e = run(PREVIEW2_STREAM_POLLABLE_TRAPS_COMPONENT, false)+async fn p2_stream_pollable_traps() {+ let e = run(P2_STREAM_POLLABLE_TRAPS_COMPONENT, false).await.unwrap_err();assert_eq!(@@ -380,28 +340,27 @@ async fn preview2_stream_pollable_traps() {)}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview2_pollable_correct() {- run(PREVIEW2_POLLABLE_CORRECT_COMPONENT, false)- .await- .unwrap()+async fn p2_pollable_correct() {+ run(P2_POLLABLE_CORRECT_COMPONENT, false).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview2_pollable_traps() {- let e = run(PREVIEW2_POLLABLE_TRAPS_COMPONENT, false)- .await- .unwrap_err();+async fn p2_pollable_traps() {+ let e = run(P2_POLLABLE_TRAPS_COMPONENT, false).await.unwrap_err();assert_eq!(format!("{}", e.source().expect("trap source")),"empty poll list")}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview2_adapter_badfd() {- run(PREVIEW2_ADAPTER_BADFD_COMPONENT, false).await.unwrap()+async fn p2_adapter_badfd() {+ run(P2_ADAPTER_BADFD_COMPONENT, false).await.unwrap()}#[test_log::test(tokio::test(flavor = "multi_thread"))]-async fn preview2_file_read_write() {- run(PREVIEW2_FILE_READ_WRITE_COMPONENT, false)- .await- .unwrap()+async fn p2_file_read_write() {+ run(P2_FILE_READ_WRITE_COMPONENT, false).await.unwrap()}+#[expect(+ dead_code,+ reason = "tested in the wasi-cli crate, satisfying foreach_api! macro"+)]+fn p1_cli_much_stdout() {}diff --git a/crates/wasi/tests/all/p2/sync.rs b/crates/wasi/tests/all/p2/sync.rsindex ecce347672..c7f0986ba7 100644--- a/crates/wasi/tests/all/p2/sync.rs+++ b/crates/wasi/tests/all/p2/sync.rs@@ -35,307 +35,312 @@ fn run(path: &str, inherit_stdio: bool) -> Result<()> {Ok(())}-foreach_preview1!(assert_test_exists);-foreach_preview2!(assert_test_exists);+foreach_p1!(assert_test_exists);+foreach_p2!(assert_test_exists);// Below here is mechanical: there should be one test for every binary in// wasi-tests.#[test_log::test]-fn preview1_big_random_buf() {- run(PREVIEW1_BIG_RANDOM_BUF_COMPONENT, false).unwrap()+fn p1_big_random_buf() {+ run(P1_BIG_RANDOM_BUF_COMPONENT, false).unwrap()}#[test_log::test]-fn preview1_clock_time_get() {- run(PREVIEW1_CLOCK_TIME_GET_COMPONENT, false).unwrap()+fn p1_clock_time_get() {+ run(P1_CLOCK_TIME_GET_COMPONENT, false).unwrap()}#[test_log::test]-fn preview1_close_preopen() {- run(PREVIEW1_CLOSE_PREOPEN_COMPONENT, false).unwrap()+fn p1_close_preopen() {+ run(P1_CLOSE_PREOPEN_COMPONENT, false).unwrap()}#[test_log::test]-fn preview1_dangling_fd() {- run(PREVIEW1_DANGLING_FD_COMPONENT, false).unwrap()+fn p1_dangling_fd() {+ run(P1_DANGLING_FD_COMPONENT, false).unwrap()}#[test_log::test]-fn preview1_dangling_symlink() {- run(PREVIEW1_DANGLING_SYMLINK_COMPONENT, false).unwrap()+fn p1_dangling_symlink() {+ run(P1_DANGLING_SYMLINK_COMPONENT, false).unwrap()}#[test_log::test]-fn preview1_directory_seek() {- run(PREVIEW1_DIRECTORY_SEEK_COMPONENT, false).unwrap()+fn p1_directory_seek() {+ run(P1_DIRECTORY_SEEK_COMPONENT, false).unwrap()}#[test_log::test]-fn preview1_dir_fd_op_failures() {- run(PREVIEW1_DIR_FD_OP_FAILURES_COMPONENT, false).unwrap()+fn p1_dir_fd_op_failures() {+ run(P1_DIR_FD_OP_FAILURES_COMPONENT, false).unwrap()}#[test_log::test]-fn preview1_fd_advise() {- run(PREVIEW1_FD_ADVISE_COMPONENT, false).unwrap()+fn p1_fd_advise() {+ run(P1_FD_ADVISE_COMPONENT, false).unwrap()}#[test_log::test]-fn preview1_fd_filestat_get() {- run(PREVIEW1_FD_FILESTAT_GET_COMPONENT, false).unwrap()+fn p1_fd_filestat_get() {+ run(P1_FD_FILESTAT_GET_COMPONENT, false).unwrap()}#[test_log::test]-fn preview1_fd_filestat_set() {- run(PREVIEW1_FD_FILESTAT_SET_COMPONENT, false).unwrap()+fn p1_fd_filestat_set() {+ run(P1_FD_FILESTAT_SET_COMPONENT, false).unwrap()}#[test_log::test]-fn preview1_fd_flags_set() {- run(PREVIEW1_FD_FLAGS_SET_COMPONENT, false).unwrap()+fn p1_fd_flags_set() {+ run(P1_FD_FLAGS_SET_COMPONENT, false).unwrap()}#[test_log::test]-fn preview1_fd_readdir() {- run(PREVIEW1_FD_READDIR_COMPONENT, false).unwrap()+fn p1_fd_readdir() {+ run(P1_FD_READDIR_COMPONENT, false).unwrap()}#[test_log::test]-fn preview1_file_allocate() {- run(PREVIEW1_FILE_ALLOCATE_COMPONENT, false).unwrap()+fn p1_file_allocate() {+ run(P1_FILE_ALLOCATE_COMPONENT, false).unwrap()}#[test_log::test]-fn preview1_file_pread_pwrite() {- run(PREVIEW1_FILE_PREAD_PWRITE_COMPONENT, false).unwrap()+fn p1_file_pread_pwrite() {+ run(P1_FILE_PREAD_PWRITE_COMPONENT, false).unwrap()}#[test_log::test]-fn preview1_file_read_write() {- run(PREVIEW1_FILE_READ_WRITE_COMPONENT, false).unwrap()+fn p1_file_read_write() {+ run(P1_FILE_READ_WRITE_COMPONENT, false).unwrap()}#[test_log::test]-fn preview1_file_seek_tell() {- run(PREVIEW1_FILE_SEEK_TELL_COMPONENT, false).unwrap()+fn p1_file_seek_tell() {+ run(P1_FILE_SEEK_TELL_COMPONENT, false).unwrap()}#[test_log::test]-fn preview1_file_truncation() {- run(PREVIEW1_FILE_TRUNCATION_COMPONENT, false).unwrap()+fn p1_file_truncation() {+ run(P1_FILE_TRUNCATION_COMPONENT, false).unwrap()}#[test_log::test]-fn preview1_file_unbuffered_write() {- run(PREVIEW1_FILE_UNBUFFERED_WRITE_COMPONENT, false).unwrap()+fn p1_file_unbuffered_write() {+ run(P1_FILE_UNBUFFERED_WRITE_COMPONENT, false).unwrap()}#[test_log::test]-fn preview1_interesting_paths() {- run(PREVIEW1_INTERESTING_PATHS_COMPONENT, false).unwrap()+fn p1_interesting_paths() {+ run(P1_INTERESTING_PATHS_COMPONENT, false).unwrap()}#[test_log::test]-fn preview1_regular_file_isatty() {- run(PREVIEW1_REGULAR_FILE_ISATTY_COMPONENT, false).unwrap()+fn p1_regular_file_isatty() {+ run(P1_REGULAR_FILE_ISATTY_COMPONENT, false).unwrap()}#[test_log::test]-fn preview1_nofollow_errors() {- run(PREVIEW1_NOFOLLOW_ERRORS_COMPONENT, false).unwrap()+fn p1_nofollow_errors() {+ run(P1_NOFOLLOW_ERRORS_COMPONENT, false).unwrap()}#[test_log::test]-fn preview1_overwrite_preopen() {- run(PREVIEW1_OVERWRITE_PREOPEN_COMPONENT, false).unwrap()+fn p1_overwrite_preopen() {+ run(P1_OVERWRITE_PREOPEN_COMPONENT, false).unwrap()}#[test_log::test]-fn preview1_path_exists() {- run(PREVIEW1_PATH_EXISTS_COMPONENT, false).unwrap()+fn p1_path_exists() {+ run(P1_PATH_EXISTS_COMPONENT, false).unwrap()}#[test_log::test]-fn preview1_path_filestat() {- run(PREVIEW1_PATH_FILESTAT_COMPONENT, false).unwrap()+fn p1_path_filestat() {+ run(P1_PATH_FILESTAT_COMPONENT, false).unwrap()}#[test_log::test]-fn preview1_path_link() {- run(PREVIEW1_PATH_LINK_COMPONENT, false).unwrap()+fn p1_path_link() {+ run(P1_PATH_LINK_COMPONENT, false).unwrap()}#[test_log::test]-fn preview1_path_open_create_existing() {- run(PREVIEW1_PATH_OPEN_CREATE_EXISTING_COMPONENT, false).unwrap()+fn p1_path_open_create_existing() {+ run(P1_PATH_OPEN_CREATE_EXISTING_COMPONENT, false).unwrap()}#[test_log::test]-fn preview1_path_open_read_write() {- run(PREVIEW1_PATH_OPEN_READ_WRITE_COMPONENT, false).unwrap()+fn p1_path_open_read_write() {+ run(P1_PATH_OPEN_READ_WRITE_COMPONENT, false).unwrap()}#[test_log::test]-fn preview1_path_open_dirfd_not_dir() {- run(PREVIEW1_PATH_OPEN_DIRFD_NOT_DIR_COMPONENT, false).unwrap()+fn p1_path_open_dirfd_not_dir() {+ run(P1_PATH_OPEN_DIRFD_NOT_DIR_COMPONENT, false).unwrap()}#[test_log::test]-fn preview1_path_open_missing() {- run(PREVIEW1_PATH_OPEN_MISSING_COMPONENT, false).unwrap()+fn p1_path_open_missing() {+ run(P1_PATH_OPEN_MISSING_COMPONENT, false).unwrap()}#[test_log::test]-fn preview1_path_open_nonblock() {- run(PREVIEW1_PATH_OPEN_NONBLOCK_COMPONENT, false).unwrap()+fn p1_path_open_nonblock() {+ run(P1_PATH_OPEN_NONBLOCK_COMPONENT, false).unwrap()}#[test_log::test]-fn preview1_path_rename_dir_trailing_slashes() {- run(PREVIEW1_PATH_RENAME_DIR_TRAILING_SLASHES_COMPONENT, false).unwrap()+fn p1_path_rename_dir_trailing_slashes() {+ run(P1_PATH_RENAME_DIR_TRAILING_SLASHES_COMPONENT, false).unwrap()}#[test_log::test]-fn preview1_path_rename() {- run(PREVIEW1_PATH_RENAME_COMPONENT, false).unwrap()+fn p1_path_rename() {+ run(P1_PATH_RENAME_COMPONENT, false).unwrap()}#[test_log::test]-fn preview1_path_symlink_trailing_slashes() {- run(PREVIEW1_PATH_SYMLINK_TRAILING_SLASHES_COMPONENT, false).unwrap()+fn p1_path_symlink_trailing_slashes() {+ run(P1_PATH_SYMLINK_TRAILING_SLASHES_COMPONENT, false).unwrap()}#[test_log::test]-fn preview1_poll_oneoff_files() {- run(PREVIEW1_POLL_ONEOFF_FILES_COMPONENT, false).unwrap()+fn p1_poll_oneoff_files() {+ run(P1_POLL_ONEOFF_FILES_COMPONENT, false).unwrap()}#[test_log::test]-fn preview1_poll_oneoff_stdio() {- run(PREVIEW1_POLL_ONEOFF_STDIO_COMPONENT, true).unwrap()+fn p1_poll_oneoff_stdio() {+ run(P1_POLL_ONEOFF_STDIO_COMPONENT, true).unwrap()}#[test_log::test]-fn preview1_readlink() {- run(PREVIEW1_READLINK_COMPONENT, false).unwrap()+fn p1_readlink() {+ run(P1_READLINK_COMPONENT, false).unwrap()}#[test_log::test]-fn preview1_remove_directory() {- run(PREVIEW1_REMOVE_DIRECTORY_COMPONENT, false).unwrap()+fn p1_remove_directory() {+ run(P1_REMOVE_DIRECTORY_COMPONENT, false).unwrap()}#[test_log::test]-fn preview1_remove_nonempty_directory() {- run(PREVIEW1_REMOVE_NONEMPTY_DIRECTORY_COMPONENT, false).unwrap()+fn p1_remove_nonempty_directory() {+ run(P1_REMOVE_NONEMPTY_DIRECTORY_COMPONENT, false).unwrap()}#[test_log::test]-fn preview1_renumber() {- run(PREVIEW1_RENUMBER_COMPONENT, false).unwrap()+fn p1_renumber() {+ run(P1_RENUMBER_COMPONENT, false).unwrap()}#[test_log::test]-fn preview1_sched_yield() {- run(PREVIEW1_SCHED_YIELD_COMPONENT, false).unwrap()+fn p1_sched_yield() {+ run(P1_SCHED_YIELD_COMPONENT, false).unwrap()}#[test_log::test]-fn preview1_stdio() {- run(PREVIEW1_STDIO_COMPONENT, false).unwrap()+fn p1_stdio() {+ run(P1_STDIO_COMPONENT, false).unwrap()}#[test_log::test]-fn preview1_stdio_isatty() {+fn p1_stdio_isatty() {// If the test process is setup such that stdio is a terminal:if test_programs_artifacts::stdio_is_terminal() {// Inherit stdio, test asserts each is not tty:- run(PREVIEW1_STDIO_ISATTY_COMPONENT, true).unwrap()+ run(P1_STDIO_ISATTY_COMPONENT, true).unwrap()}}#[test_log::test]-fn preview1_stdio_not_isatty() {+fn p1_stdio_not_isatty() {// Don't inherit stdio, test asserts each is not tty:- run(PREVIEW1_STDIO_NOT_ISATTY_COMPONENT, false).unwrap()+ run(P1_STDIO_NOT_ISATTY_COMPONENT, false).unwrap()}#[test_log::test]-fn preview1_symlink_create() {- run(PREVIEW1_SYMLINK_CREATE_COMPONENT, false).unwrap()+fn p1_symlink_create() {+ run(P1_SYMLINK_CREATE_COMPONENT, false).unwrap()}#[test_log::test]-fn preview1_symlink_filestat() {- run(PREVIEW1_SYMLINK_FILESTAT_COMPONENT, false).unwrap()+fn p1_symlink_filestat() {+ run(P1_SYMLINK_FILESTAT_COMPONENT, false).unwrap()}#[test_log::test]-fn preview1_symlink_loop() {- run(PREVIEW1_SYMLINK_LOOP_COMPONENT, false).unwrap()+fn p1_symlink_loop() {+ run(P1_SYMLINK_LOOP_COMPONENT, false).unwrap()}#[test_log::test]-fn preview1_unlink_file_trailing_slashes() {- run(PREVIEW1_UNLINK_FILE_TRAILING_SLASHES_COMPONENT, false).unwrap()+fn p1_unlink_file_trailing_slashes() {+ run(P1_UNLINK_FILE_TRAILING_SLASHES_COMPONENT, false).unwrap()}#[test_log::test]-fn preview1_path_open_preopen() {- run(PREVIEW1_PATH_OPEN_PREOPEN_COMPONENT, false).unwrap()+fn p1_path_open_preopen() {+ run(P1_PATH_OPEN_PREOPEN_COMPONENT, false).unwrap()}#[test_log::test]-fn preview1_unicode_output() {- run(PREVIEW1_UNICODE_OUTPUT_COMPONENT, true).unwrap()+fn p1_unicode_output() {+ run(P1_UNICODE_OUTPUT_COMPONENT, true).unwrap()}#[test_log::test]-fn preview1_file_write() {- run(PREVIEW1_FILE_WRITE_COMPONENT, false).unwrap()+fn p1_file_write() {+ run(P1_FILE_WRITE_COMPONENT, false).unwrap()}#[test_log::test]-fn preview1_path_open_lots() {- run(PREVIEW1_PATH_OPEN_LOTS_COMPONENT, false).unwrap()+fn p1_path_open_lots() {+ run(P1_PATH_OPEN_LOTS_COMPONENT, false).unwrap()}#[test_log::test]-fn preview2_sleep() {- run(PREVIEW2_SLEEP_COMPONENT, false).unwrap()+fn p2_sleep() {+ run(P2_SLEEP_COMPONENT, false).unwrap()}#[test_log::test]-fn preview2_random() {- run(PREVIEW2_RANDOM_COMPONENT, false).unwrap()+fn p2_random() {+ run(P2_RANDOM_COMPONENT, false).unwrap()}#[test_log::test]-fn preview2_ip_name_lookup() {- run(PREVIEW2_IP_NAME_LOOKUP_COMPONENT, false).unwrap()+fn p2_ip_name_lookup() {+ run(P2_IP_NAME_LOOKUP_COMPONENT, false).unwrap()}#[test_log::test]-fn preview2_tcp_sockopts() {- run(PREVIEW2_TCP_SOCKOPTS_COMPONENT, false).unwrap()+fn p2_tcp_sockopts() {+ run(P2_TCP_SOCKOPTS_COMPONENT, false).unwrap()}#[test_log::test]-fn preview2_tcp_sample_application() {- run(PREVIEW2_TCP_SAMPLE_APPLICATION_COMPONENT, false).unwrap()+fn p2_tcp_sample_application() {+ run(P2_TCP_SAMPLE_APPLICATION_COMPONENT, false).unwrap()}#[test_log::test]-fn preview2_tcp_states() {- run(PREVIEW2_TCP_STATES_COMPONENT, false).unwrap()+fn p2_tcp_states() {+ run(P2_TCP_STATES_COMPONENT, false).unwrap()}#[test_log::test]-fn preview2_tcp_streams() {- run(PREVIEW2_TCP_STREAMS_COMPONENT, false).unwrap()+fn p2_tcp_streams() {+ run(P2_TCP_STREAMS_COMPONENT, false).unwrap()}#[test_log::test]-fn preview2_tcp_bind() {- run(PREVIEW2_TCP_BIND_COMPONENT, false).unwrap()+fn p2_tcp_bind() {+ run(P2_TCP_BIND_COMPONENT, false).unwrap()}#[test_log::test]-fn preview2_tcp_connect() {- run(PREVIEW2_TCP_CONNECT_COMPONENT, false).unwrap()+fn p2_tcp_connect() {+ run(P2_TCP_CONNECT_COMPONENT, false).unwrap()}#[test_log::test]-fn preview2_udp_sockopts() {- run(PREVIEW2_UDP_SOCKOPTS_COMPONENT, false).unwrap()+fn p2_udp_sockopts() {+ run(P2_UDP_SOCKOPTS_COMPONENT, false).unwrap()}#[test_log::test]-fn preview2_udp_sample_application() {- run(PREVIEW2_UDP_SAMPLE_APPLICATION_COMPONENT, false).unwrap()+fn p2_udp_sample_application() {+ run(P2_UDP_SAMPLE_APPLICATION_COMPONENT, false).unwrap()}#[test_log::test]-fn preview2_udp_states() {- run(PREVIEW2_UDP_STATES_COMPONENT, false).unwrap()+fn p2_udp_states() {+ run(P2_UDP_STATES_COMPONENT, false).unwrap()}#[test_log::test]-fn preview2_udp_bind() {- run(PREVIEW2_UDP_BIND_COMPONENT, false).unwrap()+fn p2_udp_bind() {+ run(P2_UDP_BIND_COMPONENT, false).unwrap()}#[test_log::test]-fn preview2_udp_connect() {- run(PREVIEW2_UDP_CONNECT_COMPONENT, false).unwrap()+fn p2_udp_connect() {+ run(P2_UDP_CONNECT_COMPONENT, false).unwrap()}#[test_log::test]-fn preview2_stream_pollable_correct() {- run(PREVIEW2_STREAM_POLLABLE_CORRECT_COMPONENT, false).unwrap()+fn p2_stream_pollable_correct() {+ run(P2_STREAM_POLLABLE_CORRECT_COMPONENT, false).unwrap()}#[test_log::test]-fn preview2_stream_pollable_traps() {- let e = run(PREVIEW2_STREAM_POLLABLE_TRAPS_COMPONENT, false).unwrap_err();+fn p2_stream_pollable_traps() {+ let e = run(P2_STREAM_POLLABLE_TRAPS_COMPONENT, false).unwrap_err();assert_eq!(format!("{}", e.source().expect("trap source")),"resource has children")}#[test_log::test]-fn preview2_pollable_correct() {- run(PREVIEW2_POLLABLE_CORRECT_COMPONENT, false).unwrap()+fn p2_pollable_correct() {+ run(P2_POLLABLE_CORRECT_COMPONENT, false).unwrap()}#[test_log::test]-fn preview2_pollable_traps() {- let e = run(PREVIEW2_POLLABLE_TRAPS_COMPONENT, false).unwrap_err();+fn p2_pollable_traps() {+ let e = run(P2_POLLABLE_TRAPS_COMPONENT, false).unwrap_err();assert_eq!(format!("{}", e.source().expect("trap source")),"empty poll list")}#[test_log::test]-fn preview2_adapter_badfd() {- run(PREVIEW2_ADAPTER_BADFD_COMPONENT, false).unwrap()+fn p2_adapter_badfd() {+ run(P2_ADAPTER_BADFD_COMPONENT, false).unwrap()}#[test_log::test]-fn preview2_file_read_write() {- run(PREVIEW2_FILE_READ_WRITE_COMPONENT, false).unwrap()+fn p2_file_read_write() {+ run(P2_FILE_READ_WRITE_COMPONENT, false).unwrap()}+#[expect(+ dead_code,+ reason = "tested in the wasi-cli crate, satisfying foreach_api! macro"+)]+fn p1_cli_much_stdout() {}diff --git a/crates/wasi/tests/all/p3/mod.rs b/crates/wasi/tests/all/p3/mod.rsindex 95c16be477..df299075cd 100644--- a/crates/wasi/tests/all/p3/mod.rs+++ b/crates/wasi/tests/all/p3/mod.rs@@ -150,3 +150,21 @@ async fn p3_file_write() -> anyhow::Result<()> {async fn p3_file_write_blocking() -> anyhow::Result<()> {run_allow_blocking_current_thread(P3_FILE_WRITE_COMPONENT, true).await}++#[expect(+ dead_code,+ reason = "tested in the wasi-cli crate, satisfying foreach_api! macro"+)]+fn p3_cli_hello_stdout() {}++#[expect(+ dead_code,+ reason = "tested in the wasi-cli crate, satisfying foreach_api! macro"+)]+fn p3_cli_much_stdout() {}++#[expect(+ dead_code,+ reason = "tested in the wasi-cli crate, satisfying foreach_api! macro"+)]+fn p3_cli_serve_hello_world() {}diff --git a/tests/all/cli_tests.rs b/tests/all/cli_tests.rsindex 2232de824e..f623dedacb 100644--- a/tests/all/cli_tests.rs+++ b/tests/all/cli_tests.rs@@ -1121,20 +1121,20 @@ mod test_programs {use self::$name as _;};}- foreach_cli!(assert_test_exists);+ foreach_p2_cli!(assert_test_exists);#[test]- fn cli_hello_stdout() -> Result<()> {- run_wasmtime(&["run", "-Wcomponent-model", CLI_HELLO_STDOUT_COMPONENT])?;+ fn p2_cli_hello_stdout() -> Result<()> {+ run_wasmtime(&["run", "-Wcomponent-model", P2_CLI_HELLO_STDOUT_COMPONENT])?;Ok(())}#[test]- fn cli_args() -> Result<()> {+ fn p2_cli_args() -> Result<()> {run_wasmtime(&["run","-Wcomponent-model",- CLI_ARGS_COMPONENT,+ P2_CLI_ARGS_COMPONENT,"hello","this","",@@ -1145,9 +1145,9 @@ mod test_programs {}#[test]- fn cli_stdin_empty() -> Result<()> {+ fn p2_cli_stdin_empty() -> Result<()> {let mut child = get_wasmtime_command()?- .args(&["run", "-Wcomponent-model", CLI_STDIN_EMPTY_COMPONENT])+ .args(&["run", "-Wcomponent-model", P2_CLI_STDIN_EMPTY_COMPONENT]).stdout(Stdio::piped()).stderr(Stdio::piped()).stdin(Stdio::piped())@@ -1166,9 +1166,9 @@ mod test_programs {}#[test]- fn cli_stdin() -> Result<()> {+ fn p2_cli_stdin() -> Result<()> {let mut child = get_wasmtime_command()?- .args(&["run", "-Wcomponent-model", CLI_STDIN_COMPONENT])+ .args(&["run", "-Wcomponent-model", P2_CLI_STDIN_COMPONENT]).stdout(Stdio::piped()).stderr(Stdio::piped()).stdin(Stdio::piped())@@ -1187,9 +1187,9 @@ mod test_programs {}#[test]- fn cli_splice_stdin() -> Result<()> {+ fn p2_cli_splice_stdin() -> Result<()> {let mut child = get_wasmtime_command()?- .args(&["run", "-Wcomponent-model", CLI_SPLICE_STDIN_COMPONENT])+ .args(&["run", "-Wcomponent-model", P2_CLI_SPLICE_STDIN_COMPONENT]).stdout(Stdio::piped()).stderr(Stdio::piped()).stdin(Stdio::piped())@@ -1220,19 +1220,19 @@ mod test_programs {}#[test]- fn cli_env() -> Result<()> {+ fn p2_cli_env() -> Result<()> {run_wasmtime(&["run","-Wcomponent-model","--env=frabjous=day","--env=callooh=callay",- CLI_ENV_COMPONENT,+ P2_CLI_ENV_COMPONENT,])?;Ok(())}#[test]- fn cli_file_read() -> Result<()> {+ fn p2_cli_file_read() -> Result<()> {let dir = tempfile::tempdir()?;std::fs::write(dir.path().join("bar.txt"), b"And stood awhile in thought")?;@@ -1241,13 +1241,13 @@ mod test_programs {"run","-Wcomponent-model",&format!("--dir={}::/", dir.path().to_str().unwrap()),- CLI_FILE_READ_COMPONENT,+ P2_CLI_FILE_READ_COMPONENT,])?;Ok(())}#[test]- fn cli_file_append() -> Result<()> {+ fn p2_cli_file_append() -> Result<()> {let dir = tempfile::tempdir()?;std::fs::File::create(dir.path().join("bar.txt"))?@@ -1257,7 +1257,7 @@ mod test_programs {"run","-Wcomponent-model",&format!("--dir={}::/", dir.path().to_str().unwrap()),- CLI_FILE_APPEND_COMPONENT,+ P2_CLI_FILE_APPEND_COMPONENT,])?;let contents = std::fs::read(dir.path().join("bar.txt"))?;@@ -1272,7 +1272,7 @@ mod test_programs {}#[test]- fn cli_file_dir_sync() -> Result<()> {+ fn p2_cli_file_dir_sync() -> Result<()> {let dir = tempfile::tempdir()?;std::fs::File::create(dir.path().join("bar.txt"))?@@ -1282,28 +1282,28 @@ mod test_programs {"run","-Wcomponent-model",&format!("--dir={}::/", dir.path().to_str().unwrap()),- CLI_FILE_DIR_SYNC_COMPONENT,+ P2_CLI_FILE_DIR_SYNC_COMPONENT,])?;Ok(())}#[test]- fn cli_exit_success() -> Result<()> {- run_wasmtime(&["run", "-Wcomponent-model", CLI_EXIT_SUCCESS_COMPONENT])?;+ fn p2_cli_exit_success() -> Result<()> {+ run_wasmtime(&["run", "-Wcomponent-model", P2_CLI_EXIT_SUCCESS_COMPONENT])?;Ok(())}#[test]- fn cli_exit_default() -> Result<()> {- run_wasmtime(&["run", "-Wcomponent-model", CLI_EXIT_DEFAULT_COMPONENT])?;+ fn p2_cli_exit_default() -> Result<()> {+ run_wasmtime(&["run", "-Wcomponent-model", P2_CLI_EXIT_DEFAULT_COMPONENT])?;Ok(())}#[test]- fn cli_exit_failure() -> Result<()> {+ fn p2_cli_exit_failure() -> Result<()> {let output = get_wasmtime_command()?- .args(&["run", "-Wcomponent-model", CLI_EXIT_FAILURE_COMPONENT])+ .args(&["run", "-Wcomponent-model", P2_CLI_EXIT_FAILURE_COMPONENT]).output()?;assert!(!output.status.success());assert_eq!(output.status.code(), Some(1));@@ -1311,13 +1311,13 @@ mod test_programs {}#[test]- fn cli_exit_with_code() -> Result<()> {+ fn p2_cli_exit_with_code() -> Result<()> {let output = get_wasmtime_command()?.args(&["run","-Wcomponent-model","-Scli-exit-with-code",- CLI_EXIT_WITH_CODE_COMPONENT,+ P2_CLI_EXIT_WITH_CODE_COMPONENT,]).output()?;assert!(!output.status.success());@@ -1326,9 +1326,9 @@ mod test_programs {}#[test]- fn cli_exit_panic() -> Result<()> {+ fn p2_cli_exit_panic() -> Result<()> {let output = get_wasmtime_command()?- .args(&["run", "-Wcomponent-model", CLI_EXIT_PANIC_COMPONENT])+ .args(&["run", "-Wcomponent-model", P2_CLI_EXIT_PANIC_COMPONENT]).output()?;assert!(!output.status.success());let stderr = String::from_utf8_lossy(&output.stderr);@@ -1337,7 +1337,7 @@ mod test_programs {}#[test]- fn cli_directory_list() -> Result<()> {+ fn p2_cli_directory_list() -> Result<()> {let dir = tempfile::tempdir()?;std::fs::File::create(dir.path().join("foo.txt"))?;@@ -1351,23 +1351,23 @@ mod test_programs {"run","-Wcomponent-model",&format!("--dir={}::/", dir.path().to_str().unwrap()),- CLI_DIRECTORY_LIST_COMPONENT,+ P2_CLI_DIRECTORY_LIST_COMPONENT,])?;Ok(())}#[test]- fn cli_default_clocks() -> Result<()> {- run_wasmtime(&["run", "-Wcomponent-model", CLI_DEFAULT_CLOCKS_COMPONENT])?;+ fn p2_cli_default_clocks() -> Result<()> {+ run_wasmtime(&["run", "-Wcomponent-model", P2_CLI_DEFAULT_CLOCKS_COMPONENT])?;Ok(())}#[test]- fn cli_export_cabi_realloc() -> Result<()> {+ fn p2_cli_export_cabi_realloc() -> Result<()> {run_wasmtime(&["run","-Wcomponent-model",- CLI_EXPORT_CABI_REALLOC_COMPONENT,+ P2_CLI_EXPORT_CABI_REALLOC_COMPONENT,])?;Ok(())}@@ -1379,7 +1379,7 @@ mod test_programs {"-Ccache=no","-Wcomponent-model","-Scli,http,preview2",- HTTP_OUTBOUND_REQUEST_RESPONSE_BUILD_COMPONENT,+ P2_HTTP_OUTBOUND_REQUEST_RESPONSE_BUILD_COMPONENT,],None,)?;@@ -1397,7 +1397,7 @@ mod test_programs {// wait for input on stdin, and the test here is to ensure that the// character shows up here even as the guest is waiting on input via stdin.#[test]- fn cli_stdio_write_flushes() -> Result<()> {+ fn p2_cli_stdio_write_flushes() -> Result<()> {fn run(args: &[&str]) -> Result<()> {println!("running {args:?}");let mut child = get_wasmtime_command()?@@ -1418,24 +1418,24 @@ mod test_programs {Ok(())}- run(&["run", "-Spreview2=n", CLI_STDIO_WRITE_FLUSHES])?;- run(&["run", "-Spreview2=y", CLI_STDIO_WRITE_FLUSHES])?;+ run(&["run", "-Spreview2=n", P2_CLI_STDIO_WRITE_FLUSHES])?;+ run(&["run", "-Spreview2=y", P2_CLI_STDIO_WRITE_FLUSHES])?;run(&["run","-Wcomponent-model",- CLI_STDIO_WRITE_FLUSHES_COMPONENT,+ P2_CLI_STDIO_WRITE_FLUSHES_COMPONENT,])?;Ok(())}#[test]- fn cli_no_tcp() -> Result<()> {+ fn p2_cli_no_tcp() -> Result<()> {let output = super::run_wasmtime_for_output(&["-Wcomponent-model",// Turn on network but turn off TCP"-Sinherit-network,tcp=no",- CLI_NO_TCP_COMPONENT,+ P2_CLI_NO_TCP_COMPONENT,],None,)?;@@ -1445,13 +1445,13 @@ mod test_programs {}#[test]- fn cli_no_udp() -> Result<()> {+ fn p2_cli_no_udp() -> Result<()> {let output = super::run_wasmtime_for_output(&["-Wcomponent-model",// Turn on network but turn off UDP"-Sinherit-network,udp=no",- CLI_NO_UDP_COMPONENT,+ P2_CLI_NO_UDP_COMPONENT,],None,)?;@@ -1461,13 +1461,13 @@ mod test_programs {}#[test]- fn cli_no_ip_name_lookup() -> Result<()> {+ fn p2_cli_no_ip_name_lookup() -> Result<()> {let output = super::run_wasmtime_for_output(&["-Wcomponent-model",// Turn on network but ensure name lookup is disabled"-Sinherit-network,allow-ip-name-lookup=no",- CLI_NO_IP_NAME_LOOKUP_COMPONENT,+ P2_CLI_NO_IP_NAME_LOOKUP_COMPONENT,],None,)?;@@ -1477,26 +1477,26 @@ mod test_programs {}#[test]- fn cli_sleep() -> Result<()> {- run_wasmtime(&["run", CLI_SLEEP])?;- run_wasmtime(&["run", CLI_SLEEP_COMPONENT])?;+ fn p2_cli_sleep() -> Result<()> {+ run_wasmtime(&["run", P2_CLI_SLEEP])?;+ run_wasmtime(&["run", P2_CLI_SLEEP_COMPONENT])?;Ok(())}#[test]- fn cli_sleep_forever() -> Result<()> {+ fn p2_cli_sleep_forever() -> Result<()> {for timeout in [// Tests still pass when we race with going to sleep."-Wtimeout=1ns",// Tests pass when we wait till the Wasm has (likely) gone to sleep."-Wtimeout=250ms",] {- let e = run_wasmtime(&["run", timeout, CLI_SLEEP_FOREVER]).unwrap_err();+ let e = run_wasmtime(&["run", timeout, P2_CLI_SLEEP_FOREVER]).unwrap_err();let e = e.to_string();println!("Got error: {e}");assert!(e.contains("interrupt"));- let e = run_wasmtime(&["run", timeout, CLI_SLEEP_FOREVER_COMPONENT]).unwrap_err();+ let e = run_wasmtime(&["run", timeout, P2_CLI_SLEEP_FOREVER_COMPONENT]).unwrap_err();let e = e.to_string();println!("Got error: {e}");assert!(e.contains("interrupt"));@@ -1693,8 +1693,8 @@ mod test_programs {}#[tokio::test]- async fn cli_serve_echo_env() -> Result<()> {- let server = WasmtimeServe::new(CLI_SERVE_ECHO_ENV_COMPONENT, |cmd| {+ async fn p2_cli_serve_echo_env() -> Result<()> {+ let server = WasmtimeServe::new(P2_CLI_SERVE_ECHO_ENV_COMPONENT, |cmd| {cmd.arg("--env=FOO=bar");cmd.arg("--env=BAR");cmd.arg("-Scli");@@ -1736,8 +1736,8 @@ mod test_programs {}#[tokio::test]- async fn cli_serve_outgoing_body_config() -> Result<()> {- let server = WasmtimeServe::new(CLI_SERVE_ECHO_ENV_COMPONENT, |cmd| {+ async fn p2_cli_serve_outgoing_body_config() -> Result<()> {+ let server = WasmtimeServe::new(P2_CLI_SERVE_ECHO_ENV_COMPONENT, |cmd| {cmd.arg("-Scli");cmd.arg("-Shttp-outgoing-body-buffer-chunks=2");cmd.arg("-Shttp-outgoing-body-chunk-size=1024");@@ -1764,8 +1764,8 @@ mod test_programs {// end of this test race so the stderr may be present or not. Need// to implement a more graceful shutdown routine for `wasmtime// serve`.- async fn cli_serve_respect_pooling_options() -> Result<()> {- let server = WasmtimeServe::new(CLI_SERVE_ECHO_ENV_COMPONENT, |cmd| {+ async fn p2_cli_serve_respect_pooling_options() -> Result<()> {+ let server = WasmtimeServe::new(P2_CLI_SERVE_ECHO_ENV_COMPONENT, |cmd| {cmd.arg("-Opooling-total-memories=0").arg("-Scli");})?;@@ -1788,8 +1788,8 @@ mod test_programs {}#[test]- fn cli_large_env() -> Result<()> {- for wasm in [CLI_LARGE_ENV, CLI_LARGE_ENV_COMPONENT] {+ fn p2_cli_large_env() -> Result<()> {+ for wasm in [P2_CLI_LARGE_ENV, P2_CLI_LARGE_ENV_COMPONENT] {println!("run {wasm:?}");let mut cmd = get_wasmtime_command()?;cmd.arg("run").arg("-Sinherit-env").arg(wasm);@@ -1812,8 +1812,8 @@ mod test_programs {}#[tokio::test]- async fn cli_serve_only_one_process_allowed() -> Result<()> {- let wasm = CLI_SERVE_ECHO_ENV_COMPONENT;+ async fn p2_cli_serve_only_one_process_allowed() -> Result<()> {+ let wasm = P2_CLI_SERVE_ECHO_ENV_COMPONENT;let server = WasmtimeServe::new(wasm, |cmd| {cmd.arg("-Scli");})?;@@ -1841,8 +1841,8 @@ mod test_programs {// in the next process while it technically could be stolen by another// process.#[tokio::test]- async fn cli_serve_quick_rebind_allowed() -> Result<()> {- let wasm = CLI_SERVE_ECHO_ENV_COMPONENT;+ async fn p2_cli_serve_quick_rebind_allowed() -> Result<()> {+ let wasm = P2_CLI_SERVE_ECHO_ENV_COMPONENT;let server = WasmtimeServe::new(wasm, |cmd| {cmd.arg("-Scli");})?;@@ -1887,8 +1887,8 @@ mod test_programs {}#[tokio::test]- async fn cli_serve_with_print() -> Result<()> {- let server = WasmtimeServe::new(CLI_SERVE_WITH_PRINT_COMPONENT, |cmd| {+ async fn p2_cli_serve_with_print() -> Result<()> {+ let server = WasmtimeServe::new(P2_CLI_SERVE_WITH_PRINT_COMPONENT, |cmd| {cmd.arg("-Scli");})?;@@ -1936,8 +1936,8 @@ stderr [1] :: start a print 1234}#[tokio::test]- async fn cli_serve_with_print_no_prefix() -> Result<()> {- let server = WasmtimeServe::new(CLI_SERVE_WITH_PRINT_COMPONENT, |cmd| {+ async fn p2_cli_serve_with_print_no_prefix() -> Result<()> {+ let server = WasmtimeServe::new(P2_CLI_SERVE_WITH_PRINT_COMPONENT, |cmd| {cmd.arg("-Scli");cmd.arg("--no-logging-prefix");})?;@@ -1986,8 +1986,8 @@ start a print 1234}#[tokio::test]- async fn cli_serve_authority_and_scheme() -> Result<()> {- let server = WasmtimeServe::new(CLI_SERVE_AUTHORITY_AND_SCHEME_COMPONENT, |cmd| {+ async fn p2_cli_serve_authority_and_scheme() -> Result<()> {+ let server = WasmtimeServe::new(P2_CLI_SERVE_AUTHORITY_AND_SCHEME_COMPONENT, |cmd| {cmd.arg("-Scli");})?;@@ -2017,16 +2017,16 @@ start a print 1234}#[test]- fn cli_argv0() -> Result<()> {- run_wasmtime(&["run", "--argv0=a", CLI_ARGV0, "a"])?;- run_wasmtime(&["run", "--argv0=b", CLI_ARGV0_COMPONENT, "b"])?;- run_wasmtime(&["run", "--argv0=foo.wasm", CLI_ARGV0, "foo.wasm"])?;+ fn p2_cli_argv0() -> Result<()> {+ run_wasmtime(&["run", "--argv0=a", P2_CLI_ARGV0, "a"])?;+ run_wasmtime(&["run", "--argv0=b", P2_CLI_ARGV0_COMPONENT, "b"])?;+ run_wasmtime(&["run", "--argv0=foo.wasm", P2_CLI_ARGV0, "foo.wasm"])?;Ok(())}#[tokio::test]- async fn cli_serve_config() -> Result<()> {- let server = WasmtimeServe::new(CLI_SERVE_CONFIG_COMPONENT, |cmd| {+ async fn p2_cli_serve_config() -> Result<()> {+ let server = WasmtimeServe::new(P2_CLI_SERVE_CONFIG_COMPONENT, |cmd| {cmd.arg("-Scli");cmd.arg("-Sconfig");cmd.arg("-Sconfig-var=hello=world");@@ -2047,7 +2047,7 @@ start a print 1234}#[test]- fn cli_config() -> Result<()> {+ fn p2_cli_config() -> Result<()> {run_wasmtime(&["run","-Sconfig",@@ -2058,8 +2058,8 @@ start a print 1234}#[tokio::test]- async fn cli_serve_keyvalue() -> Result<()> {- let server = WasmtimeServe::new(CLI_SERVE_KEYVALUE_COMPONENT, |cmd| {+ async fn p2_cli_serve_keyvalue() -> Result<()> {+ let server = WasmtimeServe::new(P2_CLI_SERVE_KEYVALUE_COMPONENT, |cmd| {cmd.arg("-Scli");cmd.arg("-Skeyvalue");cmd.arg("-Skeyvalue-in-memory-data=hello=world");@@ -2080,7 +2080,7 @@ start a print 1234}#[test]- fn cli_keyvalue() -> Result<()> {+ fn p2_cli_keyvalue() -> Result<()> {run_wasmtime(&["run","-Skeyvalue",@@ -2091,18 +2091,18 @@ start a print 1234}#[test]- fn cli_multiple_preopens() -> Result<()> {+ fn p2_cli_multiple_preopens() -> Result<()> {run_wasmtime(&["run","--dir=/::/a","--dir=/::/b","--dir=/::/c",- CLI_MULTIPLE_PREOPENS_COMPONENT,+ P2_CLI_MULTIPLE_PREOPENS_COMPONENT,])?;Ok(())}- async fn cli_serve_guest_never_invoked_set(wasm: &str) -> Result<()> {+ async fn p2_cli_serve_guest_never_invoked_set(wasm: &str) -> Result<()> {let server = WasmtimeServe::new(wasm, |cmd| {cmd.arg("-Scli");})?;@@ -2129,22 +2129,22 @@ start a print 1234}#[tokio::test]- async fn cli_serve_return_before_set() -> Result<()> {- cli_serve_guest_never_invoked_set(CLI_SERVE_RETURN_BEFORE_SET_COMPONENT).await+ async fn p2_cli_serve_return_before_set() -> Result<()> {+ p2_cli_serve_guest_never_invoked_set(P2_CLI_SERVE_RETURN_BEFORE_SET_COMPONENT).await}#[tokio::test]- async fn cli_serve_trap_before_set() -> Result<()> {- cli_serve_guest_never_invoked_set(CLI_SERVE_TRAP_BEFORE_SET_COMPONENT).await+ async fn p2_cli_serve_trap_before_set() -> Result<()> {+ p2_cli_serve_guest_never_invoked_set(P2_CLI_SERVE_TRAP_BEFORE_SET_COMPONENT).await}#[test]- fn cli_p3_hello_stdout() -> Result<()> {+ fn p2_cli_p3_hello_stdout() -> Result<()> {let output = run_wasmtime(&["run","-Wcomponent-model-async","-Sp3",- CLI_P3_HELLO_STDOUT_COMPONENT,+ P3_CLI_HELLO_STDOUT_COMPONENT,]);if cfg!(feature = "component-model-async") {let output = output?;@@ -2159,14 +2159,14 @@ start a print 1234use super::*;#[test]- fn cli_hello_stdout() -> Result<()> {- println!("{CLI_HELLO_STDOUT_COMPONENT}");+ fn p2_cli_hello_stdout() -> Result<()> {+ println!("{P2_CLI_HELLO_STDOUT_COMPONENT}");let output = run_wasmtime(&["run","-Wcomponent-model","--invoke","run()",- CLI_HELLO_STDOUT_COMPONENT,+ P2_CLI_HELLO_STDOUT_COMPONENT,])?;// First this component prints "hello, world", then the invoke// result is printed as "ok".@@ -2177,13 +2177,13 @@ start a print 1234#[test]#[cfg_attr(not(feature = "component-model-async"), ignore)]- fn cli_invoke_async() -> Result<()> {+ fn p2_cli_invoke_async() -> Result<()> {let output = run_wasmtime(&["run","-Wcomponent-model-async","--invoke","echo(\"hello?\")",- CLI_INVOKE_ASYNC_COMPONENT,+ P2_CLI_INVOKE_ASYNC_COMPONENT,])?;assert_eq!(output, "\"hello?\"\n");Ok(())@@ -2217,28 +2217,28 @@ start a print 1234}#[test]- fn cli_p1_much_stdout() -> Result<()> {- run_much_stdout(CLI_P1_MUCH_STDOUT_COMPONENT, &[])+ fn p1_cli_much_stdout() -> Result<()> {+ run_much_stdout(P1_CLI_MUCH_STDOUT_COMPONENT, &[])}#[test]- fn cli_p2_much_stdout() -> Result<()> {- run_much_stdout(CLI_P2_MUCH_STDOUT_COMPONENT, &[])+ fn p2_cli_much_stdout() -> Result<()> {+ run_much_stdout(P2_CLI_MUCH_STDOUT_COMPONENT, &[])}#[test]#[cfg_attr(not(feature = "component-model-async"), ignore)]- fn cli_p3_much_stdout() -> Result<()> {+ fn p3_cli_much_stdout() -> Result<()> {run_much_stdout(- CLI_P3_MUCH_STDOUT_COMPONENT,+ P3_CLI_MUCH_STDOUT_COMPONENT,&["-Wcomponent-model-async", "-Sp3"],)}#[tokio::test]#[cfg_attr(not(feature = "component-model-async"), ignore)]- async fn cli_serve_p3_hello_world() -> Result<()> {- let server = WasmtimeServe::new(CLI_SERVE_P3_HELLO_WORLD_COMPONENT, |cmd| {+ async fn p3_cli_serve_hello_world() -> Result<()> {+ let server = WasmtimeServe::new(P3_CLI_SERVE_HELLO_WORLD_COMPONENT, |cmd| {cmd.arg("-Wcomponent-model-async");cmd.arg("-Sp3,cli");})?;@@ -2260,8 +2260,8 @@ start a print 1234}#[tokio::test]- async fn cli_serve_sleep() -> Result<()> {- let server = WasmtimeServe::new(CLI_SERVE_SLEEP_COMPONENT, |cmd| {+ async fn p2_cli_serve_sleep() -> Result<()> {+ let server = WasmtimeServe::new(P2_CLI_SERVE_SLEEP_COMPONENT, |cmd| {cmd.arg("-Scli").arg("-Wtimeout=100us");})?;