]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
TEST-04-FULL-SYSTEMD: report failure on rootfs creation
authorHarald Hoyer <harald@redhat.com>
Wed, 26 Feb 2020 16:05:11 +0000 (17:05 +0100)
committerHarald Hoyer <harald@redhat.com>
Thu, 27 Feb 2020 14:27:30 +0000 (15:27 +0100)
test/TEST-04-FULL-SYSTEMD/create-root.sh
test/TEST-04-FULL-SYSTEMD/test.sh

index 0a662576c546562d53f02f5f715c32ce46a6800a..8a4bdaf97bc41fe3cf22b9f13523b64900e060f6 100755 (executable)
@@ -1,5 +1,6 @@
 #!/bin/sh
 # don't let udev and this script step on eachother's toes
+set -x
 for x in 64-lvm.rules 70-mdadm.rules 99-mount-rules; do
     > "/etc/udev/rules.d/$x"
 done
index 337f021964a972edfa82f8895502123eeb86ae0c..4ef6e672625c6c2fe70e628fe6fbafe25403cb65 100755 (executable)
@@ -256,8 +256,10 @@ EOF
         -m 512M  -smp 2 -nographic -net none \
         -append "root=/dev/fakeroot rw rootfstype=btrfs quiet console=ttyS0,115200n81 selinux=0" \
         -initrd $TESTDIR/initramfs.makeroot  || return 1
-    grep -F -m 1 -q dracut-root-block-created $TESTDIR/root.btrfs || return 1
-
+    if ! grep -F -m 1 -q dracut-root-block-created $TESTDIR/root.btrfs; then
+        echo "Could not create root filesystem"
+        return 1
+    fi
 
     (
         export initdir=$TESTDIR/overlay