From: Daniel Lenski Date: Sun, 11 Apr 2021 16:37:34 +0000 (-0700) Subject: tests: 'route flush' doesn't work properly on Linux' X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=2e0632fba99e9c5024cbb9a069fc002b83e14348;p=users%2Fdwmw2%2Fvpnc-scripts.git tests: 'route flush' doesn't work properly on Linux' Need to use `ip route flush` in test scripts as a workaround: # route flush Flushing `inet' routing table not supported Signed-off-by: Daniel Lenski --- diff --git a/tests/vpn-noroute b/tests/vpn-noroute index a712004..69e03d3 100755 --- a/tests/vpn-noroute +++ b/tests/vpn-noroute @@ -136,6 +136,12 @@ while ! ${CMDNS1} ${IP} addr list dev ${TUNDEV} &>/dev/null; do done sleep 3 # XX: CI needs additional delay here +if test "$NO_IPROUTE2" = 1;then + # XX: 'route flush' doesn't work properly on Linux + ${CMSNS1} ${IP} route flush cache 2>/dev/null + ${CMSNS1} ${IP} -6 route flush cache 2>/dev/null +fi + set -e echo " * ping remote address" diff --git a/tests/vpn-routes b/tests/vpn-routes index 7e3c487..56dca2d 100755 --- a/tests/vpn-routes +++ b/tests/vpn-routes @@ -133,6 +133,12 @@ while ! ${CMDNS1} ${IP} addr list dev ${TUNDEV} &>/dev/null; do done sleep 3 # XX: CI needs additional delay here +if test "$NO_IPROUTE2" = 1;then + # XX: 'route flush' doesn't work properly on Linux + ${CMDNS1} ${IP} route flush cache 2>/dev/null + ${CMDNS1} ${IP} -6 route flush cache 2>/dev/null +fi + set -e echo " * ping remote address"