From: Dan Streetman Date: Fri, 23 Oct 2020 19:50:28 +0000 (-0400) Subject: test: ignore ENOMEDIUM error from sd_pid_get_cgroup() X-Git-Tag: v247-rc1~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=352ab9d74049b4ac694fdba1a6e67339f12ded93;p=thirdparty%2Fsystemd.git test: ignore ENOMEDIUM error from sd_pid_get_cgroup() Ubuntu builds on the Launchpad infrastructure run inside a chroot that does not have the sysfs cgroup dirs mounted, so this call will return ENOMEDIUM from cg_unified_cached() during the build-time testing, for example when building the package in a Launchpad PPA. --- diff --git a/src/libsystemd/sd-login/test-login.c b/src/libsystemd/sd-login/test-login.c index 0494fc77ba1..5f61a8f8b69 100644 --- a/src/libsystemd/sd-login/test-login.c +++ b/src/libsystemd/sd-login/test-login.c @@ -68,7 +68,7 @@ static void test_login(void) { r = sd_pid_get_cgroup(0, &cgroup); log_info("sd_pid_get_cgroup(0, …) → %s / \"%s\"", e(r), strnull(cgroup)); - assert_se(r == 0); + assert_se(IN_SET(r, 0, -ENOMEDIUM)); r = sd_uid_get_display(u2, &display_session); log_info("sd_uid_get_display("UID_FMT", …) → %s / \"%s\"", u2, e(r), strnull(display_session));