@@ -224,11 +224,11 @@ def metafunc(self, standalone):
224
224
return decorated
225
225
226
226
227
- def with_asyncify_and_stack_switching (f ):
227
+ def with_asyncify_and_jspi (f ):
228
228
assert callable (f )
229
229
230
- def metafunc (self , stack_switching ):
231
- if stack_switching :
230
+ def metafunc (self , jspi ):
231
+ if jspi :
232
232
self .set_setting ('ASYNCIFY' , 2 )
233
233
self .require_jspi ()
234
234
if not self .is_wasm ():
@@ -242,7 +242,7 @@ def metafunc(self, stack_switching):
242
242
f (self )
243
243
244
244
metafunc ._parameterize = {'' : (False ,),
245
- 'stack_switching ' : (True ,)}
245
+ 'jspi ' : (True ,)}
246
246
return metafunc
247
247
248
248
@@ -8150,7 +8150,7 @@ def test_vswprintf_utf8(self):
8150
8150
8151
8151
# Test that a main with arguments is automatically asyncified.
8152
8152
@no_wasm64 ('TODO: asyncify for wasm64' )
8153
- @with_asyncify_and_stack_switching
8153
+ @with_asyncify_and_jspi
8154
8154
def test_async_main (self ):
8155
8155
create_file ('main.c' , r'''
8156
8156
#include <stdio.h>
@@ -8164,7 +8164,7 @@ def test_async_main(self):
8164
8164
self .do_runf ('main.c' , 'argc=2 argv=hello' , args = ['hello' ])
8165
8165
8166
8166
@no_wasm64 ('TODO: asyncify for wasm64' )
8167
- @with_asyncify_and_stack_switching
8167
+ @with_asyncify_and_jspi
8168
8168
def test_async_hello (self ):
8169
8169
# needs to flush stdio streams
8170
8170
self .set_setting ('EXIT_RUNTIME' )
@@ -8189,7 +8189,7 @@ def test_async_hello(self):
8189
8189
self .do_runf ('main.c' , 'HelloWorld!99' )
8190
8190
8191
8191
@no_wasm64 ('TODO: asyncify for wasm64' )
8192
- @with_asyncify_and_stack_switching
8192
+ @with_asyncify_and_jspi
8193
8193
def test_async_loop (self ):
8194
8194
# needs to flush stdio streams
8195
8195
self .set_setting ('EXIT_RUNTIME' )
@@ -8245,7 +8245,7 @@ def test_async_ccall_bad(self):
8245
8245
self .do_runf ('main.c' , 'The call to main is running asynchronously.' )
8246
8246
8247
8247
@no_wasm64 ('TODO: asyncify for wasm64' )
8248
- @with_asyncify_and_stack_switching
8248
+ @with_asyncify_and_jspi
8249
8249
def test_async_ccall_good (self ):
8250
8250
# check reasonable ccall use
8251
8251
# needs to flush stdio streams
@@ -8322,7 +8322,7 @@ def test_fibers_asyncify(self):
8322
8322
self .do_runf (test_file ('test_fibers.cpp' ), '*leaf-0-100-1-101-1-102-2-103-3-104-5-105-8-106-13-107-21-108-34-109-*' )
8323
8323
8324
8324
@no_wasm64 ('TODO: asyncify for wasm64' )
8325
- @with_asyncify_and_stack_switching
8325
+ @with_asyncify_and_jspi
8326
8326
def test_asyncify_unused (self ):
8327
8327
# test a program not using asyncify, but the pref is set
8328
8328
self .do_core_test ('test_hello_world.c' )
@@ -8442,7 +8442,7 @@ def test_asyncify_during_exit(self):
8442
8442
@no_lsan ('undefined symbol __global_base' )
8443
8443
@no_wasm2js ('dynamic linking support in wasm2js' )
8444
8444
@no_wasm64 ('TODO: asyncify for wasm64' )
8445
- @with_asyncify_and_stack_switching
8445
+ @with_asyncify_and_jspi
8446
8446
def test_asyncify_main_module (self ):
8447
8447
self .set_setting ('MAIN_MODULE' , 2 )
8448
8448
self .do_core_test ('test_hello_world.c' )
@@ -9686,7 +9686,7 @@ def test_embind_lib_with_asyncify(self, args):
9686
9686
9687
9687
@no_asan ('asyncify stack operations confuse asan' )
9688
9688
@no_wasm64 ('TODO: asyncify for wasm64' )
9689
- @with_asyncify_and_stack_switching
9689
+ @with_asyncify_and_jspi
9690
9690
def test_em_async_js (self ):
9691
9691
self .uses_es6 = True
9692
9692
if not self .get_setting ('ASYNCIFY' ):
0 commit comments