From 7f1d6c8fec531fa1762d6d65576aecbee837982c Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 10 Apr 2024 22:55:34 +0200 Subject: Adding upstream version 4.3. Signed-off-by: Daniel Baumann --- tests/00confnames | 56 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 tests/00confnames (limited to 'tests/00confnames') diff --git a/tests/00confnames b/tests/00confnames new file mode 100644 index 0000000..191a905 --- /dev/null +++ b/tests/00confnames @@ -0,0 +1,56 @@ +set -x -e +. tests/templates/names_template + +# Test how is handled during Incremental assemblation with +# config file and ARRAYLINE specified. + +names_create "/dev/md/name" +local _UUID="$(mdadm -D --export /dev/md127 | grep MD_UUID | cut -d'=' -f2)" +[[ "$_UUID" == "" ]] && echo "Cannot obtain UUID for $DEVNODE_NAME" && exit 1 + + +# 1. definition consistent with metadata name. +names_make_conf $_UUID "/dev/md/name" $config +mdadm -S "/dev/md127" +mdadm -I $dev0 --config=$config +names_verify "/dev/md127" "name" "name" +mdadm -S "/dev/md127" + +# 2. Same as 1, but use short name form of . +names_make_conf $_UUID "name" $config +mdadm -I $dev0 --config=$config +names_verify "/dev/md127" "name" "name" +mdadm -S "/dev/md127" + +# 3. Same as 1, but use different than metadata provides. +names_make_conf $_UUID "/dev/md/other" $config +mdadm -I $dev0 --config=$config +names_verify "/dev/md127" "other" "name" +mdadm -S "/dev/md127" + +# 4. Same as 3, but use short name form of . +names_make_conf $_UUID "other" $config +mdadm -I $dev0 --config=$config +names_verify "/dev/md127" "other" "name" +mdadm -S "/dev/md127" + +# 5. Force particular node creation by setting to /dev/mdX. +# Link is not created in this case. +names_make_conf $_UUID "/dev/md4" $config +mdadm -I $dev0 --config=$config +names_verify "/dev/md4" "empty" "name" +mdadm -S "/dev/md4" + +# 6. with some special symbols and locales. +# should be ignored. +names_make_conf $_UUID "tźż-\.,<>st+-" $config +mdadm -I $dev0 --config=$config +names_verify "/dev/md127" "name" "name" +mdadm -S "/dev/md127" + +# 7. No set. +# Metadata name and default node used. +names_make_conf $_UUID "empty" $config +mdadm -I $dev0 --config=$config +names_verify "/dev/md127" "name" "name" +mdadm -S "/dev/md127" -- cgit v1.2.3