X-Git-Url: http://rtime.felk.cvut.cz/gitweb/can-benchmark.git/blobdiff_plain/fc0652122a25ad837d72c3b6dfe0c1da2bb58f23..79f8357de009a8b24c7060811846f124d9ddde6a:/tests/_lib.sh diff --git a/tests/_lib.sh b/tests/_lib.sh index 47facb0..183f189 100644 --- a/tests/_lib.sh +++ b/tests/_lib.sh @@ -11,10 +11,18 @@ set -e PATH=$PWD/../_compiled/bin/:$PATH +RTPRIO=60 + +boost_irq_prio() { + local P=${1:-50} + CAN_IRQ=`sed -ne '/can/ s/:.*//p' /proc/interrupts` + if [ -n "$CAN_IRQ" ]; then + schedtool -F -p $P `pidof IRQ-${CAN_IRQ/ /}` + fi +} + rmmod_can() { - modprobe -r lincan - modprobe -r kvaser_pci - modprobe -r vcan + modprobe -r lincan kvaser_pci vcan } prepare_lincan_hw() { @@ -63,6 +71,7 @@ run_tests() { tests=${TESTS:-socketcan_hw lincan_hw} for i in $tests; do cpufreq-set -f 2400MHz + boost_irq_prio 50 prepare_$i t done