]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test: add test case for systemd-update-utmp vs daemon-reexec 27173/head
authorYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 26 Apr 2023 14:56:50 +0000 (23:56 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 24 May 2023 11:06:10 +0000 (20:06 +0900)
test/units/testsuite-01.sh

index 91dd47ca145717d2612746507b62376a7aab7a0f..475eaa2923df5195ec17f6ab76abeefcd611a079 100755 (executable)
@@ -44,4 +44,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
+
 echo OK >/testok