]> git.ipfire.org Git - thirdparty/mdadm.git/blobdiff - test
Check for multipath module before running multipath tests
[thirdparty/mdadm.git] / test
diff --git a/test b/test
index 4f0979eb4d94afbeb163a8337e9f7dab8142499c..0679983e7ddab76d52e86d38e5f904336516f980 100755 (executable)
--- 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