blob: 3ec98930a40abe5617af11c95b90cf37418c3941 [file]
#!/bin/sh
## The packetdrill scripting tool enables quick, precise tests for
## entire TCP/UDP/IPv4/IPv6 network stacks, from the system call
## layer down to the NIC hardware.
cd $BENCHMARK_ROOT/packetdrill || exit
# fix the issue: open tun device: No such file or directory
lsmod | grep -q tun || modprobe tun
for f in $(find . -name "*.pkt" ! -name "*diag-ipv6*" | sort); do
echo "Running $f ..."
ip tcp_metrics flush all > /dev/null 2>&1
# default tolerance_usecs is 4000 us, allow 10 times(4000 us) on LKP
opts=$(grep -q -- --tolerance_usecs $f >/dev/null 2>&1 || echo "--tolerance_usecs=40000")
log_cmd ./gtests/net/packetdrill/packetdrill $opts $f 2>&1
return_value=$?
if [ $return_value -eq 0 ]; then
echo "$f pass"
else
echo "$f failed"
fi
done