Commit 9eecab7b493d84da84ca4b147cc168b547ab0dbd

Steffen Jaeckel 2019-09-05T16:41:36

print jenkins seed on startup I just had a case around where the `mp_prime_rand()` testcase failed but I couldn't reproduce. I'm pretty sure that was caused by all my changes and partial rebuilds but anyways it'll give us in the future the possibility to debug such a case.

diff --git a/demo/test.c b/demo/test.c
index 390d32d..8da3596 100644
--- a/demo/test.c
+++ b/demo/test.c
@@ -1,3 +1,4 @@
+#include <inttypes.h>
 #include "shared.h"
 
 static long rand_long(void)
@@ -2264,9 +2265,12 @@ int unit_tests(int argc, char **argv)
 #undef T
    };
    unsigned long i;
+   uint64_t t;
    int res = EXIT_SUCCESS, j;
 
-   s_mp_rand_jenkins_init((uint64_t)time(NULL));
+   t = (uint64_t)time(NULL);
+   printf("SEED: 0x%"PRIx64"\n\n", t);
+   s_mp_rand_jenkins_init(t);
    mp_rand_source(s_mp_rand_jenkins);
 
    for (i = 0; i < sizeof(test) / sizeof(test[0]); ++i) {