From aa67abf4af16daa78894d86b0af7e1de8a6879da Mon Sep 17 00:00:00 2001 From: Spencer Wilson Date: Thu, 3 Oct 2024 12:25:53 -0400 Subject: [PATCH] Handle skipped tests Signed-off-by: Spencer Wilson --- test/oqs_test_endecode.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/test/oqs_test_endecode.c b/test/oqs_test_endecode.c index 0e498e37..86a8896c 100644 --- a/test/oqs_test_endecode.c +++ b/test/oqs_test_endecode.c @@ -218,16 +218,24 @@ static int test_oqs_encdec(const char *alg_name) { static int test_algs(const OSSL_ALGORITHM *algs) { int errcnt = 0; for (; algs->algorithm_names != NULL; algs++) { - if (test_oqs_encdec(algs->algorithm_names)) { + switch (test_oqs_encdec(algs->algorithm_names)) { + case 1: fprintf(stderr, cGREEN " Encoding/Decoding test succeeded: %s" cNORM "\n", algs->algorithm_names); - } else { + break; + case -1: + fprintf(stderr, + cBLUE " Encoding/Decoding test skipped: %s" cNORM "\n", + algs->algorithm_names); + break; + default: fprintf(stderr, cRED " Encoding/Decoding test failed: %s" cNORM "\n", algs->algorithm_names); ERR_print_errors_fp(stderr); errcnt++; + break; } } return errcnt;