diff options
author | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2016-10-17 14:33:53 +0200 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2016-10-29 23:41:16 +0200 |
commit | de9ec95d53acf5b0f330987462973af3ba6386b7 (patch) | |
tree | 1a86aa535d41177e2215249229bac68d1423b8f1 /tests/rng-fork.c | |
parent | 6c880ad949d094324eb9aca7e7eec9b87c94aea6 (diff) | |
download | gnutls-de9ec95d53acf5b0f330987462973af3ba6386b7.tar.gz |
tests: introduced sanity checks in rng-fork
Diffstat (limited to 'tests/rng-fork.c')
-rw-r--r-- | tests/rng-fork.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/rng-fork.c b/tests/rng-fork.c index 45a18b4249..ede12bde75 100644 --- a/tests/rng-fork.c +++ b/tests/rng-fork.c @@ -28,6 +28,7 @@ #include <stdlib.h> #include <unistd.h> #include <sys/types.h> +#include <assert.h> #if !defined(_WIN32) #include <sys/wait.h> #endif @@ -67,7 +68,7 @@ void doit(void) if (fp == NULL) fail("cannot open file"); - gnutls_rnd(i, buf1, sizeof(buf1)); + assert(gnutls_rnd(i, buf1, sizeof(buf1)) >= 0); if (debug) dump("buf1", buf1, sizeof(buf1)); @@ -77,7 +78,7 @@ void doit(void) exit(0); } else { /* daddy */ - gnutls_rnd(i, buf2, sizeof(buf2)); + assert(gnutls_rnd(i, buf2, sizeof(buf2)) >= 0); if (debug) dump("buf2", buf2, sizeof(buf2)); waitpid(pid, NULL, 0); |