All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zdenek Kabelac <zkabelac@sourceware.org>
To: lvm-devel@redhat.com
Subject: stable-2.02 - tests: move function to aux for reuse
Date: Fri, 16 Oct 2020 19:12:10 +0000 (GMT)	[thread overview]
Message-ID: <20201016191210.5FE5D396EC8D@sourceware.org> (raw)

Gitweb:        https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=de1b894337759c574f5e1cf11dcd40ef765d6ad2
Commit:        de1b894337759c574f5e1cf11dcd40ef765d6ad2
Parent:        c68380746ab82a5c2517c71435daf830fa158a6f
Author:        Zdenek Kabelac <zkabelac@redhat.com>
AuthorDate:    Tue Sep 22 23:37:50 2020 +0200
Committer:     Zdenek Kabelac <zkabelac@redhat.com>
CommitterDate: Fri Oct 16 18:09:55 2020 +0200

tests: move function to aux for reuse

---
 test/lib/aux.sh                               | 8 ++++++++
 test/shell/lvextend-thin-metadata-dmeventd.sh | 5 +----
 2 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/test/lib/aux.sh b/test/lib/aux.sh
index 8758dc01d..1a66df16e 100644
--- a/test/lib/aux.sh
+++ b/test/lib/aux.sh
@@ -1504,6 +1504,14 @@ thin_pool_error_works_32() {
 	esac
 }
 
+thin_restore_needs_more_volumes() {
+	case $("$LVM_TEST_THIN_RESTORE_CMD" -V) in
+		# With older version of thin-tool we got slightly more compact metadata
+		0.[0-6]*|0.7.0*) return 0 ;;
+	esac
+	return 1
+}
+
 udev_wait() {
 	pgrep udev >/dev/null || return 0
 	which udevadm &>/dev/null || return 0
diff --git a/test/shell/lvextend-thin-metadata-dmeventd.sh b/test/shell/lvextend-thin-metadata-dmeventd.sh
index 5f6db994a..3193cc29c 100644
--- a/test/shell/lvextend-thin-metadata-dmeventd.sh
+++ b/test/shell/lvextend-thin-metadata-dmeventd.sh
@@ -61,10 +61,7 @@ test -n "$LVM_TEST_THIN_RESTORE_CMD" || LVM_TEST_THIN_RESTORE_CMD=$(which thin_r
 aux have_thin 1 10 0 || skip
 
 BIG_DATA=""
-case $("$LVM_TEST_THIN_RESTORE_CMD" -V) in
-	# With older version of thin-tool we got slightly more compact metadata
-	0.[0-6]*|0.7.0*) BIG_DATA="generate_more_metadata" ;;
-esac
+aux thin_restore_needs_more_volumes && BIG_DATA="generate_more_metadata"
 
 aux prepare_dmeventd
 



                 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=20201016191210.5FE5D396EC8D@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.