From 0559a3d905ad9ec2e98faeb839e017349a18f8da Mon Sep 17 00:00:00 2001 From: Pieter Wuille Date: Tue, 21 Dec 2021 20:47:06 -0500 Subject: [PATCH] Run more iterations of run_field_misc At count=64, this makes the test take around 1% of the total time. --- src/tests.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/tests.c b/src/tests.c index 7f54bc054c..4654bb5104 100644 --- a/src/tests.c +++ b/src/tests.c @@ -2467,9 +2467,13 @@ void run_field_misc(void) { secp256k1_fe q; secp256k1_fe fe5 = SECP256K1_FE_CONST(0, 0, 0, 0, 0, 0, 0, 5); int i, j; - for (i = 0; i < 5*count; i++) { + for (i = 0; i < 1000 * count; i++) { secp256k1_fe_storage xs, ys, zs; - random_fe(&x); + if (i & 1) { + random_fe(&x); + } else { + random_fe_test(&x); + } random_fe_non_zero(&y); /* Test the fe equality and comparison operations. */ CHECK(secp256k1_fe_cmp_var(&x, &x) == 0);