X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=common%2Fscripts%2Ftest_can_modules.sh;h=87b2a86be34f5cd5c6279ac1bd01b58b1aa0ef0c;hb=refs%2Fheads%2Flamprey;hp=2a1689773886face20eb7901f6016a4f3ed54143;hpb=77e208ad5e1b21868c3369a93b5460f568d9e6f7;p=src%2Fqa-testdefinitions.git diff --git a/common/scripts/test_can_modules.sh b/common/scripts/test_can_modules.sh index 2a16897..87b2a86 100755 --- a/common/scripts/test_can_modules.sh +++ b/common/scripts/test_can_modules.sh @@ -1,6 +1,7 @@ #!/bin/sh RCAR_CAN=0 +CAN_BCM=0 if [ ! -e /sys/class/net/can1 ];then lava-test-case show_can_modules --result skip @@ -44,6 +45,13 @@ modprobe_module() { remove_module can_raw +# handle "rmmod: ERROR: Module can is in use by: can_bcm" +lsmod | grep -q can_bcm +if [ $? -eq 0 ];then + CAN_BCM=1 + remove_module can_bcm +fi + remove_module can remove_module c_can_platform @@ -58,7 +66,7 @@ fi remove_module can_dev -ip -V | grep -q -i BusyBox +ip -V 2>&1 | grep -q -i BusyBox if [ $? -eq 0 ];then lava-test-case canconfig_can0 --result skip else @@ -84,11 +92,15 @@ if [ $RCAR_CAN -eq 1 ];then modprobe_module rcar_can fi +if [ $CAN_BCM -eq 1 ];then + modprobe_module can_bcm +fi + #Make sure always that the can interface is down before #starting the config step. ip link set can0 down -ip -V | grep -q -i BusyBox +ip -V 2>&1 | grep -q -i BusyBox if [ $? -eq 0 ];then lava-test-case canconfig_can0 --result skip else