summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichal Zylowski <michal.zylowski@intel.com>2018-06-22 16:34:10 +0200
committerJes Sorensen <jsorensen@fb.com>2018-07-11 19:16:48 +0200
commit1a90fd84582757ae384c85f0c477f52eb6f66e81 (patch)
tree79d596e19396a498b15bfd377b9060fbdbde7cf5
parenttests, imsm: Set new_num_disks value corectly to perform expected size calcul... (diff)
downloadmdadm-1a90fd84582757ae384c85f0c477f52eb6f66e81.tar.xz
mdadm-1a90fd84582757ae384c85f0c477f52eb6f66e81.zip
tests, imsm: Test shouldn't call grow with chunk and level in one command
Since a3b831c9 "Grow.c: Block any level migration with chunk size change" there is no possibility to perform migration between level and chunk in one operation. When any test tries to do this error message is printed and tests finishes with fail. Signed-off-by: Michal Zylowski <michal.zylowski@intel.com> Signed-off-by: Jes Sorensen <jsorensen@fb.com>
-rw-r--r--tests/imsm-grow-template11
1 files changed, 8 insertions, 3 deletions
diff --git a/tests/imsm-grow-template b/tests/imsm-grow-template
index 71a0bbb1..428e448e 100644
--- a/tests/imsm-grow-template
+++ b/tests/imsm-grow-template
@@ -13,10 +13,15 @@ function grow_member() {
local size=$5
local offset=$6
local chunk=$7
+ local old_chunk=$8
local array_size=$((comps * size))
rm -f $backup_imsm
- ( set -ex; mdadm --grow $member --chunk=$chunk --level=$level )
+ if [ $chunk -eq $old_chunk ]; then
+ ( set -ex; mdadm --grow $member --level=$level )
+ else
+ ( set -ex; mdadm --grow $member --chunk=$chunk )
+ fi
local status=$?
if [ $negative_test -ne 0 ]; then
if [ $status -eq 0 ]; then
@@ -76,9 +81,9 @@ if [ $migration_test -ne 0 ]; then
if [ -z $new_num_disks ]; then
new_num_disks=$num_disks
fi
- grow_member $member0 $new_num_disks $vol0_new_num_comps $vol0_new_level $vol0_comp_size $vol0_offset $vol0_new_chunk
+ grow_member $member0 $new_num_disks $vol0_new_num_comps $vol0_new_level $vol0_comp_size $vol0_offset $vol0_new_chunk $vol0_chunk
if [[ $vol1_new_chunk -ne 0 ]] ; then
- grow_member $member1 $new_num_disks $vol1_new_num_comps $vol1_new_level $vol1_comp_size $vol1_offset $vol1_new_chunk
+ grow_member $member1 $new_num_disks $vol1_new_num_comps $vol1_new_level $vol1_comp_size $vol1_offset $vol1_new_chunk $vol1_chunk
fi
else
rm -f $backup_imsm