summaryrefslogtreecommitdiff
path: root/src/libsystemd/sd-bus/test-bus-chat.c
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2018-09-13 13:34:12 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2018-09-14 09:29:57 +0200
commit317bb217d3f21312e58d9efdc6d3739f7895a08c (patch)
tree3915b40c31898e4b3b3e80406b9e53aa64446ac9 /src/libsystemd/sd-bus/test-bus-chat.c
parentc1cd674357f921136b1e74ece641288670de33c7 (diff)
downloadsystemd-317bb217d3f21312e58d9efdc6d3739f7895a08c.tar.gz
tests: add helper to unify skipping a test and exiting
Diffstat (limited to 'src/libsystemd/sd-bus/test-bus-chat.c')
-rw-r--r--src/libsystemd/sd-bus/test-bus-chat.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/libsystemd/sd-bus/test-bus-chat.c b/src/libsystemd/sd-bus/test-bus-chat.c
index f3ff856e42..28922e6a69 100644
--- a/src/libsystemd/sd-bus/test-bus-chat.c
+++ b/src/libsystemd/sd-bus/test-bus-chat.c
@@ -16,6 +16,7 @@
#include "format-util.h"
#include "log.h"
#include "macro.h"
+#include "tests.h"
#include "util.h"
static int match_callback(sd_bus_message *m, void *userdata, sd_bus_error *ret_error) {
@@ -510,10 +511,8 @@ int main(int argc, char *argv[]) {
int q, r;
r = server_init(&bus);
- if (r < 0) {
- log_info("Failed to connect to bus, skipping tests.");
- return EXIT_TEST_SKIP;
- }
+ if (r < 0)
+ return log_tests_skipped("Failed to connect to bus");
log_info("Initialized...");