Skip to contentSkip to conversation

tests: avoid passing chunk size to raid1.

PATCH Applied Sudhakar Panneerselvam 2 participants 2 messages Jul 22, 2021 – Aug 2, 2021 MD RAID

v1 of 2 Applied Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 5/5 tests: avoid passing chunk size to raid1.

'04update-metadata' test fails with error, "specifying chunk size is forbidden for this level" added by commit, 5b30a34aa4b5e. Hence, correcting the test to ignore passing chunk size to raid1.

---
 tests/04update-metadata | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
tests/04update-metadata +6 -1
index 08c14af7ed29..591009d2797e 100644
@@ -11,7 +11,12 @@ dlist="$dev0 $dev1 $dev2 $dev3"
 for ls in linear/4 raid1/1 raid5/3 raid6/2
 do
   s=${ls#*/} l=${ls%/*}
-  mdadm -CR --assume-clean -e 0.90 $md0 --level $l -n 4 -c 64 $dlist
+  if [[ $l == 'raid1' ]]
+  then
+    mdadm -CR --assume-clean -e 0.90 $md0 --level $l -n 4 $dlist
+  else
+    mdadm -CR --assume-clean -e 0.90 $md0 --level $l -n 4 -c 64 $dlist
+  fi
   testdev $md0 $s 19904 64
   mdadm -S $md0
   mdadm -A $md0 --update=metadata $dlist
Signature · 1 line
1.8.3.1
#1 lore raw
Quoted 18 lines · Sudhakar Panneerselvam

'04update-metadata' test fails with error, "specifying chunk size is forbidden for this level" added by commit, 5b30a34aa4b5e. Hence, correcting the test to ignore passing chunk size to raid1.

---
 tests/04update-metadata | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
tests/04update-metadata +0 -0
index 08c14af7ed29..591009d2797e 100644
@@ -11,7 +11,12 @@ dlist="$dev0 $dev1 $dev2 $dev3"
 for ls in linear/4 raid1/1 raid5/3 raid6/2
 do
   s=${ls#*/} l=${ls%/*}

tests/04update-metadata dlist="$dev0 $dev1 $dev2 $dev3" · line 22

Quoted 10 lines
tests/04update-metadata +6 -1
-  mdadm -CR --assume-clean -e 0.90 $md0 --level $l -n 4 -c 64 $dlist
+  if [[ $l == 'raid1' ]]
+  then
+    mdadm -CR --assume-clean -e 0.90 $md0 --level $l -n 4 $dlist
+  else
+    mdadm -CR --assume-clean -e 0.90 $md0 --level $l -n 4 -c 64 $dlist
+  fi
   testdev $md0 $s 19904 64
   mdadm -S $md0
   mdadm -A $md0 --update=metadata $dlist

I took a patch from Mateusz that fixed this in a more generic way. If it's still a problem, please let me know.

Thanks,
Jes