aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFangyin Hu <fangyinx.hu@intel.com>2017-07-18 01:22:49 -0700
committerPeter Mikus <pmikus@cisco.com>2017-08-01 11:02:54 +0000
commitf67399101f4fa359de7f6e2b325be455d1438ee8 (patch)
treed0bf369b548bb9a3755adb14bd859471c85f3fb9
parentbf46bcd0db5a35ce49e3b55e567fc83be37abd32 (diff)
Test TLDK tcpdump command not found issue.
Use the new VIRL image to test. Add the debug information for the test. Change-Id: I8343a17d38dffbf84039e39a06fc5c5a65aaf201 Signed-off-by: Fangyin Hu <fangyinx.hu@intel.com>
-rwxr-xr-xbootstrap-TLDK.sh2
-rwxr-xr-xtests/tldk/tldk_scripts/run_tldk.sh36
2 files changed, 28 insertions, 10 deletions
diff --git a/bootstrap-TLDK.sh b/bootstrap-TLDK.sh
index 4f731cd527..7a26e88db0 100755
--- a/bootstrap-TLDK.sh
+++ b/bootstrap-TLDK.sh
@@ -138,7 +138,7 @@ fi
echo "Starting simulation on VIRL server"
VIRL_TOPOLOGY=double-ring-nested.xenial
-VIRL_RELEASE=csit-ubuntu-16.04.1_2016-12-19_1.6
+VIRL_RELEASE=csit-ubuntu-16.04.1_2017-07-26_1.9
function stop_virl_simulation {
ssh ${SSH_OPTIONS} ${VIRL_USERNAME}@${VIRL_SERVER}\
diff --git a/tests/tldk/tldk_scripts/run_tldk.sh b/tests/tldk/tldk_scripts/run_tldk.sh
index 0f56f02dfc..6a0311b974 100755
--- a/tests/tldk/tldk_scripts/run_tldk.sh
+++ b/tests/tldk/tldk_scripts/run_tldk.sh
@@ -15,15 +15,31 @@ IPv6_addr=$7
echo $IPv4_addr
-#kill the l4fwd
-sudo killall -9 l4fwd 2>/dev/null
-
-sleep 2
-
-pid=`pgrep l4fwd`
-if [ "$pid" != "" ]; then
- echo "terminate the l4fwd failed!"
- exit 1
+# Try to kill the l4fwd
+sudo pgrep l4fwd
+if [ $? -eq "0" ]; then
+ success=false
+ sudo pkill l4fwd
+ echo "RC = $?"
+ for attempt in {1..5}; do
+ echo "Checking if l4fwd is still alive, attempt nr ${attempt}"
+ sudo pgrep l4fwd
+ if [ $? -eq "1" ]; then
+ echo "l4fwd is dead"
+ success=true
+ break
+ fi
+ echo "l4fwd is still alive, waiting 1 second"
+ sleep 1
+ done
+ if [ "$success" = false ]; then
+ echo "The command sudo pkill l4fwd failed"
+ sudo pkill -9 l4fwd
+ echo "RC = $?"
+ exit 1
+ fi
+else
+ echo "l4fwd is not running"
fi
#mount the hugepages again
@@ -50,4 +66,6 @@ fi
cd ${PWDDIR}
+ps -elf | grep l4fwd
+
sleep 10