]> rtime.felk.cvut.cz Git - can-benchmark.git/blob - gw-tests/vcan.sh
Adds RTEMS target to makefile and associated Python scripts.
[can-benchmark.git] / gw-tests / vcan.sh
1 #!/bin/bash
2
3 . lib.sh
4
5 numjobs=`seq 0 2 10`
6
7 main() {
8     if [ "$kvers" = 3.0.4-rt14-00008-gb2052fd -a "$load" = eth -a $traffic != oneatatime ]; then echo "Skipping eth test"; SKIPPED=1; return; fi
9
10     if [ "$kvers" = 3.4.33-rt47-00004-gc58c9ae ]; then echo "Skipping test"; SKIPPED=1; return; fi; #All frames of these tests are returned as invalid...
11
12     sshgw 'ip link add dev vcan0 type vcan && ip link set vcan0 up'
13     for i in $numjobs; do
14         cleanupgw
15         sshgw cangw -A -s can0 -d vcan0 -e -f 0:C00007FF
16         for j in `seq $i`; do
17             sshgw cangw -A -s vcan0 -d vcan0 -e -f $(printf %x:C00007FF $((j-1))) -m SET:I:$(printf %x $j).0.0000000000000000
18         done
19         sshgw cangw -A -s vcan0 -d can1 -f $(printf %x:C00007FF $i)
20
21         latester -d can0 -d can1 -d can2 -c $COUNT -i 0 $(traffic_and_length 2) -n hops$i
22     done
23     sshgw ip link del dev vcan0
24 }
25
26 ADDITIONAL_PLOTS=detail
27
28 plot_cmds() {
29     if [[ "$1" = detail ]]; then
30         range=0:0.4
31         echo "set logscale y"
32         echo "set mxtics 5"
33     else
34         range=0.01:1000
35         echo "set logscale xy"
36     fi
37     cat <<EOF
38 set title "Chained GWs on a single VCAN interface"
39 set grid xtics mxtics ytics mytics lw 1, lw 0.5
40 set xlabel "GW latency [ms]"
41 set ylabel "Latency profile [frames]"
42 plot [$range] [1:$COUNT] \\
43 EOF
44     lt=2
45     for i in $numjobs; do
46         echo_plot "\"hops$i-hist.txt\" with lp lt $lt pt $lt title \"$((i+2)) GW jobs, 1 vcan\""
47         lt=$((lt+1))
48     done
49 }
50
51
52 test_end