summaryrefslogtreecommitdiff
path: root/src/test/test-hash.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/test-hash.c')
-rw-r--r--src/test/test-hash.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/test/test-hash.c b/src/test/test-hash.c
index f5bc131846..44d1044bf3 100644
--- a/src/test/test-hash.c
+++ b/src/test/test-hash.c
@@ -7,23 +7,22 @@
#include "log.h"
#include "string-util.h"
#include "khash.h"
+#include "tests.h"
int main(int argc, char *argv[]) {
_cleanup_(khash_unrefp) khash *h = NULL, *copy = NULL;
_cleanup_free_ char *s = NULL;
int r;
- log_set_max_level(LOG_DEBUG);
+ test_setup_logging(LOG_DEBUG);
assert_se(khash_new(&h, NULL) == -EINVAL);
assert_se(khash_new(&h, "") == -EINVAL);
r = khash_supported();
assert_se(r >= 0);
- if (r == 0) {
- puts("khash not supported on this kernel, skipping");
- return EXIT_TEST_SKIP;
- }
+ if (r == 0)
+ return log_tests_skipped("khash not supported on this kernel");
assert_se(khash_new(&h, "foobar") == -EOPNOTSUPP); /* undefined hash function */