From c28a7706ed00c135e6fb06d22dde1c374f32f847 Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Sun, 26 Oct 2014 16:19:30 +0100 Subject: [PATCH] tests: update cache creation tests --- test/shell/lvcreate-cache.sh | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/test/shell/lvcreate-cache.sh b/test/shell/lvcreate-cache.sh index 69d05346a..b37f321a0 100644 --- a/test/shell/lvcreate-cache.sh +++ b/test/shell/lvcreate-cache.sh @@ -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 -- 2.43.5