From 6403a81b282e40806b7beb6b47ddada3990b9dba Mon Sep 17 00:00:00 2001 From: Daan De Meyer Date: Thu, 6 Nov 2025 20:56:53 +0100 Subject: [PATCH] test-cgroup-util: Skip test on ESTALE The kernel converts a bunch of errors to ESTALE in the open_by_handle_at() codepath so we treat it as missing privs but it could be absolutely anything really. --- src/test/test-cgroup-util.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/test/test-cgroup-util.c b/src/test/test-cgroup-util.c index fea0733173f..997bcf22155 100644 --- a/src/test/test-cgroup-util.c +++ b/src/test/test-cgroup-util.c @@ -527,7 +527,9 @@ TEST(cgroupid) { fd2 = cg_cgroupid_open(fd, id); - if (ERRNO_IS_NEG_PRIVILEGE(fd2)) + /* The kernel converts a bunch of errors to ESTALE in the open_by_handle_at() codepath so we treat + * it as missing privs but it could be absolutely anything really. */ + if (ERRNO_IS_NEG_PRIVILEGE(fd2) || fd2 == -ESTALE) log_notice("Skipping open-by-cgroup-id test because lacking privs."); else if (ERRNO_IS_NEG_NOT_SUPPORTED(fd2)) log_notice("Skipping open-by-cgroup-id test because syscall is missing or blocked."); -- 2.47.3