@@ -5003,7 +5003,7 @@ def test_wasm_worker_hello_embedded(self):
50035003 'pthread' : (['-pthread' ],),
50045004 })
50055005 def test_wasm_worker_futex_wait (self , args ):
5006- self .btest ('wasm_worker/wasm_worker_futex_wait.c' , expected = '0 ' , args = ['-sWASM_WORKERS=1' , '-sASSERTIONS' ] + args )
5006+ self .btest_exit ('wasm_worker/wasm_worker_futex_wait.c' , args = ['-sWASM_WORKERS=1' , '-sASSERTIONS' ] + args )
50075007
50085008 # Tests Wasm Worker thread stack setup
50095009 @also_with_minimal_runtime
@@ -5013,48 +5013,48 @@ def test_wasm_worker_futex_wait(self, args):
50135013 '2' : (2 ,),
50145014 })
50155015 def test_wasm_worker_thread_stack (self , mode ):
5016- self .btest ('wasm_worker/thread_stack.c' , expected = '0 ' , args = ['-sWASM_WORKERS' , f'-sSTACK_OVERFLOW_CHECK={ mode } ' ])
5016+ self .btest_exit ('wasm_worker/thread_stack.c' , args = ['-sWASM_WORKERS' , f'-sSTACK_OVERFLOW_CHECK={ mode } ' ])
50175017
50185018 # Tests emscripten_malloc_wasm_worker() and emscripten_current_thread_is_wasm_worker() functions
50195019 @also_with_minimal_runtime
50205020 def test_wasm_worker_malloc (self ):
5021- self .btest ('wasm_worker/malloc_wasm_worker.c' , expected = '0 ' , args = ['-sWASM_WORKERS' ])
5021+ self .btest_exit ('wasm_worker/malloc_wasm_worker.c' , args = ['-sWASM_WORKERS' ])
50225022
50235023 # Tests Wasm Worker+pthreads simultaneously
50245024 @also_with_minimal_runtime
50255025 def test_wasm_worker_and_pthreads (self ):
5026- self .btest ('wasm_worker/wasm_worker_and_pthread.c' , expected = '0 ' , args = ['-sWASM_WORKERS' , '-pthread' ])
5026+ self .btest_exit ('wasm_worker/wasm_worker_and_pthread.c' , args = ['-sWASM_WORKERS' , '-pthread' ])
50275027
50285028 # Tests emscripten_wasm_worker_self_id() function
50295029 @also_with_minimal_runtime
50305030 def test_wasm_worker_self_id (self ):
5031- self .btest ('wasm_worker/wasm_worker_self_id.c' , expected = '0 ' , args = ['-sWASM_WORKERS' ])
5031+ self .btest_exit ('wasm_worker/wasm_worker_self_id.c' , args = ['-sWASM_WORKERS' ])
50325032
50335033 # Tests direct Wasm Assembly .S file based TLS variables in Wasm Workers
50345034 @also_with_minimal_runtime
50355035 def test_wasm_worker_tls_wasm_assembly (self ):
5036- self .btest ('wasm_worker/wasm_worker_tls_wasm_assembly.c' ,
5037- expected = '42' , args = ['-sWASM_WORKERS' , test_file ('wasm_worker/wasm_worker_tls_wasm_assembly.S' )])
5036+ self .btest_exit ('wasm_worker/wasm_worker_tls_wasm_assembly.c' ,
5037+ args = ['-sWASM_WORKERS' , test_file ('wasm_worker/wasm_worker_tls_wasm_assembly.S' )])
50385038
50395039 # Tests C++11 keyword thread_local for TLS in Wasm Workers
50405040 @also_with_minimal_runtime
50415041 def test_wasm_worker_cpp11_thread_local (self ):
5042- self .btest ('wasm_worker/cpp11_thread_local.cpp' , expected = '42 ' , args = ['-sWASM_WORKERS' ])
5042+ self .btest_exit ('wasm_worker/cpp11_thread_local.cpp' , args = ['-sWASM_WORKERS' ])
50435043
50445044 # Tests C11 keyword _Thread_local for TLS in Wasm Workers
50455045 @also_with_minimal_runtime
50465046 def test_wasm_worker_c11__Thread_local (self ):
5047- self .btest ('wasm_worker/c11__Thread_local.c' , expected = '42 ' , args = ['-sWASM_WORKERS' , '-std=gnu11' ]) # Cannot test C11 - because of EM_ASM must test Gnu11.
5047+ self .btest_exit ('wasm_worker/c11__Thread_local.c' , args = ['-sWASM_WORKERS' , '-std=gnu11' ]) # Cannot test C11 - because of EM_ASM must test Gnu11.
50485048
50495049 # Tests GCC specific extension keyword __thread for TLS in Wasm Workers
50505050 @also_with_minimal_runtime
50515051 def test_wasm_worker_gcc___thread (self ):
5052- self .btest ('wasm_worker/gcc___Thread.c' , expected = '42 ' , args = ['-sWASM_WORKERS' , '-std=gnu11' ])
5052+ self .btest_exit ('wasm_worker/gcc___Thread.c' , args = ['-sWASM_WORKERS' , '-std=gnu11' ])
50535053
50545054 # Tests emscripten_wasm_worker_sleep()
50555055 @also_with_minimal_runtime
50565056 def test_wasm_worker_sleep (self ):
5057- self .btest ('wasm_worker/wasm_worker_sleep.c' , expected = '1 ' , args = ['-sWASM_WORKERS' ])
5057+ self .btest_exit ('wasm_worker/wasm_worker_sleep.c' , args = ['-sWASM_WORKERS' ])
50585058
50595059 # Tests emscripten_terminate_wasm_worker()
50605060 @also_with_minimal_runtime
@@ -5064,71 +5064,70 @@ def test_wasm_worker_terminate(self):
50645064 # Tests emscripten_terminate_all_wasm_workers()
50655065 @also_with_minimal_runtime
50665066 def test_wasm_worker_terminate_all (self ):
5067- self .set_setting ('WASM_WORKERS' )
50685067 # Test uses the dynCall library function in its EM_ASM code
50695068 self .set_setting ('DEFAULT_LIBRARY_FUNCS_TO_INCLUDE' , ['$dynCall' ])
5070- self .btest ('wasm_worker/terminate_all_wasm_workers.c' , expected = '0' )
5069+ self .btest_exit ('wasm_worker/terminate_all_wasm_workers.c' , args = [ '-sWASM_WORKERS' ] )
50715070
50725071 # Tests emscripten_wasm_worker_post_function_*() API
50735072 @also_with_minimal_runtime
50745073 def test_wasm_worker_post_function (self ):
5075- self .btest ('wasm_worker/post_function.c' , expected = '8 ' , args = ['-sWASM_WORKERS' ])
5074+ self .btest_exit ('wasm_worker/post_function.c' , args = ['-sWASM_WORKERS' ])
50765075
50775076 # Tests emscripten_wasm_worker_post_function_*() API and EMSCRIPTEN_WASM_WORKER_ID_PARENT
50785077 # to send a message back from Worker to its parent thread.
50795078 @also_with_minimal_runtime
50805079 def test_wasm_worker_post_function_to_main_thread (self ):
5081- self .btest ('wasm_worker/post_function_to_main_thread.c' , expected = '10 ' , args = ['-sWASM_WORKERS' ])
5080+ self .btest_exit ('wasm_worker/post_function_to_main_thread.c' , args = ['-sWASM_WORKERS' ])
50825081
50835082 # Tests emscripten_navigator_hardware_concurrency() and emscripten_atomics_is_lock_free()
50845083 @also_with_minimal_runtime
50855084 def test_wasm_worker_hardware_concurrency_is_lock_free (self ):
5086- self .btest ('wasm_worker/hardware_concurrency_is_lock_free.c' , expected = '0 ' , args = ['-sWASM_WORKERS' ])
5085+ self .btest_exit ('wasm_worker/hardware_concurrency_is_lock_free.c' , args = ['-sWASM_WORKERS' ])
50875086
50885087 # Tests emscripten_atomic_wait_u32() and emscripten_atomic_notify() functions.
50895088 @also_with_minimal_runtime
50905089 def test_wasm_worker_wait32_notify (self ):
5091- self .btest ('atomic/test_wait32_notify.c' , expected = '3 ' , args = ['-sWASM_WORKERS' ])
5090+ self .btest_exit ('atomic/test_wait32_notify.c' , args = ['-sWASM_WORKERS' ])
50925091
50935092 # Tests emscripten_atomic_wait_u64() and emscripten_atomic_notify() functions.
50945093 @also_with_minimal_runtime
50955094 def test_wasm_worker_wait64_notify (self ):
5096- self .btest ('atomic/test_wait64_notify.c' , expected = '3 ' , args = ['-sWASM_WORKERS' ])
5095+ self .btest_exit ('atomic/test_wait64_notify.c' , args = ['-sWASM_WORKERS' ])
50975096
50985097 # Tests emscripten_atomic_wait_async() function.
50995098 @also_with_minimal_runtime
51005099 def test_wasm_worker_wait_async (self ):
5101- self .btest ('atomic/test_wait_async.c' , expected = '0 ' , args = ['-sWASM_WORKERS' ])
5100+ self .btest_exit ('atomic/test_wait_async.c' , args = ['-sWASM_WORKERS' ])
51025101
51035102 # Tests emscripten_atomic_cancel_wait_async() function.
51045103 @also_with_minimal_runtime
51055104 def test_wasm_worker_cancel_wait_async (self ):
5106- self .btest ('wasm_worker/cancel_wait_async.c' , expected = '1 ' , args = ['-sWASM_WORKERS' ])
5105+ self .btest_exit ('wasm_worker/cancel_wait_async.c' , args = ['-sWASM_WORKERS' ])
51075106
51085107 # Tests emscripten_atomic_cancel_all_wait_asyncs() function.
51095108 @also_with_minimal_runtime
51105109 def test_wasm_worker_cancel_all_wait_asyncs (self ):
5111- self .btest ('wasm_worker/cancel_all_wait_asyncs.c' , expected = '1 ' , args = ['-sWASM_WORKERS' ])
5110+ self .btest_exit ('wasm_worker/cancel_all_wait_asyncs.c' , args = ['-sWASM_WORKERS' ])
51125111
51135112 # Tests emscripten_atomic_cancel_all_wait_asyncs_at_address() function.
51145113 @also_with_minimal_runtime
51155114 def test_wasm_worker_cancel_all_wait_asyncs_at_address (self ):
5116- self .btest ('wasm_worker/cancel_all_wait_asyncs_at_address.c' , expected = '1 ' , args = ['-sWASM_WORKERS' ])
5115+ self .btest_exit ('wasm_worker/cancel_all_wait_asyncs_at_address.c' , args = ['-sWASM_WORKERS' ])
51175116
51185117 # Tests emscripten_lock_init(), emscripten_lock_waitinf_acquire() and emscripten_lock_release()
51195118 @also_with_minimal_runtime
51205119 def test_wasm_worker_lock_waitinf (self ):
5121- self .btest ('wasm_worker/lock_waitinf_acquire.c' , expected = '4000 ' , args = ['-sWASM_WORKERS' ])
5120+ self .btest_exit ('wasm_worker/lock_waitinf_acquire.c' , args = ['-sWASM_WORKERS' ])
51225121
51235122 # Tests emscripten_lock_wait_acquire() and emscripten_lock_try_acquire() in Worker.
51245123 @also_with_minimal_runtime
51255124 def test_wasm_worker_lock_wait (self ):
5126- self .btest ('wasm_worker/lock_wait_acquire.c' , expected = '0 ' , args = ['-sWASM_WORKERS' ])
5125+ self .btest_exit ('wasm_worker/lock_wait_acquire.c' , args = ['-sWASM_WORKERS' ])
51275126
51285127 # Tests emscripten_lock_wait_acquire() between two Wasm Workers.
51295128 @also_with_minimal_runtime
51305129 def test_wasm_worker_lock_wait2 (self ):
5131- self .btest ('wasm_worker/lock_wait_acquire2.c' , expected = '0 ' , args = ['-sWASM_WORKERS' ])
5130+ self .btest_exit ('wasm_worker/lock_wait_acquire2.c' , args = ['-sWASM_WORKERS' ])
51325131
51335132 # Tests emscripten_lock_async_acquire() function.
51345133 @also_with_minimal_runtime
@@ -5138,12 +5137,12 @@ def test_wasm_worker_lock_async_acquire(self):
51385137 # Tests emscripten_lock_busyspin_wait_acquire() in Worker and main thread.
51395138 @also_with_minimal_runtime
51405139 def test_wasm_worker_lock_busyspin_wait (self ):
5141- self .btest ('wasm_worker/lock_busyspin_wait_acquire.c' , expected = '0 ' , args = ['-sWASM_WORKERS' ])
5140+ self .btest_exit ('wasm_worker/lock_busyspin_wait_acquire.c' , args = ['-sWASM_WORKERS' ])
51425141
51435142 # Tests emscripten_lock_busyspin_waitinf_acquire() in Worker and main thread.
51445143 @also_with_minimal_runtime
51455144 def test_wasm_worker_lock_busyspin_waitinf (self ):
5146- self .btest ('wasm_worker/lock_busyspin_waitinf_acquire.c' , expected = '1 ' , args = ['-sWASM_WORKERS' ])
5145+ self .btest_exit ('wasm_worker/lock_busyspin_waitinf_acquire.c' , args = ['-sWASM_WORKERS' ])
51475146
51485147 # Tests that proxied JS functions cannot be called from Wasm Workers
51495148 @also_with_minimal_runtime
@@ -5152,18 +5151,18 @@ def test_wasm_worker_no_proxied_js_functions(self):
51525151 self .set_setting ('ASSERTIONS' )
51535152 # Test uses the dynCall library function in its EM_ASM code
51545153 self .set_setting ('DEFAULT_LIBRARY_FUNCS_TO_INCLUDE' , ['$dynCall' ])
5155- self .btest ('wasm_worker/no_proxied_js_functions.c' , expected = '0 ' ,
5156- args = ['--js-library' , test_file ('wasm_worker/no_proxied_js_functions.js' )])
5154+ self .btest_exit ('wasm_worker/no_proxied_js_functions.c' ,
5155+ args = ['--js-library' , test_file ('wasm_worker/no_proxied_js_functions.js' )])
51575156
51585157 # Tests emscripten_semaphore_init(), emscripten_semaphore_waitinf_acquire() and emscripten_semaphore_release()
51595158 @also_with_minimal_runtime
51605159 def test_wasm_worker_semaphore_waitinf_acquire (self ):
5161- self .btest ('wasm_worker/semaphore_waitinf_acquire.c' , expected = '0 ' , args = ['-sWASM_WORKERS' ])
5160+ self .btest_exit ('wasm_worker/semaphore_waitinf_acquire.c' , args = ['-sWASM_WORKERS' ])
51625161
51635162 # Tests emscripten_semaphore_try_acquire() on the main thread
51645163 @also_with_minimal_runtime
51655164 def test_wasm_worker_semaphore_try_acquire (self ):
5166- self .btest ('wasm_worker/semaphore_try_acquire.c' , expected = '0 ' , args = ['-sWASM_WORKERS' ])
5165+ self .btest_exit ('wasm_worker/semaphore_try_acquire.c' , args = ['-sWASM_WORKERS' ])
51675166
51685167 # Tests that calling any proxied function in a Wasm Worker will abort at runtime when ASSERTIONS are enabled.
51695168 def test_wasm_worker_proxied_function (self ):
0 commit comments