X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Ftests%2Fsanity-lnet.sh;h=ce4c27a6fb254fbb4f0bbeb49985c5a60417d070;hp=a11e68057e61855e889bb3067854bdb6cc4f2bab;hb=a50eaae974ee04364c9fbbb4625dd3d581a8c986;hpb=05e6ccd344e7eba44e43230fa2fa0a1b3b6115c4 diff --git a/lustre/tests/sanity-lnet.sh b/lustre/tests/sanity-lnet.sh index a11e680..ce4c27a 100755 --- a/lustre/tests/sanity-lnet.sh +++ b/lustre/tests/sanity-lnet.sh @@ -255,11 +255,15 @@ if [[ -z ${NIDS[@]} ]]; then error "No NID configured after module load" fi +do_lnetctl net show +ip a + declare -a INTERFACES for ((i = 0; i < ${#NIDS[@]}; i++)); do ip=$(sed 's/^\(.*\)@.*$/\1/'<<<${NIDS[i]}) INTERFACES[i]=$(ip -o a s | awk '$4 ~ /^'$ip'\//{print $2}') + INTERFACES=($(echo "${INTERFACES[@]}" | tr ' ' '\n' | uniq | tr '\n' ' ')) if [[ -z ${INTERFACES[i]} ]]; then error "Can't determine interface name for NID ${NIDS[i]}" elif [[ 1 -ne $(wc -w <<<${INTERFACES[i]}) ]]; then @@ -1613,6 +1617,7 @@ test_208() { local if0_ip=$(ip --oneline addr show dev ${INTERFACES[0]} | awk '/inet /{print $4}' | sed 's:/.*::') + if0_ip=($(echo "${if0_ip[@]}" | tr ' ' '\n' | uniq | tr '\n' ' ')) local ip2nets_str="tcp(${INTERFACES[0]}) $if0_ip" echo "Configure single NID \"$ip2nets_str\""