]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/libsystemd/sd-login/test-login.c
Merge pull request #30284 from YHNdnzj/fstab-wantedby-defaultdeps
[thirdparty/systemd.git] / src / libsystemd / sd-login / test-login.c
index fe4b52f6c684bc5ee30e91faa4a97a02770cc432..313e5e339da45ad135c8888d70a02d0e7bc3549b 100644 (file)
@@ -10,6 +10,7 @@
 #include "format-util.h"
 #include "log.h"
 #include "missing_syscall.h"
+#include "mountpoint-util.h"
 #include "process-util.h"
 #include "string-util.h"
 #include "strv.h"
@@ -39,7 +40,7 @@ static const char *e(int r) {
 }
 
 TEST(login) {
-        _cleanup_close_pair_ int pair[2] = PIPE_EBADF;
+        _cleanup_close_pair_ int pair[2] = EBADF_PAIR;
         _cleanup_free_ char *pp = NULL, *qq = NULL,
                 *display_session = NULL, *cgroup = NULL,
                 *display = NULL, *remote_user = NULL, *remote_host = NULL,
@@ -327,6 +328,9 @@ TEST(monitor) {
 }
 
 static int intro(void) {
+        if (IN_SET(cg_unified(), -ENOENT, -ENOMEDIUM))
+                return log_tests_skipped("cgroupfs is not mounted");
+
         log_info("/* Information printed is from the live system */");
         return EXIT_SUCCESS;
 }