From: Yu Watanabe Date: Fri, 11 Jul 2025 01:38:04 +0000 (+0900) Subject: test-cgroup: Ignore ENOENT from cg_create(); test-cgroup-util: Ignore ENXIO in one... X-Git-Tag: v258-rc1~103 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=99ae2ae328a2524e6cc8c9b520e7a3cd6ec680bf;p=thirdparty%2Fsystemd.git test-cgroup: Ignore ENOENT from cg_create(); test-cgroup-util: Ignore ENXIO in one more place (#38158) This was the only test failure building systemd-252-51.el9 in a container, also previously reported against 252-rc1 under Gentoo in #25015 This is a forward-port of the patch we actually started using for CIQ's builds of the EL9-derived package, which was: ```diff --- systemd-252/src/test/test-cgroup.c 2022-10-31 18:59:18.000000000 +0000 +++ systemd-252-test/src/test/test-cgroup.c 2025-07-10 00:47:07.541000000 +0000 @@ -62,7 +62,7 @@ log_info("Paths for test:\n%s\n%s", test_a, test_b); r = cg_create(SYSTEMD_CGROUP_CONTROLLER, test_a); - if (IN_SET(r, -EPERM, -EACCES, -EROFS)) { + if (IN_SET(r, -EPERM, -EACCES, -EROFS, -ENOENT)) { log_info_errno(r, "Skipping %s: %m", __func__); return; } ``` I confirmed that the `ERRNO_IS_NEG_FS_WRITE_REFUSED` macro is equivalent to checking the first 3 error codes above, so the addition of the check for `ENOENT` is still just as relevant as it was in 252, but adding it into the macro would be inconsistent with its name, description, and possible other uses. Hence, in this PR I'm adding the extra check into the `if`. --- 99ae2ae328a2524e6cc8c9b520e7a3cd6ec680bf