]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
test: change the LABEL to include spaces
authorHarald Hoyer <harald@redhat.com>
Mon, 8 Mar 2021 09:15:29 +0000 (10:15 +0100)
committerHarald Hoyer <harald@hoyer.xyz>
Wed, 10 Mar 2021 18:31:19 +0000 (19:31 +0100)
Test for root device with a LABEL, which includes spaces.

test/TEST-01-BASIC/create-root.sh
test/TEST-01-BASIC/test.sh

index 97071fa356dabccb21f33dd4d9f8fdc2a852136f..72c2d8be674eaf7258715e7b73c860141d37a836 100755 (executable)
@@ -13,7 +13,7 @@ sfdisk /dev/sda <<EOF
 EOF
 
 udevadm settle
-mkfs.ext3 -L dracut /dev/sda2
+mkfs.ext3 -L '  rdinit=/bin/sh' /dev/sda2
 mkdir -p /root
 mount /dev/sda2 /root
 cp -a -t /root /source/*
index 20a02b9488b2dcb8982144621d46d7a856d6ed20..9bc01c84c90846f5d6d370e8890c257885e6474d 100755 (executable)
@@ -4,7 +4,7 @@ TEST_DESCRIPTION="root filesystem on a ext3 filesystem"
 KVERSION=${KVERSION-$(uname -r)}
 
 # Uncomment this to debug failures
-#DEBUGFAIL="rd.shell rd.break"
+# DEBUGFAIL="rd.shell rd.break"
 
 test_run() {
     dd if=/dev/zero of=$TESTDIR/result bs=1M count=1
@@ -12,7 +12,7 @@ test_run() {
         -drive format=raw,index=0,media=disk,file=$TESTDIR/root.ext3 \
         -drive format=raw,index=1,media=disk,file=$TESTDIR/result \
         -watchdog i6300esb -watchdog-action poweroff \
-        -append "panic=1 systemd.crash_reboot root=LABEL=dracut rw systemd.log_level=debug systemd.log_target=console rd.retry=3 rd.debug console=ttyS0,115200n81 rd.shell=0 $DEBUGFAIL" \
+        -append "panic=1 systemd.crash_reboot \"root=LABEL=  rdinit=/bin/sh\" rw systemd.log_level=debug systemd.log_target=console rd.retry=3 rd.debug console=ttyS0,115200n81 rd.shell=0 $DEBUGFAIL" \
         -initrd $TESTDIR/initramfs.testing || return 1
     grep -U --binary-files=binary -F -m 1 -q dracut-root-block-success $TESTDIR/result || return 1
 }