tests: Return result from some ASSERT() macros

This commit is contained in:
Daan De Meyer
2025-11-12 14:20:24 +01:00
parent 3b3113b87c
commit 0d21ab7377
2 changed files with 84 additions and 13 deletions
+7 -2
View File
@@ -26,8 +26,13 @@
#include "tests.h"
#include "tpm2-util.h"
#define ASSERT_DLOPEN(func, cond) \
cond ? ASSERT_OK(func()) : ASSERT_ERROR(func(), EOPNOTSUPP)
#define ASSERT_DLOPEN(func, cond) \
do { \
if (cond) \
ASSERT_OK(func()); \
else \
ASSERT_ERROR(func(), EOPNOTSUPP); \
} while (false)
static int run(int argc, char **argv) {
test_setup_logging(LOG_DEBUG);