summaryrefslogtreecommitdiffstats
path: root/test/TEST-02-SYSTEMD/test.sh
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-03 14:01:36 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-03 14:01:36 +0000
commit70de5d4041249c1a0f597714398cc245f59495c6 (patch)
treeff491e31b95b662ca6c481ac49d1ca8a94c0226b /test/TEST-02-SYSTEMD/test.sh
parentAdding debian version 060+5-8. (diff)
downloaddracut-70de5d4041249c1a0f597714398cc245f59495c6.tar.xz
dracut-70de5d4041249c1a0f597714398cc245f59495c6.zip
Merging upstream version 102.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'test/TEST-02-SYSTEMD/test.sh')
-rwxr-xr-xtest/TEST-02-SYSTEMD/test.sh28
1 files changed, 10 insertions, 18 deletions
diff --git a/test/TEST-02-SYSTEMD/test.sh b/test/TEST-02-SYSTEMD/test.sh
index 40d1b3e..4d48fd2 100755
--- a/test/TEST-02-SYSTEMD/test.sh
+++ b/test/TEST-02-SYSTEMD/test.sh
@@ -11,13 +11,13 @@ test_check() {
test_run() {
declare -a disk_args=()
declare -i disk_index=0
- qemu_add_drive_args disk_index disk_args "$TESTDIR"/marker.img marker
- qemu_add_drive_args disk_index disk_args "$TESTDIR"/root.img root
+ qemu_add_drive disk_index disk_args "$TESTDIR"/marker.img marker
+ qemu_add_drive disk_index disk_args "$TESTDIR"/root.img root
test_marker_reset
"$testdir"/run-qemu \
"${disk_args[@]}" \
- -append "panic=1 oops=panic softlockup_panic=1 systemd.crash_reboot root=LABEL=dracut rw loglevel=77 systemd.log_level=debug systemd.log_target=console rd.retry=3 rd.info console=ttyS0,115200n81 selinux=0 init=/sbin/init rd.shell=0 $DEBUGFAIL" \
+ -append "root=LABEL=dracut rw systemd.log_target=console rd.retry=3 init=/sbin/init" \
-initrd "$TESTDIR"/initramfs.testing || return 1
test_marker_check || return 1
@@ -25,12 +25,8 @@ test_run() {
test_setup() {
# Create what will eventually be our root filesystem onto an overlay
- "$DRACUT" -l --keep --tmpdir "$TESTDIR" \
+ "$DRACUT" -N -l --keep --tmpdir "$TESTDIR" \
-m "test-root" \
- -i ./test-init.sh /sbin/init \
- -i "${PKGLIBDIR}/modules.d/99base/dracut-lib.sh" "/lib/dracut-lib.sh" \
- -i "${PKGLIBDIR}/modules.d/99base/dracut-dev-lib.sh" "/lib/dracut-dev-lib.sh" \
- --no-hostonly --no-hostonly-cmdline --nomdadmconf --nohardlink \
-f "$TESTDIR"/initramfs.root "$KVERSION" || return 1
mkdir -p "$TESTDIR"/overlay/source && mv "$TESTDIR"/dracut.*/initramfs/* "$TESTDIR"/overlay/source && rm -rf "$TESTDIR"/dracut.*
@@ -38,9 +34,8 @@ test_setup() {
# create an initramfs that will create the target root filesystem.
# We do it this way so that we do not risk trashing the host mdraid
# devices, volume groups, encrypted partitions, etc.
- "$DRACUT" -l -i "$TESTDIR"/overlay / \
+ "$DRACUT" -N -l -i "$TESTDIR"/overlay / \
-m "test-makeroot" \
- -I "mkfs.ext4" \
-i ./create-root.sh /lib/dracut/hooks/initqueue/01-create-root.sh \
--nomdadmconf \
--no-hostonly-cmdline -N \
@@ -49,8 +44,8 @@ test_setup() {
declare -a disk_args=()
declare -i disk_index=0
- qemu_add_drive_args disk_index disk_args "$TESTDIR"/marker.img marker 1
- qemu_add_drive_args disk_index disk_args "$TESTDIR"/root.img root 80
+ qemu_add_drive disk_index disk_args "$TESTDIR"/marker.img marker 1
+ qemu_add_drive disk_index disk_args "$TESTDIR"/root.img root 80
# Invoke KVM and/or QEMU to actually create the target filesystem.
"$testdir"/run-qemu \
@@ -62,14 +57,11 @@ test_setup() {
# systemd-analyze.sh calls man indirectly
# make the man command succeed always
- "$DRACUT" -l -i "$TESTDIR"/overlay / \
- -a "test systemd" \
- -o "network kernel-network-modules" \
- -d "piix ide-gd_mod ata_piix ext4 sd_mod" \
+ test_dracut \
+ -a "systemd" \
-i ./systemd-analyze.sh /lib/dracut/hooks/pre-pivot/00-systemd-analyze.sh \
-i "/bin/true" "/usr/bin/man" \
- --no-hostonly-cmdline -N \
- -f "$TESTDIR"/initramfs.testing "$KVERSION" || return 1
+ "$TESTDIR"/initramfs.testing
}
# shellcheck disable=SC1090