From a66031255ffd3df588db29155dc31b20a47b55bb Mon Sep 17 00:00:00 2001 From: Frantisek Sumsal Date: Thu, 28 Dec 2023 23:42:47 +0100 Subject: [PATCH] test: avoid starting/stopping unwanted units during fuzzing Skip calling start and stop methods on unit objects, as doing that is not only time consuming, but it also starts/stops units that interfere with the machine state. The actual code paths should be covered (to some degree) by the respective method counterparts on the manager object. --- test/units/testsuite-21.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/units/testsuite-21.sh b/test/units/testsuite-21.sh index ed0f88e2b23..7b2013fb51c 100755 --- a/test/units/testsuite-21.sh +++ b/test/units/testsuite-21.sh @@ -39,6 +39,13 @@ add_suppression "org.freedesktop.systemd1" "org.freedesktop.systemd1.Manager:Ree add_suppression "org.freedesktop.systemd1" "org.freedesktop.systemd1.Manager:SoftReboot destructive" add_suppression "org.freedesktop.login1" "Sleep destructive" +# Skip calling start and stop methods on unit objects, as doing that is not only time consuming, but it also +# starts/stops units that interfere with the machine state. The actual code paths should be covered (to some +# degree) by the respective method counterparts on the manager object. +for method in Start Stop Restart ReloadOrRestart ReloadOrTryRestart Kill; do + add_suppression "org.freedesktop.systemd1" "org.freedesktop.systemd1.Unit:$method" +done + cat /etc/dfuzzer.conf # TODO -- 2.47.3