dracut/0082.patch

40 lines
1.2 KiB
Diff
Raw Normal View History

2018-01-18 09:07:29 +00:00
From 5cc17c25c2f450e54a67c0de9b5031d4c2fd24cb Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Fri, 12 Jan 2018 11:34:45 +0100
Subject: [PATCH] TEST-14-IMSM: fail early, if setup failed
---
test/TEST-14-IMSM/test.sh | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/test/TEST-14-IMSM/test.sh b/test/TEST-14-IMSM/test.sh
index 9f4ed8a8..21172357 100755
--- a/test/TEST-14-IMSM/test.sh
+++ b/test/TEST-14-IMSM/test.sh
@@ -30,6 +30,11 @@ client_run() {
test_run() {
read MD_UUID < $TESTDIR/mduuid
+ if [[ -z $MD_UUID ]]; then
+ echo "Setup failed"
+ return 1
+ fi
+
client_run rd.auto rd.md.imsm=0 || return 1
client_run rd.md.uuid=$MD_UUID rd.dm=0 || return 1
# This test succeeds, because the mirror parts are found without
@@ -109,6 +114,12 @@ test_setup() {
-initrd $TESTDIR/initramfs.makeroot || return 1
grep -F -m 1 -q dracut-root-block-created $TESTDIR/root.ext2 || return 1
eval $(grep -F --binary-files=text -m 1 MD_UUID $TESTDIR/root.ext2)
+
+ if [[ -z $MD_UUID ]]; then
+ echo "Setup failed"
+ return 1
+ fi
+
echo $MD_UUID > $TESTDIR/mduuid
(
export initdir=$TESTDIR/overlay