]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
TEST-46-HOMED: cleanup homedsshtest earlier
authorYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 20 Aug 2025 18:14:29 +0000 (03:14 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 21 Aug 2025 16:11:35 +0000 (01:11 +0900)
test/units/TEST-46-HOMED.sh

index c52178dab1f42ad628458c673ac4e547a93db386..2d31c6fcb2a3b0e8b302d5d03d53f795e784b33e 100755 (executable)
@@ -544,6 +544,7 @@ if command -v ssh &>/dev/null && command -v sshd &>/dev/null && ! [[ -v ASAN_OPT
         systemctl is-active -q mysshserver.socket && systemctl stop mysshserver.socket
         rm -f /tmp/homed.id_ecdsa /run/systemd/system/mysshserver{@.service,.socket}
         systemctl daemon-reload
+        wait_for_state homedsshtest inactive
         homectl remove homedsshtest
         for dir in /etc /usr/lib; do
             if [[ -f "$dir/pam.d/sshd.bak" ]]; then
@@ -631,8 +632,8 @@ EOF
         -o "SetEnv PASSWORD=hunter4711" -o "StrictHostKeyChecking no" \
         homedsshtest@localhost env
 
-    wait_for_state homedsshtest inactive
-    homectl remove homedsshtest
+    trap - EXIT
+    at_exit
 fi
 
 NEWPASSWORD=hunter4711 homectl create aliastest --storage=directory --alias=aliastest2 --alias=aliastest3 --realm=myrealm