From 07c63f65a1cdbdf0eafcbe3004e30eb44bd86181 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Petr=20P=C3=ADsa=C5=99?= Date: Wed, 4 Sep 2019 10:34:02 +0200 Subject: [PATCH] test/offline/compute_hash: Skip a test if an algorithm is not supported libgcrypt does not know MD5 on RHEL 8 and thus the test failed. This patch recognizes IE_NOTSUP error and skip the test in that case. --- test/offline/compute_hash.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test/offline/compute_hash.c b/test/offline/compute_hash.c index 2fe4dfd..23cbc0c 100644 --- a/test/offline/compute_hash.c +++ b/test/offline/compute_hash.c @@ -27,9 +27,13 @@ static int test_compute_hash(const isds_error error, if (!correct || !test) return 1; err = _isds_compute_hash(input, input_length, test); + if (IE_NOTSUP == err) { + SKIP_TEST("The hash algorithm is not supported"); + } if (err != error) { free(test->value); test->value = NULL; - FAIL_TEST("Wrong return value"); + FAIL_TEST("_isds_compute_hash() returned an unexpected code: " + "expected=%s got=%s", isds_strerror(error), isds_strerror(err)); } if (!err) { -- 2.11.4.GIT