Skip to content

Commit

Permalink
test: ignore ENOMEDIUM error from sd_pid_get_cgroup()
Browse files Browse the repository at this point in the history
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.

(cherry picked from commit 352ab9d)

Related: RHEL-18791
  • Loading branch information
Dan Streetman authored and brozs committed Jan 18, 2024
1 parent 195b2e2 commit 914ba52
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libsystemd/sd-login/test-login.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,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));
Expand Down

0 comments on commit 914ba52

Please sign in to comment.