From 5d7b4410d525287416ae1dd3751ab1d9b6c93390 Mon Sep 17 00:00:00 2001 From: Simon Duquennoy Date: Mon, 14 May 2018 13:46:07 -0700 Subject: [PATCH] Add native border router fragmentation test --- .../17-tun-rpl-br/09-native-border-router-cooja-frag.sh | 9 +++++++++ tests/17-tun-rpl-br/test-native-border-router.sh | 8 +++++++- 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100755 tests/17-tun-rpl-br/09-native-border-router-cooja-frag.sh diff --git a/tests/17-tun-rpl-br/09-native-border-router-cooja-frag.sh b/tests/17-tun-rpl-br/09-native-border-router-cooja-frag.sh new file mode 100755 index 000000000..b1aa1351b --- /dev/null +++ b/tests/17-tun-rpl-br/09-native-border-router-cooja-frag.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +# Contiki directory +CONTIKI=$1 + +# Simulation file +BASENAME=07-native-border-router-cooja + +bash test-native-border-router.sh $CONTIKI $BASENAME fd00::204:4:4:4 60 600 2 diff --git a/tests/17-tun-rpl-br/test-native-border-router.sh b/tests/17-tun-rpl-br/test-native-border-router.sh index 38dce1bae..636b6b973 100644 --- a/tests/17-tun-rpl-br/test-native-border-router.sh +++ b/tests/17-tun-rpl-br/test-native-border-router.sh @@ -12,6 +12,12 @@ IPADDR=$3 # Time allocated for convergence WAIT_TIME=$4 +# Payload len. Default is ping6's default, 56. +PING_SIZE=${5:-56} + +# Inter-ping delay. Default is ping6's default, 1s. +PING_DELAY=${6:-1} + # ICMP request-reply count COUNT=5 @@ -30,7 +36,7 @@ sleep $WAIT_TIME # Do ping echo "Pinging" -ping6 $IPADDR -c $COUNT | tee $BASENAME.scriptlog +ping6 $IPADDR -c $COUNT -s $PING_SIZE -i $PING_DELAY | tee $BASENAME.scriptlog # Fetch ping6 status code (not $? because this is piped) STATUS=${PIPESTATUS[0]} REPLIES=`grep -c 'icmp_seq=' $BASENAME.scriptlog`