5 -P) OPT_PLOT_DISABLE=1; shift;;
6 -p) OPT_PLOT_ONLY=1; shift;;
7 -X|--no-x11-plot) OPT_NO_X11=1; shift;;
8 -t) OPT_TRAFFIC=$2; shift 2;;
12 PATH=$PWD/../_compiled/bin/:$PATH
22 local socket="$HOME/.ssh/cangw-connection"
24 if [[ ! -S $socket ]]; then
25 # Create master connection to speed up subsequenct command.
26 # The ssh is put into background and the connection is closed
28 ssh -f -M -S $socket root@192.168.2.3 sleep 600 > /dev/null 2>&1
30 ssh -x -a -S $socket root@192.168.2.3 "$@"
38 local testname=`basename $0 .sh`
40 plot_cmds | sed -e "/set title/ s/[\"']\(.*\)[\"']/\"\1\\\\n($kvers)\"/" > plot.gp
41 if [ -z "$OPT_NO_X11" ]; then
42 echo "set terminal x11 enhanced; $(< plot.gp)" | gnuplot -persist
45 echo 'set terminal postscript color eps enhanced size 6cm,4cm lw 1 "Times-Roman" 10;' \
47 "$(< plot.gp)" | gnuplot > ${testname}$I.eps
48 echo "set terminal postscript color eps enhanced;" \
49 "$(< plot.gp)" | gnuplot | epstopdf --filter > ${testname}$I.pdf
51 convert -density 30 -gamma 0.5 -quality 90 -type Palette -depth 8 ${testname}$I.pdf thumb/${testname}$I.png
52 convert -density 150 -gamma 0.7 -quality 90 -type Palette -depth 8 ${testname}$I.pdf ${testname}$I.png
56 create_dirs_and_links() {
60 local d=results/by-kern/$kver/$test
62 mkdir -p results/by-test/$test
63 ln -sfT ../../${d#results/} results/by-test/$test/$kver
69 [[ "$_plot_separator" ]] && echo ", \\"
74 traffic_and_length() {
77 all) error "Bug in the test script - traffic cannot be 'all' here.";;
79 50) opts="-p $((2*(44+$1*8)))";;
86 if [[ ! "$OPT_PLOT_ONLY" ]]; then
87 kernel_versions=$(sshgw uname -r)
89 kernel_versions=$(ls results/by-kern)
91 for kvers in $kernel_versions; do
92 dir=$(create_dirs_and_links $(basename $0 .sh) $kvers)
95 echo "Working directory: $dir"
96 if [[ ! "$OPT_PLOT_ONLY" ]]; then
97 # Remove data from the last measurement
99 # Set can interfaces up
100 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'
101 # Delete all vcan interfaces
102 sshgw 'for dev in $(ip l|grep -o vcan[^:]\\+); do ip link del dev $dev; done'
104 sshgw 'chrt -p -f 50 `pidof irq/145-can0` > /dev/null || :'
105 sshgw 'chrt -p -f 50 `pidof irq/146-can1` > /dev/null || :'
106 sshgw 'chrt -p -f 49 `pidof sirq-net-rx/0` > /dev/null || :'
107 sshgw 'chrt -p -f 49 `pidof sirq-net-tx/0` > /dev/null || :'
113 if [[ ! "$OPT_PLOT_DISABLE" ]]; then
129 if [[ ! "$test_end_called" ]]; then
131 error "bug in the test script: No test_end called"
133 if ! test -n "$exit_ok"; then
134 error "FATAL: Command '$cmd' exit with code $code"