Skip to content

Commit bc1bf6a

Browse files
LaszloGombosjohannbg
authored andcommitted
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.
1 parent 31c4aac commit bc1bf6a

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

test/TEST-02-SYSTEMD/systemd-analyze.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
#!/bin/bash
22

3-
cp /usr/bin/true /usr/bin/man
4-
53
for i in \
64
sysinit.target \
75
basic.target \

test/TEST-02-SYSTEMD/test.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,15 @@ test_setup() {
102102
export initdir=$TESTDIR/overlay
103103
# shellcheck disable=SC1090
104104
. "$basedir"/dracut-init.sh
105-
inst_multiple poweroff shutdown dd
105+
inst_multiple poweroff shutdown dd true
106+
106107
inst_hook shutdown-emergency 000 ./hard-off.sh
108+
109+
# systemd-analyze.sh calls man indirectly
110+
# make the man command succeed always
111+
inst "$(find_binary true)" "/usr/bin/man"
107112
inst_hook pre-pivot 000 ./systemd-analyze.sh
113+
108114
inst_hook emergency 000 ./hard-off.sh
109115
)
110116
"$basedir"/dracut.sh -l -i "$TESTDIR"/overlay / \

0 commit comments

Comments
 (0)