Skip to content

Commit 9743bce

Browse files
committed
test, ci: Lower default iteration count to 16
The number of test iterations in the CI remains unchanged. Additionally, the minimum iteration counts to enable the following tests are adjusted: - `run_sha256_known_output_tests`: 16 -> 32, so it's not run by default - `test_ecmult_constants_2bit`: 35 -> 16, so it's run by default
1 parent 3fdf146 commit 9743bce

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

.cirrus.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ env:
2424
SCHNORRSIG: no
2525
ELLSWIFT: no
2626
### test options
27-
SECP256K1_TEST_ITERS:
27+
SECP256K1_TEST_ITERS: 64
2828
BENCH: yes
2929
SECP256K1_BENCH_ITERS: 2
3030
CTIMETESTS: yes

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ env:
3535
SCHNORRSIG: 'no'
3636
ELLSWIFT: 'no'
3737
### test options
38-
SECP256K1_TEST_ITERS:
38+
SECP256K1_TEST_ITERS: 64
3939
BENCH: 'yes'
4040
SECP256K1_BENCH_ITERS: 2
4141
CTIMETESTS: 'yes'

src/tests.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737

3838
#define CONDITIONAL_TEST(cnt, nam) if (COUNT < (cnt)) { printf("Skipping %s (iteration count too low)\n", nam); } else
3939

40-
static int COUNT = 64;
40+
static int COUNT = 16;
4141
static secp256k1_context *CTX = NULL;
4242
static secp256k1_context *STATIC_CTX = NULL;
4343

@@ -475,7 +475,7 @@ static void run_sha256_known_output_tests(void) {
475475

476476
/* Skip last input vector for low iteration counts */
477477
ninputs = sizeof(inputs)/sizeof(inputs[0]) - 1;
478-
CONDITIONAL_TEST(16, "run_sha256_known_output_tests 1000000") ninputs++;
478+
CONDITIONAL_TEST(32, "run_sha256_known_output_tests 1000000") ninputs++;
479479

480480
for (i = 0; i < ninputs; i++) {
481481
unsigned char out[32];
@@ -5515,7 +5515,7 @@ static void run_ecmult_constants(void) {
55155515
test_ecmult_constants_sha(1607366309u, 2048, expected32_8bit8);
55165516
}
55175517

5518-
CONDITIONAL_TEST(35, "test_ecmult_constants_2bit") {
5518+
CONDITIONAL_TEST(16, "test_ecmult_constants_2bit") {
55195519
test_ecmult_constants_2bit();
55205520
}
55215521
}

0 commit comments

Comments
 (0)