diff options
author | NeilBrown <neilb@suse.de> | 2012-05-03 15:29:04 +1000 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2012-05-03 15:29:04 +1000 |
commit | 974e0395ee88135d428edc7081b711550c7a57ea (patch) | |
tree | 15d1ceb07998dbd24d7c1a1c3b880f0d8329286e | |
parent | 96fd06edce9ae2d41908b9703642dfe50f376ca9 (diff) | |
download | mdadm-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-x | test | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -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 } |