summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2012-05-03 15:29:04 +1000
committerNeilBrown <neilb@suse.de>2012-05-03 15:29:04 +1000
commit974e0395ee88135d428edc7081b711550c7a57ea (patch)
tree15d1ceb07998dbd24d7c1a1c3b880f0d8329286e
parent96fd06edce9ae2d41908b9703642dfe50f376ca9 (diff)
downloadmdadm-974e0395ee88135d428edc7081b711550c7a57ea.tar.gz
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>
-rwxr-xr-xtest5
1 files changed, 3 insertions, 2 deletions
diff --git a/test b/test
index 1aaf3c1..2964b3b 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
}