stable-2.02 - test: Fix handling leftovers from previous tests
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=61c321d110630d4fc2ed8f75cb3a9ba78e29599b Commit: 61c321d110630d4fc2ed8f75cb3a9ba78e29599b Parent: 26f94d91195531730c22eac26c741f1b4d2e0f1e Author: Marian Csontos <[email protected]> AuthorDate: Wed Nov 20 15:23:48 2019 +0100 Committer: Marian Csontos <[email protected]> CommitterDate: Wed Nov 20 15:31:21 2019 +0100
test: Fix handling leftovers from previous tests
teardown fails current PREFIX is prefix of previously failed test with leftovers in dmtable.
(cherry picked from commit 1e669ab315c32aba3f47c37771f26ab7c8e151dd)
--- test/lib/aux.sh | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
test/lib/aux.sh +1 -1
@@ -568,7 +568,7 @@ teardown() { if test ! -f SKIP_THIS_TEST ; then # Evaluate left devices only for non-skipped tests - TEST_LEAKED_DEVICES=$(dmsetup table | grep "$PREFIX" | grep -v "${PREFIX}pv") || true + TEST_LEAKED_DEVICES=$(dmsetup table | grep "$PREFIX" | grep -Ev "${PREFIX}(pv|[0-9])") || true fi kill_tagged_processes