From: Michal Sojka Date: Wed, 1 Dec 2010 11:55:47 +0000 (+0100) Subject: Delete vcan interfaces before every test X-Git-Tag: fix-allnoconfig~294 X-Git-Url: http://rtime.felk.cvut.cz/gitweb/can-benchmark.git/commitdiff_plain/af435eda452d44e275d769617f57900877164ed6 Delete vcan interfaces before every test --- diff --git a/gw-tests/lib.sh b/gw-tests/lib.sh index cacde47..003782d 100644 --- a/gw-tests/lib.sh +++ b/gw-tests/lib.sh @@ -30,8 +30,6 @@ sshgw() { } cleanupgw() { - # Set can interfaces up - sshgw 'for i in 0 1; do ip link show dev can$i|grep -q UP || ip link set can$i up type can bitrate 1000000; done' sshgw 'cangw -F' } @@ -84,8 +82,14 @@ _run() { cd $dir echo "Working directory: $dir" if [[ ! "$OPT_PLOT_ONLY" ]]; then + # Remove data from the last measurement rm -rf * + # Set can interfaces up + sshgw 'for i in 0 1; do ip link show dev can$i|grep -q UP || ip link set can$i up type can bitrate 1000000; done' + # Delete all vcan interfaces + sshgw 'for dev in $(ip l|grep -o vcan[^:]\\+); do ip link del dev $dev; done' cleanupgw + main cp $script . fi