summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJes Sorensen <Jes.Sorensen@redhat.com>2012-05-22 18:55:29 +0200
committerNeilBrown <neilb@suse.de>2012-05-23 13:25:44 +1000
commit04c1ca5f290251f1d0399b11751bb56c9740b1f3 (patch)
tree71f69a3fdbbbefd703b887fb10618dcee0ad941a /test
parent3b2aad6e8b7fdcaeb3d9471af8de6ff3339291f9 (diff)
Check for multipath module before running multipath tests
Some systems do not ship the md multipath module. If not available simply skip any multipath tests. Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'test')
-rwxr-xr-xtest6
1 files changed, 6 insertions, 0 deletions
diff --git a/test b/test
index 4f0979eb..0679983e 100755
--- a/test
+++ b/test
@@ -19,6 +19,12 @@ then
echo >&2 "test: $mdadm isn't usable."
fi
+# Check whether to run multipath tests
+modprobe multipath 2> /dev/null
+if grep -s 'Personalities : .*multipath' > /dev/null /proc/mdstat ; then
+ MULTIPATH="yes"
+fi
+
# assume md0, md1, md2 exist in /dev
md0=/dev/md0 md1=/dev/md1 md2=/dev/md2
mdp0=/dev/md_d0