diff options
author | NeilBrown <neilb@suse.de> | 2010-03-09 21:53:16 +0100 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2010-03-10 05:56:01 +0100 |
commit | ebe6ea0c4cdb37d41cb3b247645b95eb71b1332e (patch) | |
tree | a599e282976abc1f8e924a7d83e8ce3c42d6e078 /tests | |
parent | ddf/intel: zero out old metadata before creating a container. (diff) | |
download | mdadm-ebe6ea0c4cdb37d41cb3b247645b95eb71b1332e.tar.xz mdadm-ebe6ea0c4cdb37d41cb3b247645b95eb71b1332e.zip |
tests: adjust sizes for new defaults
Default metadata type is now 1.2, and we sometimes
add extra alignment before the data section,
so adjust tests for these changes.
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/00linear | 2 | ||||
-rw-r--r-- | tests/00multipath | 8 | ||||
-rw-r--r-- | tests/00raid0 | 2 | ||||
-rw-r--r-- | tests/00raid1 | 2 | ||||
-rw-r--r-- | tests/02lineargrow | 5 | ||||
-rw-r--r-- | tests/02r1grow | 2 | ||||
-rw-r--r-- | tests/02r5grow | 2 | ||||
-rw-r--r-- | tests/02r6grow | 2 | ||||
-rw-r--r-- | tests/03r0assem | 2 | ||||
-rw-r--r-- | tests/05r1-bitmapfile | 6 | ||||
-rw-r--r-- | tests/05r1-grow-external | 4 | ||||
-rw-r--r-- | tests/05r1-grow-internal | 4 | ||||
-rw-r--r-- | tests/05r1-re-add | 4 | ||||
-rw-r--r-- | tests/06wrmostly | 4 | ||||
-rw-r--r-- | tests/07autoassemble | 10 | ||||
-rw-r--r-- | tests/07changelevels | 4 |
16 files changed, 32 insertions, 31 deletions
diff --git a/tests/00linear b/tests/00linear index 1aea0a28..3c3fd18d 100644 --- a/tests/00linear +++ b/tests/00linear @@ -3,7 +3,7 @@ mdadm -CR $md0 -l linear -n3 $dev0 $dev1 $dev2 check linear -testdev $md0 3 $mdsize1_l 1 +testdev $md0 3 $mdsize2_l 1 mdadm -S $md0 # now with version-0.90 superblock diff --git a/tests/00multipath b/tests/00multipath index cc52fb38..bc0429f4 100644 --- a/tests/00multipath +++ b/tests/00multipath @@ -4,21 +4,21 @@ mdadm -CR $md1 -l multipath -n2 $path0 $path1 -testdev $md1 1 $mdsize1 1 +testdev $md1 1 $mdsize12 1 mdadm $md1 -f $path0 rotest $md1 -testdev $md1 1 $mdsize1 1 +testdev $md1 1 $mdsize12 1 mdadm $md1 -r $path0 mdadm $md1 -a $path0 rotest $md1 -testdev $md1 1 $mdsize1 1 +testdev $md1 1 $mdsize12 1 mdadm $md1 -f $path1 mdadm $md1 -r $path1 rotest $md1 -testdev $md1 1 $mdsize1 1 +testdev $md1 1 $mdsize12 1 mdadm -S $md1 diff --git a/tests/00raid0 b/tests/00raid0 index 1614a636..7f87e6ca 100644 --- a/tests/00raid0 +++ b/tests/00raid0 @@ -3,7 +3,7 @@ mdadm -CR $md0 -l raid0 -n3 $dev0 $dev1 $dev2 check raid0 -testdev $md0 3 $mdsize1_l 512 +testdev $md0 3 $mdsize2_l 512 mdadm -S $md0 # now with version-0.90 superblock diff --git a/tests/00raid1 b/tests/00raid1 index 45dc86a9..e91c5866 100644 --- a/tests/00raid1 +++ b/tests/00raid1 @@ -6,7 +6,7 @@ mdadm -CR $md0 -l 1 -n2 $dev0 $dev1 check resync check raid1 -testdev $md0 1 $mdsize1 1 +testdev $md0 1 $mdsize1a 1 mdadm -S $md0 # now with version-0.90 superblock, spare diff --git a/tests/02lineargrow b/tests/02lineargrow index b093355b..e05c219d 100644 --- a/tests/02lineargrow +++ b/tests/02lineargrow @@ -5,9 +5,10 @@ for e in 0.90 1 1.1 1.2 do case $e in 0.90 ) sz=$mdsize0 ;; - 1 ) sz=$mdsize1 ;; + 1 ) sz=$mdsize2_l ;; + 1.0 ) sz=$mdsize1 ;; 1.1 ) sz=$mdsize1_l ;; - 1.2 ) sz=$mdsize11 ;; + 1.2 ) sz=$mdsize2_l ;; esac mdadm -CRf $md0 --level linear -e $e --raid-disks=1 $dev1 testdev $md0 1 $sz 1 diff --git a/tests/02r1grow b/tests/02r1grow index 43f037b0..6604208d 100644 --- a/tests/02r1grow +++ b/tests/02r1grow @@ -27,7 +27,7 @@ testdev $md0 1 $[size/2] 1 mdadm --grow $md0 --size max check resync check wait -testdev $md0 1 $mdsize11 1 +testdev $md0 1 $mdsize1_l 1 mdadm --grow $md0 --size $[size/2] check nosync diff --git a/tests/02r5grow b/tests/02r5grow index e5269625..f9fd5713 100644 --- a/tests/02r5grow +++ b/tests/02r5grow @@ -27,7 +27,7 @@ testdev $md0 3 $[size/2] 128 mdadm --grow $md0 --size max check resync check wait -testdev $md0 3 $[size-4] 128 +testdev $md0 3 $[mdsize1_l] 128 mdadm --grow $md0 --size $[size/2] check nosync diff --git a/tests/02r6grow b/tests/02r6grow index 3261760c..3f539042 100644 --- a/tests/02r6grow +++ b/tests/02r6grow @@ -27,7 +27,7 @@ testdev $md0 2 $[size/2] 128 mdadm --grow $md0 --size max check resync check wait -testdev $md0 2 $[size-4] 128 +testdev $md0 2 $[mdsize1_l] 128 mdadm --grow $md0 --size $[size/2] check nosync diff --git a/tests/03r0assem b/tests/03r0assem index db6486ef..0b998ec1 100644 --- a/tests/03r0assem +++ b/tests/03r0assem @@ -6,7 +6,7 @@ mdadm -CR $md2 -l0 -n3 $dev0 $dev1 $dev2 check raid0 -tst="testdev $md2 3 $mdsize1 512" +tst="testdev $md2 3 $mdsize1_l 512" $tst uuid=`mdadm -Db $md2 | sed 's/.*UUID=//'` mdadm -S $md2 diff --git a/tests/05r1-bitmapfile b/tests/05r1-bitmapfile index 380b229d..953613d7 100644 --- a/tests/05r1-bitmapfile +++ b/tests/05r1-bitmapfile @@ -6,11 +6,11 @@ bmf=$targetdir/bitmap rm -f $bmf mdadm --create --run $md0 --level=1 -n2 --delay=1 --bitmap $bmf $dev1 $dev2 check wait -testdev $md0 1 $mdsize1 1 +testdev $md0 1 $mdsize1a 1 mdadm -S $md0 mdadm --assemble $md0 --bitmap=$bmf $dev1 $dev2 -testdev $md0 1 $mdsize1 1 +testdev $md0 1 $mdsize1a 1 dirty1=`mdadm -X $bmf | sed -n -e 's/.*Bitmap.* \([0-9]*\) dirty.*/\1/p'` sleep 4 dirty2=`mdadm -X $bmf | sed -n -e 's/.*Bitmap.* \([0-9]*\) dirty.*/\1/p'` @@ -20,7 +20,7 @@ then echo >&2 "ERROR bad 'dirty' counts: $dirty1 and $dirty2" exit 1 fi mdadm $md0 -f $dev1 -testdev $md0 1 $mdsize1 1 +testdev $md0 1 $mdsize1a 1 sleep 4 dirty3=`mdadm -X $bmf | sed -n -e 's/.*Bitmap.* \([0-9]*\) dirty.*/\1/p'` if [ $dirty3 -lt 400 ] diff --git a/tests/05r1-grow-external b/tests/05r1-grow-external index c1100933..0d93adbb 100644 --- a/tests/05r1-grow-external +++ b/tests/05r1-grow-external @@ -4,7 +4,7 @@ # mdadm --create --run $md0 -l 1 -n 2 $dev1 $dev2 check wait -testdev $md0 1 $mdsize1 1 +testdev $md0 1 $mdsize1a 1 bmf=$targetdir/bm rm -f $bmf @@ -14,7 +14,7 @@ dirty1=`mdadm -X $bmf | sed -n -e 's/.*Bitmap.* \([0-9]*\) dirty.*/\1/p'` sleep 4 dirty2=`mdadm -X $bmf | sed -n -e 's/.*Bitmap.* \([0-9]*\) dirty.*/\1/p'` -testdev $md0 1 $mdsize1 1 +testdev $md0 1 $mdsize1a 1 dirty3=`mdadm -X $bmf | sed -n -e 's/.*Bitmap.* \([0-9]*\) dirty.*/\1/p'` sleep 4 dirty4=`mdadm -X $bmf | sed -n -e 's/.*Bitmap.* \([0-9]*\) dirty.*/\1/p'` diff --git a/tests/05r1-grow-internal b/tests/05r1-grow-internal index f5c0e5b3..f1dbe8e2 100644 --- a/tests/05r1-grow-internal +++ b/tests/05r1-grow-internal @@ -4,7 +4,7 @@ # mdadm --create --run $md0 -l 1 -n 2 $dev1 $dev2 check wait -testdev $md0 1 $mdsize1 1 +testdev $md0 1 $mdsize1a 1 #mdadm -E $dev1 mdadm --grow $md0 --bitmap=internal --bitmap-chunk=4 --delay=1 || { mdadm -X $dev2 ; exit 1; } @@ -12,7 +12,7 @@ dirty1=`mdadm -X $dev2 | sed -n -e 's/.*Bitmap.* \([0-9]*\) dirty.*/\1/p'` sleep 4 dirty2=`mdadm -X $dev2 | sed -n -e 's/.*Bitmap.* \([0-9]*\) dirty.*/\1/p'` -testdev $md0 1 $mdsize1 1 +testdev $md0 1 $mdsize1a 1 dirty3=`mdadm -X $dev2 | sed -n -e 's/.*Bitmap.* \([0-9]*\) dirty.*/\1/p'` sleep 4 dirty4=`mdadm -X $dev2 | sed -n -e 's/.*Bitmap.* \([0-9]*\) dirty.*/\1/p'` diff --git a/tests/05r1-re-add b/tests/05r1-re-add index cfa1e6b9..4cd5328c 100644 --- a/tests/05r1-re-add +++ b/tests/05r1-re-add @@ -8,7 +8,7 @@ mdadm -CR $md0 -l1 -n2 -binternal --bitmap-chunk=4 -d1 $dev1 $dev2 check resync check wait -testdev $md0 1 $mdsize1 1 +testdev $md0 1 $mdsize1a 1 sleep 4 mdadm $md0 -f $dev2 @@ -21,7 +21,7 @@ check nosync mdadm $md0 -f $dev2 sleep 1 mdadm $md0 -r $dev2 -testdev $md0 1 $mdsize1 1 +testdev $md0 1 $mdsize1a 1 mdadm $md0 -a $dev2 check wait cmp --ignore-initial=$[16*512] --bytes=$[$mdsize0*1024] $dev1 $dev2 diff --git a/tests/06wrmostly b/tests/06wrmostly index 2a3fae64..99a48b79 100644 --- a/tests/06wrmostly +++ b/tests/06wrmostly @@ -2,13 +2,13 @@ # create a raid1 array with a wrmostly device mdadm -CR $md0 -l1 -n3 $dev0 $dev1 --write-mostly $dev2 -testdev $md0 1 $mdsize1 1 +testdev $md0 1 $mdsize1a 1 # unfortunately, we cannot measure if any read requests are going to $dev2 mdadm -S $md0 mdadm -CR $md0 -l1 -n3 --write-behind --bitmap=internal --bitmap-chunk=4 $dev0 $dev1 --write-mostly $dev2 -testdev $md0 1 $mdsize1 1 +testdev $md0 1 $mdsize1a 1 mdadm -S $md0 diff --git a/tests/07autoassemble b/tests/07autoassemble index 49b99858..469497e2 100644 --- a/tests/07autoassemble +++ b/tests/07autoassemble @@ -8,9 +8,9 @@ mdadm -CR $md0 -l0 -n2 $md1 $md2 --homehost=testing mdadm -Ss mdadm -As -c /dev/null --homehost=testing -vvv -testdev $md1 1 $mdsize1 1 -testdev $md2 1 $mdsize1 1 -testdev $md0 2 $mdsize11 512 +testdev $md1 1 $mdsize1a 1 +testdev $md2 1 $mdsize1a 1 +testdev $md0 2 $mdsize11a 512 mdadm -Ss mdadm --zero-superblock $dev0 $dev1 $dev2 $dev3 @@ -19,6 +19,6 @@ mdadm -CR $md1 -l1 -n2 $dev0 $dev1 --homehost=testing mdadm -CR $md0 -l0 -n2 $md1 $dev2 --homehost=testing mdadm -Ss mdadm -As -c /dev/null --homehost=testing -vvv -testdev $md1 1 $mdsize1 1 -testdev $md0 1 $[mdsize1+mdsize11] 512 +testdev $md1 1 $mdsize1a 1 +testdev $md0 1 $[mdsize1a+mdsize11a-1024] 512 mdadm -Ss diff --git a/tests/07changelevels b/tests/07changelevels index 57790a19..60f2f318 100644 --- a/tests/07changelevels +++ b/tests/07changelevels @@ -10,7 +10,7 @@ export MDADM_GROW_VERIFY=1 dotest() { sleep 0.5 check wait - testdev $md0 $1 $mdsize1 64 nd + testdev $md0 $1 19968 64 nd blockdev --flushbufs $md0 cmp -s -n $[textK*1024] $md0 /tmp/RandFile || { echo cmp failed; exit 2; } # write something new - shift chars 4 space @@ -43,7 +43,7 @@ checkgeo() { bu=/tmp/md-test-backup rm -f $bu mdadm -CR $md0 -l1 -n2 -x1 $dev0 $dev1 $dev2 -z 19968 -testdev $md0 1 $mdsize1 64 +testdev $md0 1 $mdsize1a 64 dd if=/tmp/RandFile of=$md0 dotest 1 |