It needs to check hostname in metadata name if one array is local. Add the check in this case. Signed-off-by: Xiao Ni <xni@xxxxxxxxxx> --- tests/06name | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/tests/06name b/tests/06name index 86eaab69e3a1..c3213f6c9f7b 100644 --- a/tests/06name +++ b/tests/06name @@ -3,8 +3,14 @@ set -x # create an array with a name mdadm -CR $md0 -l0 -n2 --metadata=1 --name="Fred" $dev0 $dev1 -mdadm -E $dev0 | grep 'Name : Fred' > /dev/null || exit 1 -mdadm -D $md0 | grep 'Name : Fred' > /dev/null || exit 1 + +if [ $is_foreign == "no" ]; then + mdadm -E $dev0 | grep "Name : $(hostname):Fred" > /dev/null || exit 1 + mdadm -D $md0 | grep "Name : $(hostname):Fred" > /dev/null || exit 1 +else + mdadm -E $dev0 | grep "Name : Fred" > /dev/null || exit 1 + mdadm -D $md0 | grep "Name : Fred" > /dev/null || exit 1 +fi mdadm -S $md0 mdadm -A $md0 --name="Fred" $devlist -- 2.32.0 (Apple Git-132)