summaryrefslogtreecommitdiff
path: root/src/libsystemd/sd-bus/test-bus-creds.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libsystemd/sd-bus/test-bus-creds.c')
-rw-r--r--src/libsystemd/sd-bus/test-bus-creds.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/src/libsystemd/sd-bus/test-bus-creds.c b/src/libsystemd/sd-bus/test-bus-creds.c
index 6746c0973e..c02c459663 100644
--- a/src/libsystemd/sd-bus/test-bus-creds.c
+++ b/src/libsystemd/sd-bus/test-bus-creds.c
@@ -1,25 +1,20 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
-/***
-***/
#include "sd-bus.h"
#include "bus-dump.h"
#include "bus-util.h"
#include "cgroup-util.h"
+#include "tests.h"
int main(int argc, char *argv[]) {
_cleanup_(sd_bus_creds_unrefp) sd_bus_creds *creds = NULL;
int r;
- log_set_max_level(LOG_DEBUG);
- log_parse_environment();
- log_open();
+ test_setup_logging(LOG_DEBUG);
- if (cg_unified_flush() == -ENOMEDIUM) {
- log_info("Skipping test: /sys/fs/cgroup/ not available");
- return EXIT_TEST_SKIP;
- }
+ if (cg_unified_flush() == -ENOMEDIUM)
+ return log_tests_skipped("/sys/fs/cgroup/ not available");
r = sd_bus_creds_new_from_pid(&creds, 0, _SD_BUS_CREDS_ALL);
log_full_errno(r < 0 ? LOG_ERR : LOG_DEBUG, r, "sd_bus_creds_new_from_pid: %m");