From: Elena Gryaznova Date: Fri, 19 Apr 2019 12:39:32 +0000 (+0300) Subject: LU-12205 tests: host_nids_address() fix for MR setup X-Git-Tag: 2.13.55~180 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=091fa82293d340246f7c4800176f4af5fb435ae1 LU-12205 tests: host_nids_address() fix for MR setup Patch fixes t-f:host_nids_address() to work properly on multiple networks setup. Example: With MR setup we have: lctl list_nids 192.168.101.3@tcp 10.0.101.3@tcp1 10.0.201.3@tcp2 For NETTYPE=tcp host_nids_address() should give the result 192.168.101.3 only. Test-Parameters: trivial testlist=sanity,sanityn,sanity-sec,\ lnet-selftest,conf-sanity,obdfilter-survey Signed-off-by: Elena Gryaznova Cray-bug-id: LUS-7150 Reviewed-by: Alexey Lyashkov Reviewed-by: Chris Horn Change-Id: Ida397f1811be142c5aa8813f32461b83d6113fc2 Reviewed-on: https://review.whamcloud.com/34723 Reviewed-by: Alexey Lyashkov Reviewed-by: Chris Horn Tested-by: jenkins Tested-by: Maloo Reviewed-by: Oleg Drokin --- diff --git a/lustre/tests/test-framework.sh b/lustre/tests/test-framework.sh index 6e007fa..3f1c0ae 100755 --- a/lustre/tests/test-framework.sh +++ b/lustre/tests/test-framework.sh @@ -3706,7 +3706,7 @@ host_nids_address() { local nodes=$1 local net=${2:-"."} - do_nodes $nodes "$LCTL list_nids | grep $net | cut -f 1 -d @" + do_nodes $nodes "$LCTL list_nids | grep -w $net | cut -f 1 -d @" } h2name_or_ip() {