summaryrefslogtreecommitdiff
path: root/src/libsystemd/sd-bus/test-bus-chat.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libsystemd/sd-bus/test-bus-chat.c')
-rw-r--r--src/libsystemd/sd-bus/test-bus-chat.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/libsystemd/sd-bus/test-bus-chat.c b/src/libsystemd/sd-bus/test-bus-chat.c
index 1e25e94586..6181fb163e 100644
--- a/src/libsystemd/sd-bus/test-bus-chat.c
+++ b/src/libsystemd/sd-bus/test-bus-chat.c
@@ -1,6 +1,4 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
-/***
-***/
#include <fcntl.h>
#include <pthread.h>
@@ -18,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) {
@@ -246,7 +245,7 @@ fail:
return r;
}
-static void* client1(void*p) {
+static void* client1(void *p) {
_cleanup_(sd_bus_message_unrefp) sd_bus_message *reply = NULL;
_cleanup_(sd_bus_flush_close_unrefp) sd_bus *bus = NULL;
_cleanup_(sd_bus_error_free) sd_bus_error error = SD_BUS_ERROR_NULL;
@@ -345,7 +344,7 @@ static int quit_callback(sd_bus_message *m, void *userdata, sd_bus_error *ret_er
return 1;
}
-static void* client2(void*p) {
+static void* client2(void *p) {
_cleanup_(sd_bus_message_unrefp) sd_bus_message *m = NULL, *reply = NULL;
_cleanup_(sd_bus_flush_close_unrefp) sd_bus *bus = NULL;
_cleanup_(sd_bus_error_free) sd_bus_error error = SD_BUS_ERROR_NULL;
@@ -511,11 +510,11 @@ int main(int argc, char *argv[]) {
void *p;
int q, r;
+ test_setup_logging(LOG_INFO);
+
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...");