From: Frantisek Sumsal Date: Thu, 28 Dec 2023 22:42:47 +0000 (+0100) Subject: test: avoid starting/stopping unwanted units during fuzzing X-Git-Tag: v256-rc1~1362^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a66031255ffd3df588db29155dc31b20a47b55bb;p=thirdparty%2Fsystemd.git 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. --- 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