test: udev might not be running in container, skip check in TEST-88-UPGRADE

This commit is contained in:
Luca Boccassi
2026-07-26 13:45:28 +01:00
parent 14b93b6409
commit a5819bd3f5
+6 -1
View File
@@ -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