From f03c0c2de3f06fda12bd5be81f3b9b27344bd12d Mon Sep 17 00:00:00 2001 From: Rick Waldron Date: Wed, 8 Apr 2020 16:02:24 -0400 Subject: [PATCH] fixup! Atomics.waitAsync: no spurious wakeup on [operation] --- .../no-spurious-wakeup-no-operation.js | 40 ++++++++++--------- .../waitAsync/no-spurious-wakeup-on-add.js | 40 ++++++++++--------- .../waitAsync/no-spurious-wakeup-on-and.js | 40 ++++++++++--------- .../no-spurious-wakeup-on-compareExchange.js | 40 ++++++++++--------- .../no-spurious-wakeup-on-exchange.js | 40 ++++++++++--------- .../waitAsync/no-spurious-wakeup-on-or.js | 40 ++++++++++--------- .../waitAsync/no-spurious-wakeup-on-store.js | 40 ++++++++++--------- .../waitAsync/no-spurious-wakeup-on-sub.js | 40 ++++++++++--------- .../waitAsync/no-spurious-wakeup-on-xor.js | 40 ++++++++++--------- 9 files changed, 189 insertions(+), 171 deletions(-) diff --git a/test/built-ins/Atomics/waitAsync/no-spurious-wakeup-no-operation.js b/test/built-ins/Atomics/waitAsync/no-spurious-wakeup-no-operation.js index b2fae9030b..e10fc8fc64 100644 --- a/test/built-ins/Atomics/waitAsync/no-spurious-wakeup-no-operation.js +++ b/test/built-ins/Atomics/waitAsync/no-spurious-wakeup-no-operation.js @@ -22,6 +22,7 @@ info: | c. Perform NotifyWaiter(WL, waiterRecord). 4. Perform LeaveCriticalSection(WL). +flags: [async] includes: [atomicsHelper.js] features: [Atomics.waitAsync, SharedArrayBuffer, TypedArray, Atomics] ---*/ @@ -34,38 +35,39 @@ const i32a = new Int32Array( ); $262.agent.start(` - $262.agent.receiveBroadcast(async function(sab) => { + $262.agent.receiveBroadcast(async (sab) => { const i32a = new Int32Array(sab); Atomics.add(i32a, ${RUNNING}, 1); const before = $262.agent.monotonicNow(); const unpark = await Atomics.waitAsync(i32a, 0, 0, ${TIMEOUT}).value; const duration = $262.agent.monotonicNow() - before; + $262.agent.report(duration); $262.agent.report(unpark); $262.agent.leaving(); }); `); -$262.agent.safeBroadcast(i32a); -$262.agent.waitUntil(i32a, RUNNING, 1); -$262.agent.tryYield(); +$262.agent.safeBroadcastAsync(i32a, RUNNING, 1).then(async (agentCount) => { -// NO OPERATION OCCURS HERE! + Atomics.add(i32a, 0, 1); -assert( - $262.agent.getReport() >= TIMEOUT, - 'The result of `(lapse >= TIMEOUT)` is true' -); + assert.sameValue(agentCount, 1); -assert.sameValue( - $262.agent.getReport(), - 'timed-out', - 'await Atomics.wait(i32a, 0, 0, ${TIMEOUT}).value resolves to "timed-out"' -); + const lapse = await $262.agent.getReportAsync(); -assert.sameValue( - Atomics.notify(i32a, 0), - 0, - 'Atomics.notify(i32a, 0) returns 0' -); + assert( + lapse >= TIMEOUT, + 'The result of `(lapse >= TIMEOUT)` is true' + ); + + const result = await $262.agent.getReportAsync(); + + assert.sameValue( + result, + 'timed-out', + 'await Atomics.waitAsync(i32a, 0, 0, ${TIMEOUT}).value resolves to "timed-out"' + ); + assert.sameValue(Atomics.notify(i32a, 0), 0, 'Atomics.notify(i32a, 0) returns 0'); +}).then($DONE, $DONE); diff --git a/test/built-ins/Atomics/waitAsync/no-spurious-wakeup-on-add.js b/test/built-ins/Atomics/waitAsync/no-spurious-wakeup-on-add.js index d3fc85f722..49f7fe7f3b 100644 --- a/test/built-ins/Atomics/waitAsync/no-spurious-wakeup-on-add.js +++ b/test/built-ins/Atomics/waitAsync/no-spurious-wakeup-on-add.js @@ -21,6 +21,7 @@ info: | c. Perform NotifyWaiter(WL, waiterRecord). 4. Perform LeaveCriticalSection(WL). +flags: [async] includes: [atomicsHelper.js] features: [Atomics.waitAsync, SharedArrayBuffer, TypedArray, Atomics] ---*/ @@ -33,38 +34,39 @@ const i32a = new Int32Array( ); $262.agent.start(` - $262.agent.receiveBroadcast(async function(sab) => { + $262.agent.receiveBroadcast(async (sab) => { const i32a = new Int32Array(sab); Atomics.add(i32a, ${RUNNING}, 1); const before = $262.agent.monotonicNow(); const unpark = await Atomics.waitAsync(i32a, 0, 0, ${TIMEOUT}).value; const duration = $262.agent.monotonicNow() - before; + $262.agent.report(duration); $262.agent.report(unpark); $262.agent.leaving(); }); `); -$262.agent.safeBroadcast(i32a); -$262.agent.waitUntil(i32a, RUNNING, 1); -$262.agent.tryYield(); +$262.agent.safeBroadcastAsync(i32a, RUNNING, 1).then(async (agentCount) => { -Atomics.add(i32a, 0, 1); + assert.sameValue(agentCount, 1); -assert( - $262.agent.getReport() >= TIMEOUT, - 'The result of `(lapse >= TIMEOUT)` is true' -); + Atomics.add(i32a, 0, 1); -assert.sameValue( - $262.agent.getReport(), - 'timed-out', - 'await Atomics.wait(i32a, 0, 0, ${TIMEOUT}).value resolves to "timed-out"' -); + const lapse = await $262.agent.getReportAsync(); -assert.sameValue( - Atomics.notify(i32a, 0), - 0, - 'Atomics.notify(i32a, 0) returns 0' -); + assert( + lapse >= TIMEOUT, + 'The result of `(lapse >= TIMEOUT)` is true' + ); + + const result = await $262.agent.getReportAsync(); + + assert.sameValue( + result, + 'timed-out', + 'await Atomics.waitAsync(i32a, 0, 0, ${TIMEOUT}).value resolves to "timed-out"' + ); + assert.sameValue(Atomics.notify(i32a, 0), 0, 'Atomics.notify(i32a, 0) returns 0'); +}).then($DONE, $DONE); diff --git a/test/built-ins/Atomics/waitAsync/no-spurious-wakeup-on-and.js b/test/built-ins/Atomics/waitAsync/no-spurious-wakeup-on-and.js index 05265e9bf0..ad685bc74e 100644 --- a/test/built-ins/Atomics/waitAsync/no-spurious-wakeup-on-and.js +++ b/test/built-ins/Atomics/waitAsync/no-spurious-wakeup-on-and.js @@ -21,6 +21,7 @@ info: | c. Perform NotifyWaiter(WL, waiterRecord). 4. Perform LeaveCriticalSection(WL). +flags: [async] includes: [atomicsHelper.js] features: [Atomics.waitAsync, SharedArrayBuffer, TypedArray, Atomics] ---*/ @@ -33,38 +34,39 @@ const i32a = new Int32Array( ); $262.agent.start(` - $262.agent.receiveBroadcast(async function(sab) => { + $262.agent.receiveBroadcast(async (sab) => { const i32a = new Int32Array(sab); Atomics.add(i32a, ${RUNNING}, 1); const before = $262.agent.monotonicNow(); const unpark = await Atomics.waitAsync(i32a, 0, 0, ${TIMEOUT}).value; const duration = $262.agent.monotonicNow() - before; + $262.agent.report(duration); $262.agent.report(unpark); $262.agent.leaving(); }); `); -$262.agent.safeBroadcast(i32a); -$262.agent.waitUntil(i32a, RUNNING, 1); -$262.agent.tryYield(); +$262.agent.safeBroadcastAsync(i32a, RUNNING, 1).then(async (agentCount) => { -Atomics.and(i32a, 0, 1); + assert.sameValue(agentCount, 1); -assert( - $262.agent.getReport() >= TIMEOUT, - 'The result of `(lapse >= TIMEOUT)` is true' -); + Atomics.and(i32a, 0, 1); -assert.sameValue( - $262.agent.getReport(), - 'timed-out', - 'await Atomics.wait(i32a, 0, 0, ${TIMEOUT}).value resolves to "timed-out"' -); + const lapse = await $262.agent.getReportAsync(); -assert.sameValue( - Atomics.notify(i32a, 0), - 0, - 'Atomics.notify(i32a, 0) returns 0' -); + assert( + lapse >= TIMEOUT, + 'The result of `(lapse >= TIMEOUT)` is true' + ); + + const result = await $262.agent.getReportAsync(); + + assert.sameValue( + result, + 'timed-out', + 'await Atomics.waitAsync(i32a, 0, 0, ${TIMEOUT}).value resolves to "timed-out"' + ); + assert.sameValue(Atomics.notify(i32a, 0), 0, 'Atomics.notify(i32a, 0) returns 0'); +}).then($DONE, $DONE); diff --git a/test/built-ins/Atomics/waitAsync/no-spurious-wakeup-on-compareExchange.js b/test/built-ins/Atomics/waitAsync/no-spurious-wakeup-on-compareExchange.js index c28b63cfcc..f50c92adeb 100644 --- a/test/built-ins/Atomics/waitAsync/no-spurious-wakeup-on-compareExchange.js +++ b/test/built-ins/Atomics/waitAsync/no-spurious-wakeup-on-compareExchange.js @@ -21,6 +21,7 @@ info: | c. Perform NotifyWaiter(WL, waiterRecord). 4. Perform LeaveCriticalSection(WL). +flags: [async] includes: [atomicsHelper.js] features: [Atomics.waitAsync, SharedArrayBuffer, TypedArray, Atomics] ---*/ @@ -33,38 +34,39 @@ const i32a = new Int32Array( ); $262.agent.start(` - $262.agent.receiveBroadcast(async function(sab) => { + $262.agent.receiveBroadcast(async (sab) => { const i32a = new Int32Array(sab); Atomics.add(i32a, ${RUNNING}, 1); const before = $262.agent.monotonicNow(); const unpark = await Atomics.waitAsync(i32a, 0, 0, ${TIMEOUT}).value; const duration = $262.agent.monotonicNow() - before; + $262.agent.report(duration); $262.agent.report(unpark); $262.agent.leaving(); }); `); -$262.agent.safeBroadcast(i32a); -$262.agent.waitUntil(i32a, RUNNING, 1); -$262.agent.tryYield(); +$262.agent.safeBroadcastAsync(i32a, RUNNING, 1).then(async (agentCount) => { -Atomics.compareExchange(i32a, 0, 0, 1); + assert.sameValue(agentCount, 1); -assert( - $262.agent.getReport() >= TIMEOUT, - 'The result of `(lapse >= TIMEOUT)` is true' -); + Atomics.compareExchange(i32a, 0, 0, 1); -assert.sameValue( - $262.agent.getReport(), - 'timed-out', - 'await Atomics.wait(i32a, 0, 0, ${TIMEOUT}).value resolves to "timed-out"' -); + const lapse = await $262.agent.getReportAsync(); -assert.sameValue( - Atomics.notify(i32a, 0), - 0, - 'Atomics.notify(i32a, 0) returns 0' -); + assert( + lapse >= TIMEOUT, + 'The result of `(lapse >= TIMEOUT)` is true' + ); + + const result = await $262.agent.getReportAsync(); + + assert.sameValue( + result, + 'timed-out', + 'await Atomics.waitAsync(i32a, 0, 0, ${TIMEOUT}).value resolves to "timed-out"' + ); + assert.sameValue(Atomics.notify(i32a, 0), 0, 'Atomics.notify(i32a, 0) returns 0'); +}).then($DONE, $DONE); diff --git a/test/built-ins/Atomics/waitAsync/no-spurious-wakeup-on-exchange.js b/test/built-ins/Atomics/waitAsync/no-spurious-wakeup-on-exchange.js index d71cd1238d..9f3331ddc3 100644 --- a/test/built-ins/Atomics/waitAsync/no-spurious-wakeup-on-exchange.js +++ b/test/built-ins/Atomics/waitAsync/no-spurious-wakeup-on-exchange.js @@ -21,6 +21,7 @@ info: | c. Perform NotifyWaiter(WL, waiterRecord). 4. Perform LeaveCriticalSection(WL). +flags: [async] includes: [atomicsHelper.js] features: [Atomics.waitAsync, SharedArrayBuffer, TypedArray, Atomics] ---*/ @@ -33,38 +34,39 @@ const i32a = new Int32Array( ); $262.agent.start(` - $262.agent.receiveBroadcast(async function(sab) => { + $262.agent.receiveBroadcast(async (sab) => { const i32a = new Int32Array(sab); Atomics.add(i32a, ${RUNNING}, 1); const before = $262.agent.monotonicNow(); const unpark = await Atomics.waitAsync(i32a, 0, 0, ${TIMEOUT}).value; const duration = $262.agent.monotonicNow() - before; + $262.agent.report(duration); $262.agent.report(unpark); $262.agent.leaving(); }); `); -$262.agent.safeBroadcast(i32a); -$262.agent.waitUntil(i32a, RUNNING, 1); -$262.agent.tryYield(); +$262.agent.safeBroadcastAsync(i32a, RUNNING, 1).then(async (agentCount) => { -Atomics.exchange(i32a, 0, 1); + assert.sameValue(agentCount, 1); -assert( - $262.agent.getReport() >= TIMEOUT, - 'The result of `(lapse >= TIMEOUT)` is true' -); + Atomics.exchange(i32a, 0, 1); -assert.sameValue( - $262.agent.getReport(), - 'timed-out', - 'await Atomics.wait(i32a, 0, 0, ${TIMEOUT}).value resolves to "timed-out"' -); + const lapse = await $262.agent.getReportAsync(); -assert.sameValue( - Atomics.notify(i32a, 0), - 0, - 'Atomics.notify(i32a, 0) returns 0' -); + assert( + lapse >= TIMEOUT, + 'The result of `(lapse >= TIMEOUT)` is true' + ); + + const result = await $262.agent.getReportAsync(); + + assert.sameValue( + result, + 'timed-out', + 'await Atomics.waitAsync(i32a, 0, 0, ${TIMEOUT}).value resolves to "timed-out"' + ); + assert.sameValue(Atomics.notify(i32a, 0), 0, 'Atomics.notify(i32a, 0) returns 0'); +}).then($DONE, $DONE); diff --git a/test/built-ins/Atomics/waitAsync/no-spurious-wakeup-on-or.js b/test/built-ins/Atomics/waitAsync/no-spurious-wakeup-on-or.js index cc0beeebf1..a304ef821c 100644 --- a/test/built-ins/Atomics/waitAsync/no-spurious-wakeup-on-or.js +++ b/test/built-ins/Atomics/waitAsync/no-spurious-wakeup-on-or.js @@ -21,6 +21,7 @@ info: | c. Perform NotifyWaiter(WL, waiterRecord). 4. Perform LeaveCriticalSection(WL). +flags: [async] includes: [atomicsHelper.js] features: [Atomics.waitAsync, SharedArrayBuffer, TypedArray, Atomics] ---*/ @@ -33,38 +34,39 @@ const i32a = new Int32Array( ); $262.agent.start(` - $262.agent.receiveBroadcast(async function(sab) => { + $262.agent.receiveBroadcast(async (sab) => { const i32a = new Int32Array(sab); Atomics.add(i32a, ${RUNNING}, 1); const before = $262.agent.monotonicNow(); const unpark = await Atomics.waitAsync(i32a, 0, 0, ${TIMEOUT}).value; const duration = $262.agent.monotonicNow() - before; + $262.agent.report(duration); $262.agent.report(unpark); $262.agent.leaving(); }); `); -$262.agent.safeBroadcast(i32a); -$262.agent.waitUntil(i32a, RUNNING, 1); -$262.agent.tryYield(); +$262.agent.safeBroadcastAsync(i32a, RUNNING, 1).then(async (agentCount) => { -Atomics.or(i32a, 0, 1); + assert.sameValue(agentCount, 1); -assert( - $262.agent.getReport() >= TIMEOUT, - 'The result of `(lapse >= TIMEOUT)` is true' -); + Atomics.or(i32a, 0, 1); -assert.sameValue( - $262.agent.getReport(), - 'timed-out', - 'await Atomics.wait(i32a, 0, 0, ${TIMEOUT}).value resolves to "timed-out"' -); + const lapse = await $262.agent.getReportAsync(); -assert.sameValue( - Atomics.notify(i32a, 0), - 0, - 'Atomics.notify(i32a, 0) returns 0' -); + assert( + lapse >= TIMEOUT, + 'The result of `(lapse >= TIMEOUT)` is true' + ); + + const result = await $262.agent.getReportAsync(); + + assert.sameValue( + result, + 'timed-out', + 'await Atomics.waitAsync(i32a, 0, 0, ${TIMEOUT}).value resolves to "timed-out"' + ); + assert.sameValue(Atomics.notify(i32a, 0), 0, 'Atomics.notify(i32a, 0) returns 0'); +}).then($DONE, $DONE); diff --git a/test/built-ins/Atomics/waitAsync/no-spurious-wakeup-on-store.js b/test/built-ins/Atomics/waitAsync/no-spurious-wakeup-on-store.js index abc7de1965..01dd07696c 100644 --- a/test/built-ins/Atomics/waitAsync/no-spurious-wakeup-on-store.js +++ b/test/built-ins/Atomics/waitAsync/no-spurious-wakeup-on-store.js @@ -21,6 +21,7 @@ info: | c. Perform NotifyWaiter(WL, waiterRecord). 4. Perform LeaveCriticalSection(WL). +flags: [async] includes: [atomicsHelper.js] features: [Atomics.waitAsync, SharedArrayBuffer, TypedArray, Atomics] ---*/ @@ -33,38 +34,39 @@ const i32a = new Int32Array( ); $262.agent.start(` - $262.agent.receiveBroadcast(async function(sab) => { + $262.agent.receiveBroadcast(async (sab) => { const i32a = new Int32Array(sab); Atomics.add(i32a, ${RUNNING}, 1); const before = $262.agent.monotonicNow(); const unpark = await Atomics.waitAsync(i32a, 0, 0, ${TIMEOUT}).value; const duration = $262.agent.monotonicNow() - before; + $262.agent.report(duration); $262.agent.report(unpark); $262.agent.leaving(); }); `); -$262.agent.safeBroadcast(i32a); -$262.agent.waitUntil(i32a, RUNNING, 1); -$262.agent.tryYield(); +$262.agent.safeBroadcastAsync(i32a, RUNNING, 1).then(async (agentCount) => { -Atomics.store(i32a, 0, 0x111111); + assert.sameValue(agentCount, 1); -assert( - $262.agent.getReport() >= TIMEOUT, - 'The result of `(lapse >= TIMEOUT)` is true' -); + Atomics.store(i32a, 0, 0b1010); -assert.sameValue( - $262.agent.getReport(), - 'timed-out', - 'await Atomics.wait(i32a, 0, 0, ${TIMEOUT}).value resolves to "timed-out"' -); + const lapse = await $262.agent.getReportAsync(); -assert.sameValue( - Atomics.notify(i32a, 0), - 0, - 'Atomics.notify(i32a, 0) returns 0' -); + assert( + lapse >= TIMEOUT, + 'The result of `(lapse >= TIMEOUT)` is true' + ); + + const result = await $262.agent.getReportAsync(); + + assert.sameValue( + result, + 'timed-out', + 'await Atomics.waitAsync(i32a, 0, 0, ${TIMEOUT}).value resolves to "timed-out"' + ); + assert.sameValue(Atomics.notify(i32a, 0), 0, 'Atomics.notify(i32a, 0) returns 0'); +}).then($DONE, $DONE); diff --git a/test/built-ins/Atomics/waitAsync/no-spurious-wakeup-on-sub.js b/test/built-ins/Atomics/waitAsync/no-spurious-wakeup-on-sub.js index e9c7f9de02..ffa3aeed57 100644 --- a/test/built-ins/Atomics/waitAsync/no-spurious-wakeup-on-sub.js +++ b/test/built-ins/Atomics/waitAsync/no-spurious-wakeup-on-sub.js @@ -22,6 +22,7 @@ info: | c. Perform NotifyWaiter(WL, waiterRecord). 4. Perform LeaveCriticalSection(WL). +flags: [async] includes: [atomicsHelper.js] features: [Atomics.waitAsync, SharedArrayBuffer, TypedArray, Atomics] ---*/ @@ -34,38 +35,39 @@ const i32a = new Int32Array( ); $262.agent.start(` - $262.agent.receiveBroadcast(async function(sab) => { + $262.agent.receiveBroadcast(async (sab) => { const i32a = new Int32Array(sab); Atomics.add(i32a, ${RUNNING}, 1); const before = $262.agent.monotonicNow(); const unpark = await Atomics.waitAsync(i32a, 0, 0, ${TIMEOUT}).value; const duration = $262.agent.monotonicNow() - before; + $262.agent.report(duration); $262.agent.report(unpark); $262.agent.leaving(); }); `); -$262.agent.safeBroadcast(i32a); -$262.agent.waitUntil(i32a, RUNNING, 1); -$262.agent.tryYield(); +$262.agent.safeBroadcastAsync(i32a, RUNNING, 1).then(async (agentCount) => { -Atomics.sub(i32a, 0, 1); + assert.sameValue(agentCount, 1); -assert( - $262.agent.getReport() >= TIMEOUT, - 'The result of `(lapse >= TIMEOUT)` is true' -); + Atomics.sub(i32a, 0, 1); -assert.sameValue( - $262.agent.getReport(), - 'timed-out', - 'await Atomics.wait(i32a, 0, 0, ${TIMEOUT}).value resolves to "timed-out"' -); + const lapse = await $262.agent.getReportAsync(); -assert.sameValue( - Atomics.notify(i32a, 0), - 0, - 'Atomics.notify(i32a, 0) returns 0' -); + assert( + lapse >= TIMEOUT, + 'The result of `(lapse >= TIMEOUT)` is true' + ); + + const result = await $262.agent.getReportAsync(); + + assert.sameValue( + result, + 'timed-out', + 'await Atomics.waitAsync(i32a, 0, 0, ${TIMEOUT}).value resolves to "timed-out"' + ); + assert.sameValue(Atomics.notify(i32a, 0), 0, 'Atomics.notify(i32a, 0) returns 0'); +}).then($DONE, $DONE); diff --git a/test/built-ins/Atomics/waitAsync/no-spurious-wakeup-on-xor.js b/test/built-ins/Atomics/waitAsync/no-spurious-wakeup-on-xor.js index a59d9dbf45..43e3324dc4 100644 --- a/test/built-ins/Atomics/waitAsync/no-spurious-wakeup-on-xor.js +++ b/test/built-ins/Atomics/waitAsync/no-spurious-wakeup-on-xor.js @@ -22,6 +22,7 @@ info: | c. Perform NotifyWaiter(WL, waiterRecord). 4. Perform LeaveCriticalSection(WL). +flags: [async] includes: [atomicsHelper.js] features: [Atomics.waitAsync, SharedArrayBuffer, TypedArray, Atomics] ---*/ @@ -34,38 +35,39 @@ const i32a = new Int32Array( ); $262.agent.start(` - $262.agent.receiveBroadcast(async function(sab) => { + $262.agent.receiveBroadcast(async (sab) => { const i32a = new Int32Array(sab); Atomics.add(i32a, ${RUNNING}, 1); const before = $262.agent.monotonicNow(); const unpark = await Atomics.waitAsync(i32a, 0, 0, ${TIMEOUT}).value; const duration = $262.agent.monotonicNow() - before; + $262.agent.report(duration); $262.agent.report(unpark); $262.agent.leaving(); }); `); -$262.agent.safeBroadcast(i32a); -$262.agent.waitUntil(i32a, RUNNING, 1); -$262.agent.tryYield(); +$262.agent.safeBroadcastAsync(i32a, RUNNING, 1).then(async (agentCount) => { -Atomics.xor(i32a, 0, 1); + assert.sameValue(agentCount, 1); -assert( - $262.agent.getReport() >= TIMEOUT, - 'The result of `(lapse >= TIMEOUT)` is true' -); + Atomics.xor(i32a, 0, 1); -assert.sameValue( - $262.agent.getReport(), - 'timed-out', - 'await Atomics.wait(i32a, 0, 0, ${TIMEOUT}).value resolves to "timed-out"' -); + const lapse = await $262.agent.getReportAsync(); -assert.sameValue( - Atomics.notify(i32a, 0), - 0, - 'Atomics.notify(i32a, 0) returns 0' -); + assert( + lapse >= TIMEOUT, + 'The result of `(lapse >= TIMEOUT)` is true' + ); + + const result = await $262.agent.getReportAsync(); + + assert.sameValue( + result, + 'timed-out', + 'await Atomics.waitAsync(i32a, 0, 0, ${TIMEOUT}).value resolves to "timed-out"' + ); + assert.sameValue(Atomics.notify(i32a, 0), 0, 'Atomics.notify(i32a, 0) returns 0'); +}).then($DONE, $DONE);