summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorXiao Ni <xni@redhat.com>2024-05-22 10:50:52 +0200
committerMariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>2024-05-24 10:39:42 +0200
commit6e7d850a57d40e18d525d0739a4f4226f6057d91 (patch)
tree960217f260fe4dc2e5cbde5a257b6b587e8d1336 /tests
parentmdadm/tests: 05r5-internalbitmap (diff)
downloadmdadm-6e7d850a57d40e18d525d0739a4f4226f6057d91.tar.xz
mdadm-6e7d850a57d40e18d525d0739a4f4226f6057d91.zip
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>
Diffstat (limited to 'tests')
-rw-r--r--tests/06name10
1 files 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