]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test: udev might not be running in container, skip check in TEST-88-UPGRADE 43162/head
authorLuca Boccassi <luca.boccassi@gmail.com>
Sun, 26 Jul 2026 12:18:49 +0000 (13:18 +0100)
committerLuca Boccassi <luca.boccassi@gmail.com>
Sun, 26 Jul 2026 12:45:28 +0000 (13:45 +0100)
test/units/TEST-88-UPGRADE.sh

index 513eacab147626f93008435ec62bdb9a166b028d..90443dd09c8d324faeaec869848b4bca41dd1f88 100755 (executable)
@@ -37,8 +37,13 @@ fi
 minor=$(systemctl --version | awk '/^systemd/{print$2}')
 networkd=
 resolved=
+udev=
 unitscmd='systemctl list-units --failed *systemd*'
 
+if command -v udevadm >/dev/null && systemctl is-active --quiet systemd-udevd.service; then
+    udev=1
+fi
+
 if [[ $($unitscmd --output json | jq length) -gt 0 ]]; then
     echo 'Systemd failed units found before the test:'
     $unitscmd
@@ -58,7 +63,7 @@ check_sd() {
         fail=1
     fi
 
-    if command -v udevadm >/dev/null && ! udevadm control --ping --timeout=5; then
+    if [[ -n $udev ]] && ! udevadm control --ping --timeout=5; then
         echo 'Udev failed after the test!'
         fail=1
     fi