Skip to contentSkip to conversation

tests: remove raid0 tests for 0.90 metadata version

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 1/5 tests: remove raid0 tests for 0.90 metadata version

Some of the test cases fail because raid0 creation fails with the error, "0.90 metadata does not support layouts for RAID0" added by commit, 329dfc28debb. Removing the 0.90 test to make these test cases to work.

removed 04r0update test completely as it is specific to raid0 for 0.9 version.

'04update-metadata' and '03r0assem' still fails at a different place after this change which will be fixed in an upcoming commit.

---
 tests/00raid0           | 11 --------
 tests/00readonly        |  4 +++
 tests/03r0assem         | 72 -------------------------------------------------
 tests/04r0update        | 20 --------------
 tests/04update-metadata |  2 +-
 5 files changed, 5 insertions(+), 104 deletions(-)
 delete mode 100644 tests/04r0update
tests/00raid0 +0 -11
index 8bc18985f91a..e0b6e325b4c9 100644
@@ -6,12 +6,6 @@ check raid0
 testdev $md0 3 $mdsize2_l 512
 mdadm -S $md0
 
-# now with version-0.90 superblock
-mdadm -CR $md0 -e0.90 -l0 -n4 $dev0 $dev1 $dev2 $dev3
-check raid0
-testdev $md0 4 $mdsize0 512
-mdadm -S $md0
-
 # now with no superblock
 mdadm -B $md0 -l0 -n5 $dev0 $dev1 $dev2 $dev3 $dev4
 check raid0
@@ -22,11 +16,6 @@ mdadm -S $md0
 # now same again with different chunk size
 for chunk in 4 32 256
 do
-  mdadm -CR $md0 -e0.90 -l raid0 --chunk $chunk -n3 $dev0 $dev1 $dev2
-  check raid0
-  testdev $md0 3 $mdsize0 $chunk
-  mdadm -S $md0
-
   # now with version-1 superblock
   mdadm -CR $md0 -e1.0 -l0 -c $chunk -n4 $dev0 $dev1 $dev2 $dev3
   check raid0
tests/00readonly +4 -0
index 28b0fa13f815..39202487f614 100644
@@ -4,6 +4,10 @@ for metadata in 0.9 1.0 1.1 1.2
 do
 	for level in linear raid0 raid1 raid4 raid5 raid6 raid10
 	do
+		if [[ $metadata == "0.9" && $level == "raid0" ]];
+		then
+			continue
+		fi
 		mdadm -CR $md0 -l $level -n 4 --metadata=$metadata \
 			$dev1 $dev2 $dev3 $dev4 --assume-clean
 		check nosync
tests/03r0assem +0 -72

75 lines not on this page · raw message

tests/04r0update deleted +0 -20
deleted file mode 100644
index 73ee3b9fed91..000000000000
@@ -1,20 +0,0 @@
-
-# create a raid0, re-assemble with a different super-minor
-mdadm -CR -e 0.90 $md0 -l0 -n3 $dev0 $dev1 $dev2
-testdev $md0 3 $mdsize0 512
-minor1=`mdadm -E $dev0 | sed -n -e 's/.*Preferred Minor : //p'`
-mdadm -S /dev/md0
-
-mdadm -A $md1 $dev0 $dev1 $dev2
-minor2=`mdadm -E $dev0 | sed -n -e 's/.*Preferred Minor : //p'`
-mdadm -S /dev/md1
-
-mdadm -A $md1 --update=super-minor $dev0 $dev1 $dev2
-minor3=`mdadm -E $dev0 | sed -n -e 's/.*Preferred Minor : //p'`
-mdadm -S /dev/md1
-
-case "$minor1 $minor2 $minor3" in
-  "0 0 1" ) ;;
-  * ) echo >&2 "ERROR minors should be '0 0 1' but are '$minor1 $minor2 $minor3'"
-      exit 1
-esac
tests/04update-metadata +1 -1
index 232fc1ffff4b..08c14af7ed29 100644
@@ -8,7 +8,7 @@ set -xe
 
 dlist="$dev0 $dev1 $dev2 $dev3"
 
-for ls in raid0/4 linear/4 raid1/1 raid5/3 raid6/2
+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
Signature · 1 line
1.8.3.1
#1 lore raw
Quoted 11 lines · Sudhakar Panneerselvam

Some of the test cases fail because raid0 creation fails with the error, "0.90 metadata does not support layouts for RAID0" added by commit, 329dfc28debb. Removing the 0.90 test to make these test cases to work.

removed 04r0update test completely as it is specific to raid0 for 0.9 version.

'04update-metadata' and '03r0assem' still fails at a different place after this change which will be fixed in an upcoming commit.

Quoted 8 lines
---
 tests/00raid0           | 11 --------
 tests/00readonly        |  4 +++
 tests/03r0assem         | 72 -------------------------------------------------
 tests/04r0update        | 20 --------------
 tests/04update-metadata |  2 +-
 5 files changed, 5 insertions(+), 104 deletions(-)
 delete mode 100644 tests/04r0update

I'm really happy to see effort put into updating the test suite. However rather than removing tests, it would be nice to turn it around and make a test that make sure we do not allow creating a 0.9 raid0 array with layouts.

Cheers,
Jes