Add native border router fragmentation test

This commit is contained in:
Simon Duquennoy 2018-05-14 13:46:07 -07:00
parent 92018b0df0
commit 5d7b4410d5
2 changed files with 16 additions and 1 deletions

View File

@ -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

View File

@ -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`