summaryrefslogtreecommitdiffstats
path: root/tests/04update-metadata
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-07-25 06:14:23 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-07-25 06:14:23 +0000
commit201d885cf454e026cf59e18961f025bcfa8a3142 (patch)
treebaf91f410e825f7768de9be51fe5e8556333bc7b /tests/04update-metadata
parentReleasing debian version 4.3+20240412-1. (diff)
downloadmdadm-201d885cf454e026cf59e18961f025bcfa8a3142.tar.xz
mdadm-201d885cf454e026cf59e18961f025bcfa8a3142.zip
Merging upstream version 4.3+20240723.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/04update-metadata')
-rw-r--r--tests/04update-metadata35
1 files changed, 20 insertions, 15 deletions
diff --git a/tests/04update-metadata b/tests/04update-metadata
index 2b72a30..c748770 100644
--- a/tests/04update-metadata
+++ b/tests/04update-metadata
@@ -8,24 +8,29 @@ set -xe
dlist="$dev0 $dev1 $dev2 $dev3"
-for ls in linear/4 raid1/1 raid5/3 raid6/2
+if [ $skipping_linear == "yes" ]; then
+ level_list="raid1/1 raid5/3 raid6/2"
+else
+ level_list="linear/4 raid1/1 raid5/3 raid6/2"
+fi
+for ls in $level_list
do
- s=${ls#*/} l=${ls%/*}
- 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
- testdev $md0 $s 19904 64 check
- mdadm -S $md0
+ s=${ls#*/} l=${ls%/*}
+ 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
+ testdev $md0 $s 19904 64 check
+ mdadm -S $md0
done
if mdadm -A $md0 --update=metadata $dlist
then echo >&2 should fail with v1.0 metadata
- exit 1
+ exit 1
fi
mdadm -CR -e 0.90 $md0 --level=6 -n4 -c32 $dlist
@@ -33,7 +38,7 @@ mdadm -S $md0
if mdadm -A $md0 --update=metadata $dlist
then echo >&2 should fail during resync
- exit 1
+ exit 1
fi
mdadm -A $md0 $dlist
mdadm --wait $md0 || true
@@ -48,5 +53,5 @@ mdadm -S $md0
if mdadm -A $md0 --update=metadata $dlist
then echo >&2 should fail when bitmap present
- exit 1
+ exit 1
fi