From: Luca Boccassi Date: Sun, 26 Jul 2026 11:33:15 +0000 (+0100) Subject: test: add a few more quick sanity checks to TEST-88-UPGRADE X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=14b93b64096156302793082eb2b22855dba4f6a2;p=thirdparty%2Fsystemd.git test: add a few more quick sanity checks to TEST-88-UPGRADE --- diff --git a/test/units/TEST-88-UPGRADE.sh b/test/units/TEST-88-UPGRADE.sh index 153fc0ba492..513eacab147 100755 --- a/test/units/TEST-88-UPGRADE.sh +++ b/test/units/TEST-88-UPGRADE.sh @@ -36,6 +36,7 @@ fi minor=$(systemctl --version | awk '/^systemd/{print$2}') networkd= +resolved= unitscmd='systemctl list-units --failed *systemd*' if [[ $($unitscmd --output json | jq length) -gt 0 ]]; then @@ -46,6 +47,22 @@ fi check_sd() { local unit fail=0 timer1_new timer2_new + + if ! systemctl daemon-reload; then + echo 'System manager reload failed after the test!' + fail=1 + fi + + if ! systemd-run --quiet --wait --collect --service-type=exec true; then + echo 'Transient service failed after the test!' + fail=1 + fi + + if command -v udevadm >/dev/null && ! udevadm control --ping --timeout=5; then + echo 'Udev failed after the test!' + fail=1 + fi + for unit in $($unitscmd --output json | jq -r '.[].unit'); do if ! grep -sxqF "$unit" /tmp/failed-units; then fail=1 @@ -64,6 +81,13 @@ check_sd() { fi fi + if [[ -n $resolved ]]; then + if ! resolvectl status; then + echo 'Resolved failed after the test!' + fail=1 + fi + fi + if ! loginctl list-sessions; then echo 'Loginctl failed after the test!' fail=1 @@ -103,10 +127,13 @@ systemctl stop systemd-networkd-resolve-hook.socket || true "${downgrade[@]}" "$pkgdir"/distro/*."$package_extension" -# Some distros don't ship networkd, so the test will always fail +# Some distros don't ship networkd or resolved, so only test them when available if command -v networkctl >/dev/null; then networkd=1 fi +if command -v resolvectl >/dev/null && systemctl is-active --quiet systemd-resolved.service; then + resolved=1 +fi newminor=$(systemctl --version | awk '/^systemd/{print$2}')