39 lines
1.2 KiB
Diff
39 lines
1.2 KiB
Diff
|
From 6e7d850a57d40e18d525d0739a4f4226f6057d91 Mon Sep 17 00:00:00 2001
|
||
|
From: Xiao Ni <xni@redhat.com>
|
||
|
Date: Wed, 22 May 2024 16:50:52 +0800
|
||
|
Subject: [PATCH 089/157] mdadm/tests: 06name enhance
|
||
|
|
||
|
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@redhat.com>
|
||
|
Signed-off-by: Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>
|
||
|
---
|
||
|
tests/06name | 10 ++++++++--
|
||
|
1 file changed, 8 insertions(+), 2 deletions(-)
|
||
|
|
||
|
diff --git a/tests/06name b/tests/06name
|
||
|
index 86eaab69..c3213f6c 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.41.0
|
||
|
|