summaryrefslogtreecommitdiff
path: root/tests/rng-fork.c
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2013-12-29 16:35:49 +0100
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2013-12-29 16:35:49 +0100
commitf6e5ff21c7d4486a9ec9ce5e0fd17177f8a5e98f (patch)
tree7c849ebe5c901f4d7035c1c14ba2b175a8f8fe50 /tests/rng-fork.c
parenta07221176bc68df63dbac5178543d91f024bb9a0 (diff)
downloadgnutls-f6e5ff21c7d4486a9ec9ce5e0fd17177f8a5e98f.tar.gz
perform the iteration check on both rngs.
Diffstat (limited to 'tests/rng-fork.c')
-rw-r--r--tests/rng-fork.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/tests/rng-fork.c b/tests/rng-fork.c
index 4cf3246ef3..f0b32ce509 100644
--- a/tests/rng-fork.c
+++ b/tests/rng-fork.c
@@ -107,7 +107,15 @@ 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 more than %u times\n", i);
+ 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);
}
}