]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test-cgroup-util: Skip procs analysis without cgroupfs
authorMichal Koutný <mkoutny@suse.com>
Fri, 17 Jan 2025 17:00:25 +0000 (18:00 +0100)
committerMichal Koutný <mkoutny@suse.com>
Wed, 12 Mar 2025 09:31:23 +0000 (10:31 +0100)
cg_pidref_get_path() cannot work (current implementaion) without
cgroupfs (when it checks unified or not setup). Similarly,
cg_pidref_get_unit() assumes all processes are part of a unit. So carry
out the test only when running on a systemd setup.

src/test/test-cgroup-util.c

index 6b4c9b5aa78d763db744157fd0cb5c518fb57dbf..8743bd1cc744bab5aaeb868f19924f4c7e220352 100644 (file)
@@ -198,7 +198,7 @@ TEST(get_paths, .sd_booted = true) {
         log_info("Root = %s", a);
 }
 
-TEST(proc) {
+TEST(proc, .sd_booted = true) {
         _cleanup_closedir_ DIR *d = NULL;
         int r;