]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
Revert "Revert "test: add test case for systemd-update-utmp vs daemon-reexec""
authorMike Yuan <me@yhndnzj.com>
Mon, 28 Aug 2023 09:29:31 +0000 (17:29 +0800)
committerLuca Boccassi <luca.boccassi@gmail.com>
Mon, 28 Aug 2023 16:43:57 +0000 (17:43 +0100)
This reverts commit 837773add465bd0a0d1f598203d297cf0129468b.

The original issue #27287 is fixed by #28123. Let's
reintroduce the test for systemd-update-utmp.

test/units/testsuite-01.sh

index 780f37ee128116028248e1c7be3d6f00aa018772..870b62da9aba05f0f39ca5af0741518aaccb1cf0 100755 (executable)
@@ -45,4 +45,17 @@ systemctl daemon-reload
 # of systemd-analyze blame. See issue #27187.
 systemd-analyze blame
 
+# Test for 'systemd-update-utmp runlevel' vs 'systemctl daemon-reexec'.
+# See issue #27163.
+# shellcheck disable=SC2034
+for _ in {0..10}; do
+    systemctl daemon-reexec &
+    pid_reexec=$!
+    # shellcheck disable=SC2034
+    for _ in {0..10}; do
+        SYSTEMD_LOG_LEVEL=debug /usr/lib/systemd/systemd-update-utmp runlevel
+    done
+    wait "$pid_reexec"
+done
+
 touch /testok