chiark / gitweb /
conf-parser: fix wrong argument given to log_syntax_invalid_utf8
[elogind.git] / src / test / test-helper.h
index 92864edb54c0831a4bebbf88933919a9356e794c..ddb10f88fd1956010a6cc411b89f9073d6d3bf77 100644 (file)
@@ -1,5 +1,3 @@
-/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-
 #pragma once
 
 /***
 
 #include "sd-daemon.h"
 
+#include "macro.h"
+
 #define TEST_REQ_RUNNING_SYSTEMD(x)                                 \
-       if (sd_booted() > 0) {                                      \
-               x;                                                  \
+        if (sd_booted() > 0) {                                      \
+                x;                                                  \
         } else {                                                    \
                 printf("systemd not booted skipping '%s'\n", #x);   \
         }
+
+#define MANAGER_SKIP_TEST(r)                                    \
+        IN_SET(r,                                               \
+               -EPERM,                                          \
+               -EACCES,                                         \
+               -EADDRINUSE,                                     \
+               -EHOSTDOWN,                                      \
+               -ENOENT,                                         \
+               -ENOMEDIUM /* cannot determine cgroup */         \
+               )