mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-03 05:18:29 +03:00
tests: add test for minimum mda size
This commit is contained in:
parent
c2e88d1107
commit
9a3b64e81a
@ -12,6 +12,8 @@
|
|||||||
test_description='Test pvcreate option values'
|
test_description='Test pvcreate option values'
|
||||||
SKIP_WITH_LVMPOLLD=1
|
SKIP_WITH_LVMPOLLD=1
|
||||||
PAGESIZE=$(getconf PAGESIZE)
|
PAGESIZE=$(getconf PAGESIZE)
|
||||||
|
# MDA_SIZE_MIN defined in lib/format_text/layout.h
|
||||||
|
MDA_SIZE_MIN=$((8*$PAGESIZE))
|
||||||
|
|
||||||
. lib/inittest
|
. lib/inittest
|
||||||
|
|
||||||
@ -23,6 +25,13 @@ not pvcreate --setphysicalvolumesize -1024 "$dev1"
|
|||||||
#COMM 'pvcreate rejects negative metadatasize'
|
#COMM 'pvcreate rejects negative metadatasize'
|
||||||
not pvcreate --metadatasize -1024 "$dev1"
|
not pvcreate --metadatasize -1024 "$dev1"
|
||||||
|
|
||||||
|
#COMM 'pvcreate rejects metadatasize that is less than minimum size'
|
||||||
|
not pvcreate --dataalignment $((${MDA_SIZE_MIN}/2))b --metadatasize $((${MDA_SIZE_MIN}/2))b "$dev1" 2>err
|
||||||
|
grep "Metadata area size too small" err
|
||||||
|
|
||||||
|
#COMM 'pvcreate accepts metadatasize that is at least the minimum size'
|
||||||
|
pvcreate --dataalignment ${MDA_SIZE_MIN}b --metadatasize ${MDA_SIZE_MIN}b "$dev1"
|
||||||
|
|
||||||
# x. metadatasize 0, defaults to 255
|
# x. metadatasize 0, defaults to 255
|
||||||
# FIXME: unable to check default value, not in reporting cmds
|
# FIXME: unable to check default value, not in reporting cmds
|
||||||
# should default to 255 according to code
|
# should default to 255 according to code
|
||||||
|
Loading…
Reference in New Issue
Block a user