Whamcloud - gitweb
LU-9201 tests: don't check network for localhost 11/29011/2
authorAndreas Dilger <andreas.dilger@intel.com>
Mon, 15 May 2017 21:56:18 +0000 (23:56 +0200)
committerOleg Drokin <oleg.drokin@intel.com>
Wed, 22 Nov 2017 03:55:26 +0000 (03:55 +0000)
Don't try to check if the network to the local host is up, since
this just wastes time and adds noise to the test output logs.

Remove ancient 1.8 compatibility check.

Test-Parameters: trivial
Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: I6c1f8df613afd657155da1309525e75b9d1c5bae
Reviewed-on: https://review.whamcloud.com/29011
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Steve Guminski <stephenx.guminski@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/tests/test-framework.sh

index be82fec..9874da4 100755 (executable)
@@ -4870,17 +4870,19 @@ wait_for_function () {
 }
 
 check_network() {
-    local host=$1
-    local max=$2
-    local sleep=${3:-5}
+       local host=$1
+       local max=$2
+       local sleep=${3:-5}
 
-    echo `date +"%H:%M:%S (%s)"` waiting for $host network $max secs ...
-    if ! wait_for_function --quiet "ping -c 1 -w 3 $host" $max $sleep ; then
-        echo "Network not available!"
-        exit 1
-    fi
+       [ "$host" = "$HOSTNAME" ] && return 0
+
+       echo "$(date +'%H:%M:%S (%s)') waiting for $host network $max secs ..."
+       if ! wait_for_function --quiet "ping -c 1 -w 3 $host" $max $sleep ; then
+               echo "Network not available!"
+               exit 1
+       fi
 
-    echo `date +"%H:%M:%S (%s)"` network interface is UP
+       echo "$(date +'%H:%M:%S (%s)') network interface is UP"
 }
 
 no_dsh() {
@@ -6357,10 +6359,7 @@ get_mdtosc_proc_path() {
        local mdt_label=$(convert_facet2label $mds_facet)
        local mdt_index=$(echo $mdt_label | sed -e 's/^.*-//')
 
-       if [ $(lustre_version_code $mds_facet) -le $(version_code 1.8.0) ] ||
-          mds_on_old_device $mds_facet; then
-               echo "${ost_label}-osc"
-       elif [[ $ost_label = *OST* ]]; then
+       if [[ $ost_label = *OST* ]]; then
                echo "${ost_label}-osc-${mdt_index}"
        else
                echo "${ost_label}-osp-${mdt_index}"