]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test: skip test-loop-block udev part in chroot too
authorLuca Boccassi <luca.boccassi@gmail.com>
Thu, 20 Nov 2025 14:33:30 +0000 (14:33 +0000)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 21 Nov 2025 08:16:57 +0000 (09:16 +0100)
Same reason as containers, need full udev/uevent machinery for this

src/test/test-loop-block.c

index 4651998ef1c6b3b101d515b85288e9da5adbbf23..144f898f3c7e0206321d81d9663cad34b808a341 100644 (file)
@@ -240,8 +240,8 @@ static int run(int argc, char *argv[]) {
         if (geteuid() != 0 || have_effective_cap(CAP_SYS_ADMIN) <= 0)
                 return log_tests_skipped("not running privileged");
 
-        if (detect_container() > 0)
-                return log_tests_skipped("Test not supported in a container, requires udev/uevent notifications");
+        if (detect_container() > 0 || running_in_chroot() > 0)
+                return log_tests_skipped("Test not supported in a container/chroot, requires udev/uevent notifications");
 
         assert_se(loop_device_make(fd, O_RDWR, 0, UINT64_MAX, 0, LO_FLAGS_PARTSCAN, LOCK_EX, &loop) >= 0);