From: Laszlo Gombos Date: Thu, 18 Aug 2022 01:25:38 +0000 (+0000) Subject: test(SYSTEMD): make the man command succeed X-Git-Tag: 058~140 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bc1bf6a19dd4ad1b1b9c47e32a4c8277043fc291;p=thirdparty%2Fdracut.git test(SYSTEMD): make the man command succeed Document the reason of the existing workaround. Move the existing logic to the initramfs.testing generation phase and make the steps more generic. This change makes the test pass on debian. --- diff --git a/test/TEST-02-SYSTEMD/systemd-analyze.sh b/test/TEST-02-SYSTEMD/systemd-analyze.sh index 5127b6413..55f872843 100755 --- a/test/TEST-02-SYSTEMD/systemd-analyze.sh +++ b/test/TEST-02-SYSTEMD/systemd-analyze.sh @@ -1,7 +1,5 @@ #!/bin/bash -cp /usr/bin/true /usr/bin/man - for i in \ sysinit.target \ basic.target \ diff --git a/test/TEST-02-SYSTEMD/test.sh b/test/TEST-02-SYSTEMD/test.sh index 796f74873..64b135ba4 100755 --- a/test/TEST-02-SYSTEMD/test.sh +++ b/test/TEST-02-SYSTEMD/test.sh @@ -102,9 +102,15 @@ test_setup() { export initdir=$TESTDIR/overlay # shellcheck disable=SC1090 . "$basedir"/dracut-init.sh - inst_multiple poweroff shutdown dd + inst_multiple poweroff shutdown dd true + inst_hook shutdown-emergency 000 ./hard-off.sh + + # systemd-analyze.sh calls man indirectly + # make the man command succeed always + inst "$(find_binary true)" "/usr/bin/man" inst_hook pre-pivot 000 ./systemd-analyze.sh + inst_hook emergency 000 ./hard-off.sh ) "$basedir"/dracut.sh -l -i "$TESTDIR"/overlay / \