From: Zdenek Kabelac <zkabelac@sourceware.org>
To: lvm-devel@redhat.com
Subject: main - tests: use aux mdadm_assemble wrapper
Date: Fri, 26 Mar 2021 19:50:28 +0000 (GMT) [thread overview]
Message-ID: <20210326195028.C82CF3857C7A@sourceware.org> (raw)
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=02e02a5ccc7275c23e59e65df25287c8f82276fa
Commit: 02e02a5ccc7275c23e59e65df25287c8f82276fa
Parent: 4c59b2aa216cb5649fe5e3f54230e85ee994869b
Author: Zdenek Kabelac <zkabelac@redhat.com>
AuthorDate: Fri Mar 26 16:07:24 2021 +0100
Committer: Zdenek Kabelac <zkabelac@redhat.com>
CommitterDate: Fri Mar 26 20:39:41 2021 +0100
tests: use aux mdadm_assemble wrapper
---
test/shell/lvm-on-md.sh | 19 ++-----------------
test/shell/pvcreate-md-fake-hdr.sh | 4 ++--
2 files changed, 4 insertions(+), 19 deletions(-)
diff --git a/test/shell/lvm-on-md.sh b/test/shell/lvm-on-md.sh
index 7c14e6748..d2810b8cf 100644
--- a/test/shell/lvm-on-md.sh
+++ b/test/shell/lvm-on-md.sh
@@ -27,19 +27,6 @@ _clear_online_files() {
. lib/inittest
-which mdadm || skip
-
-STRACE=
-[ "$DM_DEV_DIR" = "/dev" ] && mdadm -V 2>&1 | grep " v3.2" && {
- # use this 'trick' to slow down mdadm which otherwise
- # is racing with udev rule since mdadm internally
- # opens and closes raid leg devices in RW mode and then
- # tries to get exlusive access to the leg device during
- # insertion to kernel and fails during assembly
- # There could be more affted version of mdadm.
- STRACE="strace -f -o /dev/null"
-}
-
# This stops lvm from taking advantage of hints which
# will have already excluded md components.
@@ -121,8 +108,7 @@ test ! -f "$RUNDIR/lvm/vgs_online/$vg"
# should not show an active lv
not dmsetup info $vg-$lv1
-$STRACE mdadm --assemble "$mddev" "$dev1" "$dev2"
-aux udev_wait
+aux mdadm_assemble "$mddev" "$dev1" "$dev2"
not pvs "$dev1"
not pvs "$dev2"
@@ -276,8 +262,7 @@ test ! -f "$RUNDIR/lvm/vgs_online/$vg"
not dmsetup info $vg-$lv1
# start the md dev
-$STRACE mdadm --assemble "$mddev" "$dev1" "$dev2"
-aux udev_wait
+aux mdadm_assemble "$mddev" "$dev1" "$dev2"
not pvs "$dev1"
not pvs "$dev2"
diff --git a/test/shell/pvcreate-md-fake-hdr.sh b/test/shell/pvcreate-md-fake-hdr.sh
index 1550bc4c0..7a16ef5e4 100644
--- a/test/shell/pvcreate-md-fake-hdr.sh
+++ b/test/shell/pvcreate-md-fake-hdr.sh
@@ -88,8 +88,8 @@ if mdadm --detail "$mddev" ; then
fi
# now reassemble array from PV1 & PV2
-mdadm --assemble --verbose "$mddev" "$dev1" "$dev2"
-aux udev_wait
+aux mdadm_assemble --verbose "$mddev" "$dev1" "$dev2"
+
sleep 1
# and let 'fake hdr' to be fixed from master/primary leg
reply other threads:[~2021-03-26 19:50 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20210326195028.C82CF3857C7A@sourceware.org \
--to=zkabelac@sourceware.org \
--cc=lvm-devel@redhat.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.