]> rtime.felk.cvut.cz Git - can-benchmark.git/blobdiff - tests/_lib.sh
Added tests with ethernet load
[can-benchmark.git] / tests / _lib.sh
index 47facb0603d5755fbb8e4cb0ec073e1fff531169..183f1891b374963e42a7ee4225492c91abd31c19 100644 (file)
@@ -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