Skip to content

Commit d6a88c2

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 ae63509 commit d6a88c2

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
@@ -2604,6 +2604,9 @@ def test_pthread_wait32_notify(self):
26042604
@node_pthreads
26052605
@no_wasm2js('https://github.com/WebAssembly/binaryen/issues/5991')
26062606
def test_pthread_wait64_notify(self):
2607+
# node version >= 23 warns on emscripten_set_timeout_loop
2608+
# that sets setTimeout with negative value
2609+
self.node_args += ['--disable-warning=TimeoutNegativeWarning']
26072610
self.do_run_in_out_file_test('atomic/test_wait64_notify.c')
26082611

26092612
@node_pthreads

0 commit comments

Comments
 (0)