From 6c0f6591930ed6e37a5d9d280ae8135f02b65ecc Mon Sep 17 00:00:00 2001 From: Keith Mannthey Date: Tue, 4 Jun 2013 16:14:37 -0700 Subject: [PATCH] LU-2997 test: remove special case for "client" I ran into trouble on a machine named "client" and I tracked it down to this special case code. I removed the speical case for "client" and fixed some tabs. Signed-off-by: Keith Mannthey Change-Id: Ia0660b912c29301060682ac51459edb5c44c2190 Reviewed-on: http://review.whamcloud.com/5794 Reviewed-by: Bob Glossman Tested-by: Hudson Tested-by: Maloo Reviewed-by: Minh Diep Reviewed-by: Jian Yu Reviewed-by: Oleg Drokin --- lustre/tests/test-framework.sh | 43 +++++++++++++++++++++--------------------- 1 file changed, 22 insertions(+), 21 deletions(-) diff --git a/lustre/tests/test-framework.sh b/lustre/tests/test-framework.sh index 62d0881..0734bf5 100644 --- a/lustre/tests/test-framework.sh +++ b/lustre/tests/test-framework.sh @@ -2421,42 +2421,43 @@ host_nids_address() { } h2name_or_ip() { - if [ "$1" = "client" -o "$1" = "'*'" ]; then echo \'*\'; else - echo $1"@$2" - fi + if [ "$1" = "'*'" ]; then echo \'*\'; else + echo $1"@$2" + fi } h2ptl() { - if [ "$1" = "client" -o "$1" = "'*'" ]; then echo \'*\'; else - ID=`xtprocadmin -n $1 2>/dev/null | egrep -v 'NID' | awk '{print $1}'` - if [ -z "$ID" ]; then - echo "Could not get a ptl id for $1..." - exit 1 - fi - echo $ID"@ptl" - fi + if [ "$1" = "'*'" ]; then echo \'*\'; else + ID=`xtprocadmin -n $1 2>/dev/null | egrep -v 'NID' | \ + awk '{print $1}'` + if [ -z "$ID" ]; then + echo "Could not get a ptl id for $1..." + exit 1 + fi + echo $ID"@ptl" + fi } declare -fx h2ptl h2tcp() { - h2name_or_ip "$1" "tcp" + h2name_or_ip "$1" "tcp" } declare -fx h2tcp h2elan() { - if [ "$1" = "client" -o "$1" = "'*'" ]; then echo \'*\'; else - if type __h2elan >/dev/null 2>&1; then - ID=$(__h2elan $1) - else - ID=`echo $1 | sed 's/[^0-9]*//g'` - fi - echo $ID"@elan" - fi + if [ "$1" = "'*'" ]; then echo \'*\'; else + if type __h2elan >/dev/null 2>&1; then + ID=$(__h2elan $1) + else + ID=`echo $1 | sed 's/[^0-9]*//g'` + fi + echo $ID"@elan" + fi } declare -fx h2elan h2o2ib() { - h2name_or_ip "$1" "o2ib" + h2name_or_ip "$1" "o2ib" } declare -fx h2o2ib -- 1.8.3.1