From a0b22fdc019d55075c59b300926697e5493f2ffe Mon Sep 17 00:00:00 2001 From: Alex Iribarren <Alex.Iribarren@cern.ch> Date: Thu, 17 Sep 2020 14:02:38 +0200 Subject: [PATCH] Patched tests already upstream --- upstreamcentostests.sh | 70 ++---------------------------------------- 1 file changed, 3 insertions(+), 67 deletions(-) diff --git a/upstreamcentostests.sh b/upstreamcentostests.sh index 71944d7..9f90678 100644 --- a/upstreamcentostests.sh +++ b/upstreamcentostests.sh @@ -95,7 +95,7 @@ patch -p0 --ignore-whitespace <<'DELIM' fi --- tests/p_iputils/tracepath_test.sh 2020-07-22 09:16:07.230933005 +0200 +++ tests/p_iputils/tracepath_test.sh 2020-07-22 09:17:54.567397062 +0200 -@@ -5,23 +5,23 @@ +@@ -5,7 +5,7 @@ # Testing availability of network if [ $SKIP_QA_HARNESS -eq 1 ]; then @@ -104,28 +104,9 @@ patch -p0 --ignore-whitespace <<'DELIM' else HOST="repo.centos.qa" fi - - t_Log "Running $0 - running ${TEST} to ${HOST}" - --IP=$(host ${HOST}) -+IP=$(dig +short ${HOST} A ${HOST} AAAA) - FILE=/var/tmp/tracepath_result - ret_val=1 - # getting IP-address of default gateway as a fall back - defgw=$(ip route list | grep default | cut -d' ' -f3) - --if [[ $IP =~ .*address\ ([0-9.]*) ]] -+if [[ ! -z "$IP" ]] - then - tracepath -n ${HOST} > ${FILE} -- COUNT=$(grep -c ${BASH_REMATCH[1]} ${FILE}) -+ COUNT=$(echo "$IP" | grep -cf - ${FILE}) - TTL=$(grep -c 'Too many hops' ${FILE}) - GW=$(grep -c ${defgw} ${FILE}) - if ([ $COUNT = 1 ] || [ $COUNT = 2 ]) --- tests/p_mtr/mtr_test.sh 2020-07-22 10:07:09.370957352 +0200 +++ tests/p_mtr/mtr_test.sh 2020-07-22 10:11:26.710029174 +0200 -@@ -5,20 +5,21 @@ +@@ -5,7 +5,7 @@ # Testing availability of network if [ $SKIP_QA_HARNESS -eq 1 ]; then @@ -134,35 +115,9 @@ patch -p0 --ignore-whitespace <<'DELIM' else HOST="repo.centos.qa" fi - - t_Log "Running $0 - running ${TEST} to ${HOST}" - ret_val=1 -+FILE=/var/tmp/mtr_result - --IP=$(host ${HOST}) -+IP=$(dig +short ${HOST} A ${HOST} AAAA) - --regex='.*address\ ([0-9.]*)' --if [[ $IP =~ $regex ]] -+if [[ ! -z "$IP" ]] - then -- COUNT=$( mtr -nr -c1 ${HOST} | grep -c ${BASH_REMATCH[1]} ) -+ mtr -nr -c1 ${HOST} > ${FILE} -+ COUNT=$(echo "$IP" | grep -cf - ${FILE}) - if [ $COUNT = 1 ] - then - t_Log "${TEST} reached ${HOST}" -@@ -27,6 +28,7 @@ - t_Log "${TEST} didn't reach ${HOST}" - ret_val=1 - fi -+ /bin/rm ${FILE} - fi - - t_CheckExitStatus $ret_val --- tests/p_traceroute/traceroute_test.sh 2020-07-22 10:36:20.590306298 +0200 +++ tests/p_traceroute/traceroute_test.sh 2020-07-22 10:44:39.470382735 +0200 -@@ -5,23 +5,23 @@ +@@ -5,7 +5,7 @@ # Testing availability of network if [ $SKIP_QA_HARNESS -eq 1 ]; then @@ -171,25 +126,6 @@ patch -p0 --ignore-whitespace <<'DELIM' else HOST="repo.centos.qa" fi - - t_Log "Running $0 - running ${TEST} to ${HOST}" - --IP=$(host ${HOST}) -+IP=$(dig +short ${HOST} A ${HOST} AAAA) - FILE=/var/tmp/traceroute_result - ret_val=1 - # getting IP-address of default gateway as a fall back - defgw=$(ip route list | grep default | cut -d' ' -f3) - --if [[ $IP =~ .*address\ ([0-9.]*) ]] -+if [[ ! -z "$IP" ]] - then - traceroute -n ${HOST} > ${FILE} -- COUNT=$(grep -c ${BASH_REMATCH[1]} ${FILE}) -+ COUNT=$(echo "$IP" | grep -cf - ${FILE}) - TTL=$(egrep -c '30 \* \* \*' ${FILE}) - GW=$(grep -c ${defgw} ${FILE}) - if [ $COUNT = 2 ] --- tests/p_wget/wget_test.sh 2020-07-22 10:39:37.275125990 +0200 +++ tests/p_wget/wget_test.sh 2020-07-22 10:41:31.094599707 +0200 @@ -8,7 +8,7 @@ -- GitLab