aboutsummaryrefslogtreecommitdiffstats
path: root/librecrypt_fill_with_random_.c
diff options
context:
space:
mode:
Diffstat (limited to 'librecrypt_fill_with_random_.c')
-rw-r--r--librecrypt_fill_with_random_.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/librecrypt_fill_with_random_.c b/librecrypt_fill_with_random_.c
index 8eb3cfd..0d8dc78 100644
--- a/librecrypt_fill_with_random_.c
+++ b/librecrypt_fill_with_random_.c
@@ -95,8 +95,11 @@ main(void)
int rv = 0;
INIT_TEST_ABORT();
-
SET_UP_ALARM();
+ INIT_RESOURCE_TEST();
+
+ /* Check zero-request */
+ EXPECT(librecrypt_fill_with_random_(NULL, 0, NULL, NULL) == 0);
/* Check default RNG */
EXPECT(librecrypt_fill_with_random_(buf1, sizeof(buf1), NULL, NULL) == 0);
@@ -141,6 +144,7 @@ main(void)
/* Check function abort(3)s if RNG returns 0 */
EXPECT_ABORT(rv = librecrypt_fill_with_random_(buf1, sizeof(buf1), &zero_ret, NULL));
+ STOP_RESOURCE_TEST();
return rv;
}