1
0
mirror of https://github.com/systemd/systemd.git synced 2025-01-28 21:47:38 +03:00

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.
This commit is contained in:
Dan Streetman 2020-10-23 15:50:28 -04:00 committed by Zbigniew Jędrzejewski-Szmek
parent 377a9545e9
commit 352ab9d740

View File

@ -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));