@@ -118,6 +118,7 @@ fn test_mktemp_mktemp() {
118118}
119119
120120#[ test]
121+ #[ cfg_attr( wasi_runner, ignore = "WASI sandbox: host paths not visible" ) ]
121122fn test_mktemp_mktemp_t ( ) {
122123 let scene = TestScenario :: new ( util_name ! ( ) ) ;
123124
@@ -399,6 +400,7 @@ fn test_mktemp_suffix() {
399400}
400401
401402#[ test]
403+ #[ cfg_attr( wasi_runner, ignore = "WASI sandbox: host paths not visible" ) ]
402404fn test_mktemp_tmpdir ( ) {
403405 let scene = TestScenario :: new ( util_name ! ( ) ) ;
404406 let dir = tempdir ( ) . unwrap ( ) ;
@@ -462,6 +464,7 @@ fn test_mktemp_tmpdir() {
462464}
463465
464466#[ test]
467+ #[ cfg_attr( wasi_runner, ignore = "WASI sandbox: host paths not visible" ) ]
465468fn test_mktemp_empty_tmpdir ( ) {
466469 let scene = TestScenario :: new ( util_name ! ( ) ) ;
467470 let pathname = scene. fixtures . as_string ( ) ;
@@ -482,6 +485,7 @@ fn test_mktemp_empty_tmpdir() {
482485}
483486
484487#[ test]
488+ #[ cfg_attr( wasi_runner, ignore = "WASI sandbox: host paths not visible" ) ]
485489fn test_mktemp_tmpdir_one_arg ( ) {
486490 let scene = TestScenario :: new ( util_name ! ( ) ) ;
487491
@@ -495,6 +499,7 @@ fn test_mktemp_tmpdir_one_arg() {
495499}
496500
497501#[ test]
502+ #[ cfg_attr( wasi_runner, ignore = "WASI sandbox: host paths not visible" ) ]
498503fn test_mktemp_directory_tmpdir ( ) {
499504 let scene = TestScenario :: new ( util_name ! ( ) ) ;
500505
@@ -599,6 +604,11 @@ fn test_respect_template_directory() {
599604
600605#[ cfg( unix) ]
601606#[ test]
607+ #[ cfg_attr(
608+ wasi_runner,
609+ ignore = "WASI: path_create_directory has no mode parameter and chmod returns ENOSYS, \
610+ so directories can't be created with restricted permissions"
611+ ) ]
602612fn test_directory_permissions ( ) {
603613 let ( at, mut ucmd) = at_and_ucmd ! ( ) ;
604614 let result = ucmd. args ( & [ "-d" , "XXX" ] ) . succeeds ( ) ;
@@ -869,6 +879,7 @@ fn test_nonexistent_tmpdir_env_var() {
869879}
870880
871881#[ test]
882+ #[ cfg_attr( wasi_runner, ignore = "WASI sandbox: host paths not visible" ) ]
872883fn test_empty_tmpdir_env_var ( ) {
873884 #[ cfg( not( any( windows, target_os = "android" ) ) ) ]
874885 {
@@ -967,11 +978,13 @@ fn test_nonexistent_dir_prefix() {
967978}
968979
969980#[ test]
981+ #[ cfg_attr( wasi_runner, ignore = "WASI sandbox: host paths not visible" ) ]
970982fn test_default_missing_value ( ) {
971983 new_ucmd ! ( ) . arg ( "-d" ) . arg ( "--tmpdir" ) . succeeds ( ) ;
972984}
973985
974986#[ test]
987+ #[ cfg_attr( wasi_runner, ignore = "WASI sandbox: host paths not visible" ) ]
975988fn test_default_issue_4821_t_tmpdir ( ) {
976989 let scene = TestScenario :: new ( util_name ! ( ) ) ;
977990 let pathname = scene. fixtures . as_string ( ) ;
@@ -987,6 +1000,7 @@ fn test_default_issue_4821_t_tmpdir() {
9871000}
9881001
9891002#[ test]
1003+ #[ cfg_attr( wasi_runner, ignore = "WASI sandbox: host paths not visible" ) ]
9901004fn test_default_issue_4821_t_tmpdir_p ( ) {
9911005 let scene = TestScenario :: new ( util_name ! ( ) ) ;
9921006 let pathname = scene. fixtures . as_string ( ) ;
@@ -1003,6 +1017,7 @@ fn test_default_issue_4821_t_tmpdir_p() {
10031017}
10041018
10051019#[ test]
1020+ #[ cfg_attr( wasi_runner, ignore = "WASI sandbox: host paths not visible" ) ]
10061021fn test_t_ensure_tmpdir_has_higher_priority_than_p ( ) {
10071022 let scene = TestScenario :: new ( util_name ! ( ) ) ;
10081023 let pathname = scene. fixtures . as_string ( ) ;
@@ -1099,7 +1114,8 @@ fn test_missing_short_tmpdir_flag() {
10991114}
11001115
11011116#[ test]
1102- #[ cfg( target_os = "linux" ) ]
1117+ #[ cfg( unix) ]
1118+ #[ cfg_attr( wasi_runner, ignore = "WASI: wasmtime rejects non-UTF-8 arguments" ) ]
11031119fn test_non_utf8_template ( ) {
11041120 use std:: ffi:: OsStr ;
11051121 use std:: os:: unix:: ffi:: OsStrExt ;
@@ -1114,6 +1130,7 @@ fn test_non_utf8_template() {
11141130
11151131#[ test]
11161132#[ cfg( target_os = "linux" ) ]
1133+ #[ cfg_attr( wasi_runner, ignore = "WASI: wasmtime rejects non-UTF-8 arguments" ) ]
11171134fn test_non_utf8_tmpdir_path ( ) {
11181135 use std:: os:: unix:: ffi:: OsStrExt ;
11191136 let ( at, mut ucmd) = at_and_ucmd ! ( ) ;
@@ -1128,6 +1145,7 @@ fn test_non_utf8_tmpdir_path() {
11281145
11291146#[ test]
11301147#[ cfg( target_os = "linux" ) ]
1148+ #[ cfg_attr( wasi_runner, ignore = "WASI: wasmtime rejects non-UTF-8 arguments" ) ]
11311149fn test_non_utf8_tmpdir_long_option ( ) {
11321150 use std:: os:: unix:: ffi:: OsStrExt ;
11331151 let ( at, mut ucmd) = at_and_ucmd ! ( ) ;
@@ -1146,7 +1164,8 @@ fn test_non_utf8_tmpdir_long_option() {
11461164}
11471165
11481166#[ test]
1149- #[ cfg( target_os = "linux" ) ]
1167+ #[ cfg( unix) ]
1168+ #[ cfg_attr( wasi_runner, ignore = "WASI: wasmtime rejects non-UTF-8 arguments" ) ]
11501169fn test_invalid_utf8_suffix ( ) {
11511170 use std:: os:: unix:: ffi:: OsStrExt ;
11521171 let ( at, mut ucmd) = at_and_ucmd ! ( ) ;
@@ -1167,6 +1186,7 @@ fn test_invalid_utf8_suffix() {
11671186
11681187#[ test]
11691188#[ cfg( target_os = "linux" ) ]
1189+ #[ cfg_attr( wasi_runner, ignore = "WASI: wasmtime rejects non-UTF-8 arguments" ) ]
11701190fn test_non_utf8_tmpdir_directory_creation ( ) {
11711191 use std:: os:: unix:: ffi:: OsStrExt ;
11721192 let ( at, mut ucmd) = at_and_ucmd ! ( ) ;
@@ -1183,6 +1203,7 @@ fn test_non_utf8_tmpdir_directory_creation() {
11831203
11841204#[ test]
11851205#[ cfg( unix) ]
1206+ #[ cfg_attr( wasi_runner, ignore = "WASI sandbox: host paths not visible" ) ]
11861207fn test_mktemp_hidden_file_single_dot ( ) {
11871208 let scene = TestScenario :: new ( util_name ! ( ) ) ;
11881209 let dir = tempdir ( ) . unwrap ( ) ;
0 commit comments