From 67b2cb77695eec98e905693147eb6bd014c1768d Mon Sep 17 00:00:00 2001 From: Daan De Meyer Date: Mon, 30 Jun 2025 13:41:04 +0200 Subject: [PATCH] test: Add tests for various varlink socket units Let's make sure these socket units work as expected by stopping the related services and making sure the services are started as expected when a client connects to the corresponding socket. --- test/units/TEST-74-AUX-UTILS.varlinkctl.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/test/units/TEST-74-AUX-UTILS.varlinkctl.sh b/test/units/TEST-74-AUX-UTILS.varlinkctl.sh index 2e0bf5f7d6a..481dc85d6fd 100755 --- a/test/units/TEST-74-AUX-UTILS.varlinkctl.sh +++ b/test/units/TEST-74-AUX-UTILS.varlinkctl.sh @@ -66,6 +66,20 @@ if [[ -x /usr/lib/systemd/systemd-pcrextend ]]; then varlinkctl introspect /usr/lib/systemd/systemd-pcrextend fi +# Test various varlink socket units to make sure that we can still connect to the varlink sockets even if the +# services are currently stopped (or restarting). +systemctl stop \ + systemd-networkd.service \ + systemd-hostnamed.service \ + systemd-machined.service \ + systemd-udevd.service +varlinkctl introspect /run/systemd/netif/io.systemd.Network +varlinkctl introspect /run/systemd/io.systemd.Hostname +varlinkctl introspect /run/systemd/machine/io.systemd.Machine +if ! systemd-detect-virt -qc; then + varlinkctl introspect /run/udev/io.systemd.Udev +fi + # SSH transport SSHBINDIR="$(mktemp -d)" -- 2.47.3