tests/imsm: allow for rounding of array size.

IMSM rounds array size to a multiple of 1024K, so our tests must
assume this.

Signed-off-by: NeilBrown <neilb@suse.de>
This commit is contained in:
NeilBrown 2009-10-16 17:57:28 +11:00
parent 5ac6db12f9
commit 151ea1a33d
2 changed files with 8 additions and 0 deletions

5
test
View File

@ -170,6 +170,11 @@ testdev() {
dsize=$[dvsize/chunk]
dsize=$[dsize*chunk]
rasize=$[dsize*2*cnt]
# rasize is in sectors
if [ -n "$DEV_ROUND_K" ]; then
rasize=$[rasize/DEV_ROUND_K/2]
rasize=$[rasize*DEV_ROUND_K*2]
fi
if [ `/sbin/blockdev --getsize $dev` -eq 0 ]; then sleep 2 ; fi
if [ $rasize -ne `/sbin/blockdev --getsize $dev` ]
then

View File

@ -1,5 +1,8 @@
# sanity check array creation
# IMSM rounds to multiples of one mebibyte - 1024K
DEV_ROUND_K=1024
num_disks=2
mdadm -CR $container -e imsm -n $num_disks $dev0 $dev1
imsm_check container $num_disks