From 3bed5265f9c792edfcd593eeaa93675711e5e264 Mon Sep 17 00:00:00 2001 From: Dimitri John Ledkov Date: Mon, 23 Jul 2018 11:41:17 +0100 Subject: Cherrypick master patches up to 20th of July 2018. LP: #1781427 --- ...Test-shouldn-t-call-grow-with-chunk-and-l.patch | 53 ++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 debian/patches/0036-tests-imsm-Test-shouldn-t-call-grow-with-chunk-and-l.patch (limited to 'debian/patches/0036-tests-imsm-Test-shouldn-t-call-grow-with-chunk-and-l.patch') diff --git a/debian/patches/0036-tests-imsm-Test-shouldn-t-call-grow-with-chunk-and-l.patch b/debian/patches/0036-tests-imsm-Test-shouldn-t-call-grow-with-chunk-and-l.patch new file mode 100644 index 00000000..c9798909 --- /dev/null +++ b/debian/patches/0036-tests-imsm-Test-shouldn-t-call-grow-with-chunk-and-l.patch @@ -0,0 +1,53 @@ +From 1a90fd84582757ae384c85f0c477f52eb6f66e81 Mon Sep 17 00:00:00 2001 +From: Michal Zylowski +Date: Fri, 22 Jun 2018 16:34:10 +0200 +Subject: [PATCH 36/40] 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 +Signed-off-by: Jes Sorensen +--- + tests/imsm-grow-template | 11 ++++++++--- + 1 file 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 +-- +2.17.1 + -- cgit v1.2.3