diff --git a/harness/atomicsHelper.js b/harness/atomicsHelper.js index c9a20388f3d389f0cc633639af85e6329e209d30..aa308a3387a2f6cf61d555dd1aac6f65cb43b92d 100644 --- a/harness/atomicsHelper.js +++ b/harness/atomicsHelper.js @@ -5,13 +5,6 @@ description: > Collection of functions used to interact with Atomics.* operations across agent boundaries. ---*/ -/** - * The amount of slack allowed for testing time-related Atomics methods (i.e. wait and notify). - * The absolute value of the difference of the observed time and the expected time must - * be epsilon-close. - */ -$262.agent.MAX_TIME_EPSILON = 100; - /** * @return {String} A report sent from an agent. */ diff --git a/test/built-ins/Atomics/wait/bigint/false-for-timeout-agent.js b/test/built-ins/Atomics/wait/bigint/false-for-timeout-agent.js index 219db0b56a9745f8c4bdfc4bc35a7f7270520b22..e7987f30b99a90df9bd517b6f484c9e0d27024df 100644 --- a/test/built-ins/Atomics/wait/bigint/false-for-timeout-agent.js +++ b/test/built-ins/Atomics/wait/bigint/false-for-timeout-agent.js @@ -35,16 +35,13 @@ $262.agent.start(` const i64a = new BigInt64Array(sab); Atomics.add(i64a, ${RUNNING}, 1n); - const before = $262.agent.monotonicNow(); const status1 = Atomics.wait(i64a, 0, 0n, false); const status2 = Atomics.wait(i64a, 0, 0n, valueOf); const status3 = Atomics.wait(i64a, 0, 0n, toPrimitive); - const duration = $262.agent.monotonicNow() - before; $262.agent.report(status1); $262.agent.report(status2); $262.agent.report(status3); - $262.agent.report(duration); $262.agent.leaving(); }); `); @@ -75,10 +72,4 @@ assert.sameValue( '$262.agent.getReport() returns "timed-out"' ); -const lapse = $262.agent.getReport(); - -assert(lapse >= 0, 'The result of `(lapse >= 0)` is true (timeout should be a min of 0ms)'); - -assert(lapse <= $262.agent.MAX_TIME_EPSILON, 'The result of `(lapse <= $262.agent.MAX_TIME_EPSILON)` is true'); - assert.sameValue(Atomics.notify(i64a, 0), 0, 'Atomics.notify(i64a, 0) returns 0'); diff --git a/test/built-ins/Atomics/wait/false-for-timeout-agent.js b/test/built-ins/Atomics/wait/false-for-timeout-agent.js index d25a44b72d4a3322c22fbf1aca72eabcfb42ad00..737963f3219901652ad94263bcfe5a338ebd3081 100644 --- a/test/built-ins/Atomics/wait/false-for-timeout-agent.js +++ b/test/built-ins/Atomics/wait/false-for-timeout-agent.js @@ -35,16 +35,13 @@ $262.agent.start(` const i32a = new Int32Array(sab); Atomics.add(i32a, ${RUNNING}, 1); - const before = $262.agent.monotonicNow(); const status1 = Atomics.wait(i32a, 0, 0, false); const status2 = Atomics.wait(i32a, 0, 0, valueOf); const status3 = Atomics.wait(i32a, 0, 0, toPrimitive); - const duration = $262.agent.monotonicNow() - before; $262.agent.report(status1); $262.agent.report(status2); $262.agent.report(status3); - $262.agent.report(duration); $262.agent.leaving(); }); `); @@ -75,10 +72,4 @@ assert.sameValue( '$262.agent.getReport() returns "timed-out"' ); -const lapse = $262.agent.getReport(); - -assert(lapse >= 0, 'The result of `(lapse >= 0)` is true (timeout should be a min of 0ms)'); - -assert(lapse <= $262.agent.MAX_TIME_EPSILON, 'The result of `(lapse <= $262.agent.MAX_TIME_EPSILON)` is true'); - assert.sameValue(Atomics.notify(i32a, 0), 0, 'Atomics.notify(i32a, 0) returns 0'); diff --git a/test/built-ins/Atomics/wait/null-for-timeout-agent.js b/test/built-ins/Atomics/wait/null-for-timeout-agent.js index 265ebefb9ea4845c63625769cff93d98fa313c1f..3e0818bd4d41be3f5bfa4555f671d3ca433a19a1 100644 --- a/test/built-ins/Atomics/wait/null-for-timeout-agent.js +++ b/test/built-ins/Atomics/wait/null-for-timeout-agent.js @@ -35,16 +35,13 @@ $262.agent.start(` const i32a = new Int32Array(sab); Atomics.add(i32a, ${RUNNING}, 1); - const before = $262.agent.monotonicNow(); const status1 = Atomics.wait(i32a, 0, 0, null); const status2 = Atomics.wait(i32a, 0, 0, valueOf); const status3 = Atomics.wait(i32a, 0, 0, toPrimitive); - const duration = $262.agent.monotonicNow() - before; $262.agent.report(status1); $262.agent.report(status2); $262.agent.report(status3); - $262.agent.report(duration); $262.agent.leaving(); }); `); @@ -75,10 +72,4 @@ assert.sameValue( '$262.agent.getReport() returns "timed-out"' ); -const lapse = $262.agent.getReport(); - -assert(lapse >= 0, 'The result of `(lapse >= 0)` is true (timeout should be a min of 0ms)'); - -assert(lapse <= $262.agent.MAX_TIME_EPSILON, 'The result of `(lapse <= $262.agent.MAX_TIME_EPSILON)` is true (timeout should be a max of $262.agent.MAX_TIME_EPSILON)'); - assert.sameValue(Atomics.notify(i32a, 0), 0, 'Atomics.notify(i32a, 0) returns 0'); diff --git a/test/built-ins/Atomics/wait/object-for-timeout-agent.js b/test/built-ins/Atomics/wait/object-for-timeout-agent.js index 3e216b12561bc034b16f69ad201d1c46868673de..3217e42261f4a5e53846693a3b047e7e34a7f1bb 100644 --- a/test/built-ins/Atomics/wait/object-for-timeout-agent.js +++ b/test/built-ins/Atomics/wait/object-for-timeout-agent.js @@ -41,16 +41,13 @@ $262.agent.start(` const i32a = new Int32Array(sab); Atomics.add(i32a, ${RUNNING}, 1); - const before = $262.agent.monotonicNow(); const status1 = Atomics.wait(i32a, 0, 0, valueOf); const status2 = Atomics.wait(i32a, 0, 0, toString); const status3 = Atomics.wait(i32a, 0, 0, toPrimitive); - const duration = $262.agent.monotonicNow() - before; $262.agent.report(status1); $262.agent.report(status2); $262.agent.report(status3); - $262.agent.report(duration); $262.agent.leaving(); }); `); @@ -81,10 +78,4 @@ assert.sameValue( '$262.agent.getReport() returns "timed-out"' ); -const lapse = $262.agent.getReport(); - -assert(lapse >= 0, 'The result of `(lapse >= 0)` is true (timeout should be a min of 0ms)'); - -assert(lapse <= $262.agent.MAX_TIME_EPSILON, 'The result of `(lapse <= $262.agent.MAX_TIME_EPSILON)` is true (timeout should be a max of $$262.agent.MAX_TIME_EPSILON)'); - assert.sameValue(Atomics.notify(i32a, 0), 0, 'Atomics.notify(i32a, 0) returns 0'); diff --git a/test/built-ins/Atomics/wait/poisoned-object-for-timeout-throws-agent.js b/test/built-ins/Atomics/wait/poisoned-object-for-timeout-throws-agent.js index d6352bac29f6cc5ddbf0ae45efe23e7de182e9f0..156f04176cc88700ae0f39db457cf01b90314f60 100644 --- a/test/built-ins/Atomics/wait/poisoned-object-for-timeout-throws-agent.js +++ b/test/built-ins/Atomics/wait/poisoned-object-for-timeout-throws-agent.js @@ -38,7 +38,6 @@ $262.agent.start(` let status1 = ""; let status2 = ""; - const start = $262.agent.monotonicNow(); try { Atomics.wait(i32a, 0, 0, poisonedValueOf); } catch (error) { @@ -49,11 +48,9 @@ $262.agent.start(` } catch (error) { status2 = "poisonedToPrimitive"; } - const duration = $262.agent.monotonicNow() - start; $262.agent.report(status1); $262.agent.report(status2); - $262.agent.report(duration); $262.agent.leaving(); }); `); @@ -79,10 +76,4 @@ assert.sameValue( '$262.agent.getReport() returns "poisonedToPrimitive"' ); -const lapse = $262.agent.getReport(); - -assert(lapse >= 0, 'The result of `(lapse >= 0)` is true (timeout should be a min of 0ms)'); - -assert(lapse <= $262.agent.MAX_TIME_EPSILON, 'The result of `(lapse <= $262.agent.MAX_TIME_EPSILON)` is true (timeout should be a max of $$262.agent.MAX_TIME_EPSILON)'); - assert.sameValue(Atomics.notify(i32a, 0), 0, 'Atomics.notify(i32a, 0) returns 0'); diff --git a/test/built-ins/Atomics/wait/symbol-for-index-throws-agent.js b/test/built-ins/Atomics/wait/symbol-for-index-throws-agent.js index d323e6a5a4840793a415b86c43eb467c096badd6..21902487cafff8987a505309b5395220360e679c 100644 --- a/test/built-ins/Atomics/wait/symbol-for-index-throws-agent.js +++ b/test/built-ins/Atomics/wait/symbol-for-index-throws-agent.js @@ -51,7 +51,6 @@ $262.agent.start(` let status1 = ""; let status2 = ""; - const start = $262.agent.monotonicNow(); try { Atomics.wait(i32a, Symbol("1"), poisonedValueOf, poisonedValueOf); } catch (error) { @@ -62,11 +61,9 @@ $262.agent.start(` } catch (error) { status2 = 'Symbol("2")'; } - const duration = $262.agent.monotonicNow() - start; $262.agent.report(status1); $262.agent.report(status2); - $262.agent.report(duration); $262.agent.leaving(); }); `); @@ -92,9 +89,4 @@ assert.sameValue( '$262.agent.getReport() returns "Symbol("2")"' ); -const lapse = $262.agent.getReport(); - -assert(lapse >= 0, 'The result of `(lapse >= 0)` is true (The result of `(lapse >= 0)` is true (timeout should be a min of 0ms))'); -assert(lapse <= $262.agent.MAX_TIME_EPSILON, 'The result of `(lapse <= $262.agent.MAX_TIME_EPSILON)` is true (The result of `(lapse <= $262.agent.MAX_TIME_EPSILON)` is true (timeout should be a max of $$262.agent.MAX_TIME_EPSILON))'); - assert.sameValue(Atomics.notify(i32a, 0), 0, 'Atomics.notify(i32a, 0) returns 0'); diff --git a/test/built-ins/Atomics/wait/symbol-for-timeout-throws-agent.js b/test/built-ins/Atomics/wait/symbol-for-timeout-throws-agent.js index 96b1d731e48cff181bc0cbcd5e253dd70f52cae6..efba942cd6639897f18a55920b6aae95befa6964 100644 --- a/test/built-ins/Atomics/wait/symbol-for-timeout-throws-agent.js +++ b/test/built-ins/Atomics/wait/symbol-for-timeout-throws-agent.js @@ -26,7 +26,6 @@ $262.agent.start(` let status1 = ""; let status2 = ""; - const start = $262.agent.monotonicNow(); try { Atomics.wait(i32a, 0, 0, Symbol("1")); } catch (error) { @@ -37,11 +36,9 @@ $262.agent.start(` } catch (error) { status2 = 'Symbol("2")'; } - const duration = $262.agent.monotonicNow() - start; $262.agent.report(status1); $262.agent.report(status2); - $262.agent.report(duration); $262.agent.leaving(); }); `); @@ -67,9 +64,4 @@ assert.sameValue( '$262.agent.getReport() returns "Symbol("2")"' ); -const lapse = $262.agent.getReport(); - -assert(lapse >= 0, 'The result of `(lapse >= 0)` is true (timeout should be a min of 0ms)'); -assert(lapse <= $262.agent.MAX_TIME_EPSILON, 'The result of `(lapse <= $262.agent.MAX_TIME_EPSILON)` is true (timeout should be a max of $$262.agent.MAX_TIME_EPSILON)'); - assert.sameValue(Atomics.notify(i32a, 0), 0, 'Atomics.notify(i32a, 0) returns 0'); diff --git a/test/built-ins/Atomics/wait/symbol-for-value-throws-agent.js b/test/built-ins/Atomics/wait/symbol-for-value-throws-agent.js index 7cc4f4ca1ea8a384cc06930e4176b778cf672e4d..d4de5f952bba174ad523029792b7dde556ed79b7 100644 --- a/test/built-ins/Atomics/wait/symbol-for-value-throws-agent.js +++ b/test/built-ins/Atomics/wait/symbol-for-value-throws-agent.js @@ -42,7 +42,6 @@ $262.agent.start(` let status1 = ""; let status2 = ""; - const before = $262.agent.monotonicNow(); try { Atomics.wait(i32a, 0, Symbol("1"), poisonedValueOf); } catch (error) { @@ -53,11 +52,9 @@ $262.agent.start(` } catch (error) { status2 = 'Symbol("2")'; } - const duration = $262.agent.monotonicNow() - before; $262.agent.report(status1); $262.agent.report(status2); - $262.agent.report(duration); $262.agent.leaving(); }); `); @@ -83,9 +80,4 @@ assert.sameValue( '$262.agent.getReport() returns "Symbol("2")"' ); -const lapse = $262.agent.getReport(); - -assert(lapse >= 0, 'The result of `(lapse >= 0)` is true (timeout should be a min of 0ms)'); -assert(lapse <= $262.agent.MAX_TIME_EPSILON, 'The result of `(lapse <= $262.agent.MAX_TIME_EPSILON)` is true (timeout should be a max of $$262.agent.MAX_TIME_EPSILON)'); - assert.sameValue(Atomics.notify(i32a, 0), 0, 'Atomics.notify(i32a, 0) returns 0'); diff --git a/test/built-ins/Atomics/wait/true-for-timeout-agent.js b/test/built-ins/Atomics/wait/true-for-timeout-agent.js index ef0ef6f277c56b117f67477f2b268d991c5d8968..b6bec0f039917fd0cb748882312a5cc28b16b84d 100644 --- a/test/built-ins/Atomics/wait/true-for-timeout-agent.js +++ b/test/built-ins/Atomics/wait/true-for-timeout-agent.js @@ -35,16 +35,13 @@ $262.agent.start(` const i32a = new Int32Array(sab); Atomics.add(i32a, ${RUNNING}, 1); - const start = $262.agent.monotonicNow(); const status1 = Atomics.wait(i32a, 0, 0, true); const status2 = Atomics.wait(i32a, 0, 0, valueOf); const status3 = Atomics.wait(i32a, 0, 0, toPrimitive); - const duration = $262.agent.monotonicNow() - start; $262.agent.report(status1); $262.agent.report(status2); $262.agent.report(status3); - $262.agent.report(duration); $262.agent.leaving(); }); `); @@ -75,10 +72,4 @@ assert.sameValue( '$262.agent.getReport() returns "timed-out"' ); -const lapse = $262.agent.getReport(); - -assert(lapse >= 0, 'The result of `(lapse >= 0)` is true (timeout should be a min of 0ms)'); - -assert(lapse <= $262.agent.MAX_TIME_EPSILON, 'The result of `(lapse <= $262.agent.MAX_TIME_EPSILON)` is true (timeout should be a max of $$262.agent.MAX_TIME_EPSILON)'); - assert.sameValue(Atomics.notify(i32a, 0), 0, 'Atomics.notify(i32a, 0) returns 0');