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