31
31
os_helper .TESTFN + '-dummy-symlink' )
32
32
33
33
requires_32b = unittest .skipUnless (
34
- # Emscripten has 32 bits pointers, but support 64 bits syscall args.
35
- sys .maxsize < 2 ** 32 and not support .is_emscripten ,
34
+ # Emscripten/WASI have 32 bits pointers, but support 64 bits syscall args.
35
+ sys .maxsize < 2 ** 32 and not ( support .is_emscripten or support . is_wasi ) ,
36
36
'test is only meaningful on 32-bit builds'
37
37
)
38
38
@@ -547,6 +547,7 @@ def test_readv_overflow_32bits(self):
547
547
548
548
@unittest .skipUnless (hasattr (posix , 'dup' ),
549
549
'test needs posix.dup()' )
550
+ @unittest .skipIf (support .is_wasi , "WASI does not have dup()" )
550
551
def test_dup (self ):
551
552
fp = open (os_helper .TESTFN )
552
553
try :
@@ -564,6 +565,7 @@ def test_confstr(self):
564
565
565
566
@unittest .skipUnless (hasattr (posix , 'dup2' ),
566
567
'test needs posix.dup2()' )
568
+ @unittest .skipIf (support .is_wasi , "WASI does not have dup2()" )
567
569
def test_dup2 (self ):
568
570
fp1 = open (os_helper .TESTFN )
569
571
fp2 = open (os_helper .TESTFN )
@@ -1212,6 +1214,7 @@ def test_sched_setaffinity(self):
1212
1214
# bpo-47205: does not raise OSError on FreeBSD
1213
1215
self .assertRaises (OSError , posix .sched_setaffinity , - 1 , mask )
1214
1216
1217
+ @unittest .skipIf (support .is_wasi , "No dynamic linking on WASI" )
1215
1218
def test_rtld_constants (self ):
1216
1219
# check presence of major RTLD_* constants
1217
1220
posix .RTLD_LAZY
@@ -1406,6 +1409,10 @@ def test_utime_dir_fd(self):
1406
1409
# whoops! using both together not supported on this platform.
1407
1410
pass
1408
1411
1412
+ @unittest .skipIf (
1413
+ support .is_wasi ,
1414
+ "WASI: symlink following on path_link is not supported"
1415
+ )
1409
1416
@unittest .skipUnless (
1410
1417
hasattr (os , "link" ) and os .link in os .supports_dir_fd ,
1411
1418
"test needs dir_fd support in os.link()"
0 commit comments