From: Michal Sojka Date: Wed, 1 Dec 2010 12:08:28 +0000 (+0100) Subject: Merge branch 'master' of rtime.felk.cvut.cz:/can-benchmark X-Git-Tag: fix-allnoconfig~289^2 X-Git-Url: http://rtime.felk.cvut.cz/gitweb/can-benchmark.git/commitdiff_plain/619a183d2ccd37bf528b0d0c0141344cc7dbd75f?hp=04dce12904bea0b9e299ad9b43f3fd0432b8a0fc Merge branch 'master' of rtime.felk.cvut.cz:/can-benchmark --- diff --git a/gw-tests/gw-filter.sh b/gw-tests/gw-filter.sh index bebdc3f..757f328 100755 --- a/gw-tests/gw-filter.sh +++ b/gw-tests/gw-filter.sh @@ -22,11 +22,9 @@ plot [0:1500] [1:$COUNT] \\ EOF lt=1 for i in $ids; do - (( i != 0)) && echo ", \\" - echo -n " " \"hist-$i.dat\" with lp lt $lt title \"Message id $i\" + echo_plot "\"hist-$i.dat\" with lp lt $lt title \"Message id $i\"" lt=$((lt+1)) done - echo } test_end diff --git a/gw-tests/lib.sh b/gw-tests/lib.sh index 439ddc7..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' } @@ -65,6 +63,13 @@ create_dirs_and_links() { echo $d } +echo_plot() { + plot=$1 + [[ "$_plot_separator" ]] && echo ", \\" + _plot_separator=t + echo -n " " $plot +} + _run() { if [[ ! "$OPT_PLOT_ONLY" ]]; then kernel_versions=$(sshgw uname -r) @@ -77,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 diff --git a/gw-tests/vcan.sh b/gw-tests/vcan.sh new file mode 100755 index 0000000..ff7b967 --- /dev/null +++ b/gw-tests/vcan.sh @@ -0,0 +1,43 @@ +#!/bin/bash + +. lib.sh + +numjobs=`seq 0 2 10` + +main() { + sshgw 'ip link add dev vcan0 type vcan && ip link set vcan0 up' + for i in $numjobs; do + cleanupgw + sshgw cangw -A -s can0 -d vcan0 -e -f 0:C00007FF + for j in `seq $i`; do + sshgw cangw -A -s vcan0 -d vcan0 -e -f $(printf %x:C00007FF $((j-1))) -m SET:I:$(printf %x $j).0.0000000000000000 + done + sshgw cangw -A -s vcan0 -d can1 -f $(printf %x:C00007FF $i) + + latester -d can0 -d can1 -d can2 -o -c $COUNT -i 0 -h hist-$i.dat -f time-$i.dat + + echo + sshgw cangw -L + + done + sshgw ip link del dev vcan0 +} + +plot_cmds() { + cat <