diff options
author | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2017-02-26 20:07:41 +0100 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2017-03-06 22:24:33 +0100 |
commit | 3c01784d964e779f285df9604dabe45b994be1a6 (patch) | |
tree | 80b3211802fbb50d537e340f43bbfa33a3a9becf /tests/rng-fork.c | |
parent | 4c450f23398ec50567eb9473d040ea76751a97ea (diff) | |
download | gnutls-3c01784d964e779f285df9604dabe45b994be1a6.tar.gz |
tests: decoupled the random generator operational tests from the forking ones
That also corrects the fact that not all tests were run for all generators,
and allows to run the tests in parallel.
Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
Diffstat (limited to 'tests/rng-fork.c')
-rw-r--r-- | tests/rng-fork.c | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/tests/rng-fork.c b/tests/rng-fork.c index ede12bde75..2b3683b7c1 100644 --- a/tests/rng-fork.c +++ b/tests/rng-fork.c @@ -106,36 +106,6 @@ void doit(void) } } - for (i = 0; i <= 65539; i++) { - ret = gnutls_rnd(GNUTLS_RND_NONCE, buf1, sizeof(buf1)); - if (ret < 0) { - fail("Error iterating RNG-nonce more than %u times\n", i); - exit(1); - } - } - - for (i = 0; i <= 65539; i++) { - ret = gnutls_rnd(GNUTLS_RND_RANDOM, buf1, sizeof(buf1)); - if (ret < 0) { - fail("Error iterating RNG-random more than %u times\n", i); - exit(1); - } - } -#define TMP_SIZE (65*1024) - tmp = malloc(TMP_SIZE); - if (tmp == NULL) { - fail("memory error\n"); - exit(1); - } - for (i = 0; i <= 65539; i++) { - ret = gnutls_rnd(GNUTLS_RND_RANDOM, tmp, TMP_SIZE); - if (ret < 0) { - fail("Error iterating RNG-random more than %u times for %d data\n", i, TMP_SIZE); - exit(1); - } - } - free(tmp); - gnutls_global_deinit(); } #else |