Skip to content

Commit

Permalink
Cleanup test_wasm_worker_terminate. NFC (emscripten-core#22762)
Browse files Browse the repository at this point in the history
Split out from emscripten-core#22721
  • Loading branch information
sbc100 authored Oct 17, 2024
1 parent d5a6c39 commit 257b7d5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
5 changes: 1 addition & 4 deletions test/test_browser.py
Original file line number Diff line number Diff line change
Expand Up @@ -5059,10 +5059,7 @@ def test_wasm_worker_sleep(self):
# Tests emscripten_terminate_wasm_worker()
@also_with_minimal_runtime
def test_wasm_worker_terminate(self):
self.set_setting('WASM_WORKERS')
# Test uses the dynCall library function in its EM_ASM code
self.set_setting('DEFAULT_LIBRARY_FUNCS_TO_INCLUDE', ['$dynCall'])
self.btest('wasm_worker/terminate_wasm_worker.c', expected='0')
self.btest('wasm_worker/terminate_wasm_worker.c', expected='0', args=['-sWASM_WORKERS'])

# Tests emscripten_terminate_all_wasm_workers()
@also_with_minimal_runtime
Expand Down
3 changes: 3 additions & 0 deletions test/wasm_worker/terminate_wasm_worker.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include <emscripten/console.h>
#include <emscripten/em_asm.h>
#include <emscripten/em_js.h>
#include <emscripten/eventloop.h>
#include <emscripten/wasm_worker.h>
#include <assert.h>
Expand Down Expand Up @@ -36,6 +37,8 @@ void worker_main() {

char stack[1024];

EM_JS_DEPS(deps, "$dynCall");

int should_throw(void(*func)()) {
int threw = EM_ASM_INT({
try {
Expand Down

0 comments on commit 257b7d5

Please sign in to comment.