diff --git a/test/fixtures/wasi-preview-1.js b/test/fixtures/wasi-preview-1.js index 535bc3e5ec1..3fde5a30b75 100644 --- a/test/fixtures/wasi-preview-1.js +++ b/test/fixtures/wasi-preview-1.js @@ -68,6 +68,9 @@ assert.strictEqual(wasiPreview1.wasiImport, const name = `pthread-${tid}`; const sab = new SharedArrayBuffer(8 + 8192); const result = new Int32Array(sab); + // The thread stores 0 once it has loaded or 1 with an error; wait on a + // value neither of them writes so an early notify cannot be missed. + Atomics.store(result, 0, -1); const workerData = { name, @@ -106,7 +109,7 @@ assert.strictEqual(wasiPreview1.wasiImport, throw new Error(e); }); - const r = Atomics.wait(result, 0, 0, 1000); + const r = Atomics.wait(result, 0, -1, common.platformTimeout(30_000)); if (r === 'timed-out') { workers[tid].terminate(); delete workers[tid]; diff --git a/test/wasi/wasi.status b/test/wasi/wasi.status index 14b671b6e3b..a26617e0136 100644 --- a/test/wasi/wasi.status +++ b/test/wasi/wasi.status @@ -15,10 +15,3 @@ test-wasi-getrusage: SKIP # Unsupported on Windows and Android test-wasi-readdir: SKIP -[$system==win32 || $system==macos] -# https://github.com/nodejs/node/issues/64226#issuecomment-5423585588 -test-wasi-pthread: PASS, FLAKY - -[$system==linux] -# https://github.com/nodejs/node/issues/59146 -test-wasi-pthread: PASS, FLAKY