]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test: tell dfuzzer to skip Reexecute()
authorFrantisek Sumsal <frantisek@sumsal.cz>
Wed, 26 Apr 2023 09:05:40 +0000 (11:05 +0200)
committerFrantisek Sumsal <frantisek@sumsal.cz>
Wed, 26 Apr 2023 12:41:05 +0000 (14:41 +0200)
As described in systemd/systemd#27204 reexecuting the daemon while
running in a systemd-run "session" causes the session end prematurely.
Let's skip the Reexecute() method in dfuzzer and trigger it manually
until the issue is resolved.

test/units/testsuite-21.sh

index d931e631678e2ff872288bb1c5284d4db49b078b..36f647ca5f69ffe7b9e6aba0350218fdb0ab6b18 100755 (executable)
@@ -7,6 +7,7 @@ set -o pipefail
 # on the fly by one of the fuzzers
 systemctl list-jobs | grep -F 'end.service' && SHUTDOWN_AT_EXIT=1 || SHUTDOWN_AT_EXIT=0
 
+# shellcheck disable=SC2317
 at_exit() {
     set +e
     # We have to call the end.service/poweroff explicitly even if it's specified on
@@ -24,6 +25,10 @@ trap at_exit EXIT
 
 systemctl log-level info
 
+# FIXME: systemd-run doesn't play well with daemon-reexec
+# See: https://github.com/systemd/systemd/issues/27204
+sed -i '/\[org.freedesktop.systemd1\]/aorg.freedesktop.systemd1.Manager:Reexecute FIXME' /etc/dfuzzer.conf
+
 # TODO
 #   * check for possibly newly introduced buses?
 BUS_LIST=(
@@ -84,6 +89,8 @@ for bus in "${BUS_LIST[@]}"; do
 
     # Let's reload the systemd daemon to test (de)serialization as well
     systemctl daemon-reload
+    # FIXME: explicitly trigger reexecute until systemd/systemd#27204 is resolved
+    systemctl daemon-reexec
 done
 
 umount /var/lib/machines
@@ -95,6 +102,8 @@ for bus in "${SESSION_BUS_LIST[@]}"; do
 
     # Let's reload the systemd user daemon to test (de)serialization as well
     systemctl --machine 'testuser@.host' --user daemon-reload
+    # FIXME: explicitly trigger reexecute until systemd/systemd#27204 is resolved
+    systemctl --machine 'testuser@.host' --user daemon-reexec
 done
 
 echo OK >/testok