summaryrefslogtreecommitdiff
path: root/src/analyze/test-verify.c
diff options
context:
space:
mode:
authorJan Janssen <medhefgo@web.de>2022-03-14 10:37:27 +0100
committerJan Janssen <medhefgo@web.de>2022-03-16 14:50:12 +0100
commit68da8adf54d7ab88610c161a1c7dd2819eb96886 (patch)
tree0a1f175eb14cb1e984c63f309641cf17df416e66 /src/analyze/test-verify.c
parent45cab6e3c1d542d66c293a3a722c08412386f335 (diff)
downloadsystemd-68da8adf54d7ab88610c161a1c7dd2819eb96886.tar.gz
test: Use TEST macros in more places
Diffstat (limited to 'src/analyze/test-verify.c')
-rw-r--r--src/analyze/test-verify.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/analyze/test-verify.c b/src/analyze/test-verify.c
index f8c0bd9786..d37e54bca6 100644
--- a/src/analyze/test-verify.c
+++ b/src/analyze/test-verify.c
@@ -3,7 +3,7 @@
#include "analyze-verify-util.h"
#include "tests.h"
-static void test_verify_nonexistent(void) {
+TEST(verify_nonexistent) {
/* Negative cases */
assert_se(verify_executable(NULL, &(ExecCommand) {.flags = EXEC_COMMAND_IGNORE_FAILURE, .path = (char*) "/non/existent"}, NULL) == 0);
assert_se(verify_executable(NULL, &(ExecCommand) {.path = (char*) "/non/existent"}, NULL) < 0);
@@ -13,8 +13,4 @@ static void test_verify_nonexistent(void) {
assert_se(verify_executable(NULL, &(ExecCommand) {.flags = EXEC_COMMAND_IGNORE_FAILURE, .path = (char*) "/bin/echo"}, NULL) == 0);
}
-int main(int argc, char *argv[]) {
- test_setup_logging(LOG_DEBUG);
-
- test_verify_nonexistent();
-}
+DEFINE_TEST_MAIN(LOG_DEBUG);