From 8d0eda07e9eae7418ce6d23f904faca3ddfb0eb0 Mon Sep 17 00:00:00 2001 From: Tim Ruffing Date: Mon, 2 Mar 2026 15:06:39 +0100 Subject: [PATCH] testrand: Remove testrand_finish This removes printing of the "random run = " at the end of the tests. I haven't seen a single case where this proved to be useful. And as of 48789dafc2a866bbc639184f0387637c0decb8c5, this is anyway printed only at the end of the exhaustive tests and not the normal tests, so the probability that this will be useful in the future is very low. --- src/testrand.h | 3 --- src/testrand_impl.h | 6 ------ src/tests_exhaustive.c | 2 -- 3 files changed, 11 deletions(-) diff --git a/src/testrand.h b/src/testrand.h index 3c1ed3d4..215b6fc7 100644 --- a/src/testrand.h +++ b/src/testrand.h @@ -42,7 +42,4 @@ static void testrand_flip(unsigned char *b, size_t len); /** Initialize the test RNG using (hex encoded) array up to 16 bytes, or randomly if hexseed is NULL. */ static void testrand_init(const char* hexseed); -/** Print final test information. */ -static void testrand_finish(void); - #endif /* SECP256K1_TESTRAND_H */ diff --git a/src/testrand_impl.h b/src/testrand_impl.h index b84f5730..6d9fd63a 100644 --- a/src/testrand_impl.h +++ b/src/testrand_impl.h @@ -158,10 +158,4 @@ static void testrand_init(const char* hexseed) { testrand_seed(seed16); } -static void testrand_finish(void) { - unsigned char run32[32]; - testrand256(run32); - printf("random run = %02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x\n", run32[0], run32[1], run32[2], run32[3], run32[4], run32[5], run32[6], run32[7], run32[8], run32[9], run32[10], run32[11], run32[12], run32[13], run32[14], run32[15]); -} - #endif /* SECP256K1_TESTRAND_IMPL_H */ diff --git a/src/tests_exhaustive.c b/src/tests_exhaustive.c index 13bda611..68d4bec3 100644 --- a/src/tests_exhaustive.c +++ b/src/tests_exhaustive.c @@ -459,8 +459,6 @@ int main(int argc, char** argv) { secp256k1_context_destroy(ctx); } - testrand_finish(); - printf("no problems found\n"); return EXIT_SUCCESS; }