From c388d119ae1a906e63f9c91e76b44cd62b574a8a Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Thu, 29 Apr 2021 16:48:12 -0700 Subject: [PATCH] test: fix flaky test-crypto-timing-safe-dqual-benchmarks Fixes: https://github.com/nodejs/node/issues/38226 --- test/pummel/test-crypto-timing-safe-equal-benchmarks.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/pummel/test-crypto-timing-safe-equal-benchmarks.js b/test/pummel/test-crypto-timing-safe-equal-benchmarks.js index b649b071e1e49d..cc55f615737206 100644 --- a/test/pummel/test-crypto-timing-safe-equal-benchmarks.js +++ b/test/pummel/test-crypto-timing-safe-equal-benchmarks.js @@ -27,7 +27,7 @@ function runOneBenchmark(compareFunc, firstBufFill, secondBufFill, bufSize) { } function getTValue(compareFunc) { - const numTrials = 1e5; + const numTrials = 1e6; const bufSize = 10000; // Perform benchmarks to verify that timingSafeEqual is actually timing-safe. @@ -111,7 +111,7 @@ assert( `timingSafeEqual should not leak information from its execution time (t=${t})` ); -// As a sanity check to make sure the statistical tests are working, run the +// As a coherence check to make sure the statistical tests are working, run the // same benchmarks again, this time with an unsafe comparison function. In this // case the t-value should be above the threshold. const unsafeCompare = (bufA, bufB) => bufA.equals(bufB);