From: NeilBrown Date: Thu, 3 May 2012 05:29:04 +0000 (+1000) Subject: test: don't worry too much about array size. X-Git-Tag: mdadm-3.2.4~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=974e0395ee88135d428edc7081b711550c7a57ea;p=thirdparty%2Fmdadm.git 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 --- diff --git a/test b/test index 1aaf3c1c..2964b3bb 100755 --- a/test +++ b/test @@ -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 }