summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZdenek Kabelac <zkabelac@redhat.com>2014-10-07 10:12:49 +0200
committerZdenek Kabelac <zkabelac@redhat.com>2014-10-07 10:19:33 +0200
commit75c4d268e9b0b70c58f8b8b018fe200aca7b8bb2 (patch)
treea44cba111f9215c44ebe84b524b244b7e2f514f8
parentc59ef732067988b708c7f809719ff887596a1e9f (diff)
downloadlvm2-75c4d268e9b0b70c58f8b8b018fe200aca7b8bb2.tar.gz
tests: check for cache and raid
Skip some tests on systems without cache or raid.
-rw-r--r--test/shell/lvconvert-cache.sh4
-rw-r--r--test/shell/lvconvert-thin.sh4
2 files changed, 4 insertions, 4 deletions
diff --git a/test/shell/lvconvert-cache.sh b/test/shell/lvconvert-cache.sh
index ae2de35eb..4f266bad4 100644
--- a/test/shell/lvconvert-cache.sh
+++ b/test/shell/lvconvert-cache.sh
@@ -121,10 +121,10 @@ fail lvconvert --yes --type cache $vg/$lv2 --cachepool $vg/$lv1
fail lvconvert --yes --type cache $vg/$lv1 --cachepool $vg/$lv2
fail lvconvert --yes --type cache-pool $vg/$lv1
fail lvconvert --yes --type mirror -m1 $vg/$lv1
-fail lvconvert --yes --type raid1 -m1 $vg/$lv1
+not aux have_raid 1 0 0 || fail lvconvert --yes --type raid1 -m1 $vg/$lv1
fail lvconvert --yes --type snapshot $vg/$lv1 $vg/$lv2
fail lvconvert --yes --type snapshot $vg/$lv2 $vg/$lv1
-fail lvconvert --yes -T --thinpool $vg/$lv2 $vg/$lv1
+not aux have_thin 1 0 0 || fail lvconvert --yes -T --thinpool $vg/$lv2 $vg/$lv1
lvremove -f $vg
diff --git a/test/shell/lvconvert-thin.sh b/test/shell/lvconvert-thin.sh
index bd43d584a..e61e4709c 100644
--- a/test/shell/lvconvert-thin.sh
+++ b/test/shell/lvconvert-thin.sh
@@ -134,9 +134,9 @@ lvcreate -L32 -n $lv1 $vg
lvcreate -L16 -n $lv2 $vg
lvconvert --yes --thinpool $vg/$lv1
-fail lvconvert --yes --type cache-pool $vg/$lv1
+not aux have_cache 1 3 0 || fail lvconvert --yes --type cache-pool $vg/$lv1
fail lvconvert --yes --type mirror -m1 $vg/$lv1
-fail lvconvert --yes --type raid1 -m1 $vg/$lv1
+not aux have_raid 1 0 0 || fail lvconvert --yes --type raid1 -m1 $vg/$lv1
fail lvconvert --yes --type snapshot $vg/$lv1 $vg/$lv2
fail lvconvert --yes --type snapshot $vg/$lv2 $vg/$lv1
fail lvconvert --yes --type thin-pool $vg/$lv1