Skip to content

Commit f854ac0

Browse files
committed
chore: try to resolve test flakiness
1. Disclose test_offset_converter's unresponsiveness 2. Remove test_pthread_wait64_notify's TimeoutNegativeWarning
1 parent 52e3505 commit f854ac0

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

test/browser/test_offset_converter.c

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,15 @@ void magic_test_function(void) {
1212
out(x);
1313
fetch('http://localhost:8888?stdout=' + encodeURIComponent(x));
1414
}
15-
report('magic_test_function: input=' + $0);
16-
var converted = wasmOffsetConverter.getName($0);
17-
report('magic_test_function: converted=' + converted);
18-
return converted == 'magic_test_function';
15+
try {
16+
report('magic_test_function: input=' + $0);
17+
var converted = wasmOffsetConverter.getName($0);
18+
report('magic_test_function: converted=' + converted);
19+
return converted == 'magic_test_function';
20+
} catch (e) {
21+
report(e?.message + e?.stack);
22+
return false;
23+
}
1924
}, get_pc());
2025
assert(result);
2126
}

test/test_core.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2598,6 +2598,9 @@ def test_pthread_wait32_notify(self):
25982598
@node_pthreads
25992599
@no_wasm2js('https://github.com/WebAssembly/binaryen/issues/5991')
26002600
def test_pthread_wait64_notify(self):
2601+
# node version >= 23 warns on emscripten_set_timeout_loop
2602+
# that sets setTimeout with negative value
2603+
self.node_args += ['--disable-warning=TimeoutNegativeWarning']
26012604
self.do_run_in_out_file_test('atomic/test_wait64_notify.c')
26022605

26032606
@node_pthreads

0 commit comments

Comments
 (0)