test: don't worry too much about array size.

With different amounts of space being reserved for metadata
it is hard for the script to know how big the array should be.
So allow a bit of slack.

Signed-off-by: NeilBrown <neilb@suse.de>
This commit is contained in:
NeilBrown 2012-05-03 15:29:04 +10:00
parent 96fd06edce
commit 974e0395ee
1 changed files with 3 additions and 2 deletions

5
test
View File

@ -190,9 +190,10 @@ testdev() {
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` ]
_sz=`/sbin/blockdev --getsize $dev`
if [ $rasize -lt $_sz -o $[rasize*4/5] -gt $_sz ]
then
echo "ERROR: size is wrong for $dev: $cnt * $dvsize (chunk=$chunk) = $rasize, not `/sbin/blockdev --getsize $dev`"
echo "ERROR: size is wrong for $dev: $cnt * $dvsize (chunk=$chunk) = $rasize, not $_sz"
exit 1
fi
}