From: Jes.Sorensen@redhat.com
To: neilb@suse.de
Cc: linux-raid@vger.kernel.org
Subject: [PATCH 1/2] Check for multipath module before running multipath tests
Date: Tue, 22 May 2012 18:55:29 +0200 [thread overview]
Message-ID: <1337705730-7335-2-git-send-email-Jes.Sorensen@redhat.com> (raw)
In-Reply-To: <1337705730-7335-1-git-send-email-Jes.Sorensen@redhat.com>
From: Jes Sorensen <Jes.Sorensen@redhat.com>
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>
---
test | 6 ++++++
tests/00multipath | 5 +++++
2 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/test b/test
index 4f0979e..0679983 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
diff --git a/tests/00multipath b/tests/00multipath
index bc0429f..84e4d69 100644
--- a/tests/00multipath
+++ b/tests/00multipath
@@ -2,6 +2,11 @@
#
# create a multipath, and fail and stuff
+if [ "$MULTIPATH" != "yes" ]; then
+ echo -ne 'skipping... '
+ exit 0
+fi
+
mdadm -CR $md1 -l multipath -n2 $path0 $path1
testdev $md1 1 $mdsize12 1
--
1.7.7.6
next prev parent reply other threads:[~2012-05-22 16:55 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-22 16:55 [PATCH 0/2] Test suite enhancements Jes.Sorensen
2012-05-22 16:55 ` Jes.Sorensen [this message]
2012-05-22 16:55 ` [PATCH 2/2] Add command line argument parsing to 'test' sript Jes.Sorensen
2012-05-23 3:39 ` NeilBrown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1337705730-7335-2-git-send-email-Jes.Sorensen@redhat.com \
--to=jes.sorensen@redhat.com \
--cc=linux-raid@vger.kernel.org \
--cc=neilb@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).