]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test: wait for slice unit being (de)activated
authorYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 17 May 2024 04:25:25 +0000 (13:25 +0900)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Fri, 17 May 2024 07:02:23 +0000 (09:02 +0200)
Fixes #32731.

test/units/TEST-15-DROPIN.sh

index f5bd8d8af4a94d147eec8a86e91b6d050564ba13..5e4df52a4e453dfc8a11900d783361857a08e46d 100755 (executable)
@@ -258,6 +258,8 @@ EOF
                'MemoryMax' t 1000000002 \
                0
 
+        timeout 1m bash -c 'until systemctl is-active a-b-c.slice; do sleep 1s; done'
+
         # The override takes precedence for MemoryMax
         check_ok a-b-c.slice MemoryMax "1000000000"
         # The transient setting replaces the default
@@ -275,6 +277,8 @@ EOF
                StopUnit 'ss' \
                'a-b-c.slice' 'replace'
 
+        timeout 1m bash -c 'while systemctl is-active a-b-c.slice; do sleep 1s; done'
+
         rm -f "/run/systemd/system/$dropin/override.conf"
     done