summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZdenek Kabelac <zkabelac@redhat.com>2014-10-31 23:18:31 +0100
committerZdenek Kabelac <zkabelac@redhat.com>2014-11-03 14:19:34 +0100
commite4e96f6b19e2ae7ba8841c1e93ba385cc18ca3c9 (patch)
treee5b25daa5ac119698363f3ad8d4728dac54357ea
parent6c32ced6572b857ca954601757268dc4bb688b2f (diff)
downloadlvm2-e4e96f6b19e2ae7ba8841c1e93ba385cc18ca3c9.tar.gz
tests: usage of -m0 -Mn
Test -m0 passed with types. Check --readahead and thins.
-rw-r--r--test/shell/lvcreate-thin.sh17
-rw-r--r--test/shell/lvcreate-usage.sh2
2 files changed, 18 insertions, 1 deletions
diff --git a/test/shell/lvcreate-thin.sh b/test/shell/lvcreate-thin.sh
index 619a40ca1..733888ea1 100644
--- a/test/shell/lvcreate-thin.sh
+++ b/test/shell/lvcreate-thin.sh
@@ -200,6 +200,23 @@ not lvcreate --chunksize 256 -l1 -T $vg/pool1
not lvcreate --chunksize 32 -l1 -T $vg/pool1
# Too large chunk size (max is 1GB)
not lvcreate -L4M --chunksize 2G -T $vg/pool1
+# Cannot specify --minor with pool
+fail lvcreate -L10M --minor 100 -T $vg/pool_minor
+
+# FIXME: Currently ambigous - is it for thin, thin-pool, both ?
+fail lvcreate -L4M -Mn -m0 -T --readahead 32 -V20 -n $lv $vg/pool_normal
+
+# Check read-ahead setting will also pass with -Mn -m0
+lvcreate -L4M -Mn -m0 -T --readahead 64k $vg/pool_readahead
+lvcreate -V20M -Mn -m0 -T --readahead 128k -n thin_readahead $vg/pool_readahead
+check lv_field $vg/pool_readahead lv_read_ahead "64.00k"
+check lv_field $vg/thin_readahead lv_read_ahead "128.00k"
+
+if test ! -d /sys/block/dm-2345; then
+# Check some unused minor and support for --minor with thins
+ lvcreate --minor 2345 -T -V20M -n thin_minor $vg/pool_readahead
+ check lv_field $vg/thin_minor lv_minor "2345"
+fi
# Test creation of inactive pool
lvcreate -an -L4M -T $vg/pool1
diff --git a/test/shell/lvcreate-usage.sh b/test/shell/lvcreate-usage.sh
index 5d37d9c2f..fe8200565 100644
--- a/test/shell/lvcreate-usage.sh
+++ b/test/shell/lvcreate-usage.sh
@@ -22,7 +22,7 @@ grep "Invalid argument for --type" err
invalid lvcreate --type $RANDOM -l1 -n $lv1 $vg
invalid lvcreate --type unknown -l1 -n $lv1 $vg
-lvcreate --type linear -aey -l1 -n $lv1 $vg
+lvcreate --type linear -aey -m0 -l1 -n $lv1 $vg
lvcreate --type snapshot -l1 -n $lv2 $vg/$lv1
# Reject repeated invocation (run 2 times) (bz178216)