1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

tests: update cache creation tests

This commit is contained in:
Zdenek Kabelac 2014-10-26 16:19:30 +01:00
parent 7bbf3cf306
commit c28a7706ed

View 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