]> sourceware.org Git - lvm2.git/commitdiff
tests: update cache creation tests
authorZdenek Kabelac <zkabelac@redhat.com>
Sun, 26 Oct 2014 15:19:30 +0000 (16:19 +0100)
committerZdenek Kabelac <zkabelac@redhat.com>
Sun, 26 Oct 2014 17:37:13 +0000 (18:37 +0100)
test/shell/lvcreate-cache.sh

index 69d05346afeb25d95ff795977a1d42f6a3a8f753..b37f321a03429adfdd0bd44c445896789c471294 100644 (file)
@@ -202,6 +202,27 @@ check lv_attr_bit perm $vg/$lv6 "r"
 
 lvremove -f $vg
 
+########################################
+# Validate args are properly preserved #
+########################################
+lvcreate --type cache-pool -L10 --chunksize 256 --cachemode writeback $vg/cpool1
+lvcreate -H -L10 $vg/cpool1
+check lv_field $vg/cpool1 chunksize "256.00k"
+check lv_field $vg/cpool1 cachemode "writeback"
+
+lvcreate --type cache-pool -L10 --chunksize 256 --cachemode writethrough $vg/cpool2
+lvcreate -H -L10 --chunksize 512 --cachemode writeback $vg/cpool2
+check lv_field $vg/cpool2 chunksize "512.00k"
+check lv_field $vg/cpool2 cachemode "writeback"
+
+# Chunk bigger then pool size
+fail lvcreate --type cache-pool -l1 --chunksize 1G $vg/cpool3
+
+lvcreate --type cache-pool -L10 $vg/cpool4
+fail lvcreate -H -L10 --chunksize 16M $vg/cpool4
+
+lvremove -f $vg
+
 
 ##############################
 # Test things that should fail
This page took 0.041005 seconds and 5 git commands to generate.