From 3e8c04a03f4070e23fc737f30c25a79d5958d734 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Sat, 25 Jun 2016 01:28:18 +0200 Subject: tests: make fatal --- src/main.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'src/main.c') diff --git a/src/main.c b/src/main.c index bcc432a..e0116c8 100644 --- a/src/main.c +++ b/src/main.c @@ -17,12 +17,13 @@ static int __init mod_init(void) int ret = 0; #ifdef DEBUG - routing_table_selftest(); - packet_counter_selftest(); - curve25519_selftest(); - chacha20poly1305_selftest(); - blake2s_selftest(); - siphash24_selftest(); + if (!routing_table_selftest() || + !packet_counter_selftest() || + !curve25519_selftest() || + !chacha20poly1305_selftest() || + !blake2s_selftest() || + !siphash24_selftest()) + return -ENOTRECOVERABLE; #endif chacha20poly1305_init(); noise_init(); -- cgit v1.2.3-59-g8ed1b