From: Zdenek Kabelac <zkabelac@sourceware.org>
To: lvm-devel@redhat.com
Subject: stable-2.02 - tests: aux hides zero and error device
Date: Fri, 16 Oct 2020 19:12:18 +0000 (GMT) [thread overview]
Message-ID: <20201016191218.6003A396EC45@sourceware.org> (raw)
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=4d8d8856f12cab71663325eefe59c06f10cb884d
Commit: 4d8d8856f12cab71663325eefe59c06f10cb884d
Parent: bd860802d4cfabaef1da46140895826a80932d6e
Author: Zdenek Kabelac <zkabelac@redhat.com>
AuthorDate: Fri Oct 2 19:19:30 2020 +0200
Committer: Zdenek Kabelac <zkabelac@redhat.com>
CommitterDate: Fri Oct 16 18:09:55 2020 +0200
tests: aux hides zero and error device
When ERR_DEV and ZERO_DEV are used, they are automatically
taken down when the last user no longer needs them,
so hide them from 'forgotten' device check.
---
test/lib/aux.sh | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/test/lib/aux.sh b/test/lib/aux.sh
index 1a66df16e..667ca14ac 100644
--- a/test/lib/aux.sh
+++ b/test/lib/aux.sh
@@ -564,14 +564,14 @@ teardown() {
echo -n "## teardown..."
unset LVM_LOG_FILE_EPOCH
- test ! -f ERR_DEV || should dmsetup remove $(cat ERR_DEV_NAME)
- test ! -f ZERO_DEV || should dmsetup remove $(cat ZERO_DEV_NAME)
-
if test -f TESTNAME ; then
if test ! -f SKIP_THIS_TEST ; then
# Evaluate left devices only for non-skipped tests
- TEST_LEAKED_DEVICES=$(dmsetup table | grep "$PREFIX" | grep -Ev "${PREFIX}(pv|[0-9])") || true
+ TEST_LEAKED_DEVICES=$(dmsetup table | grep "$PREFIX" | \
+ grep -Ev "${PREFIX}(pv|[0-9])" | \
+ grep -v "$(cat ERR_DEV_NAME 2>/dev/null)" | \
+ grep -v "$(cat ZERO_DEV_NAME 2>/dev/null)") || true
fi
kill_tagged_processes
reply other threads:[~2020-10-16 19:12 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=20201016191218.6003A396EC45@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.