diff options
author | Corentin LABBE <clabbe@baylibre.com> | 2019-12-17 13:54:46 +0100 |
---|---|---|
committer | Corentin LABBE <clabbe@baylibre.com> | 2019-12-20 10:03:19 +0100 |
commit | dcdb57fd23ef6a6049d6a6b107db962b56876b0a (patch) | |
tree | 55ec3547500a306f64a0738d179bfd3bd50b0d25 | |
parent | ea963ccbd7f2e41ed3f881a6dca7ce3df88a173d (diff) |
SPEC-3064: handle removal of can_bcmicefish_8.99.4icefish/8.99.48.99.4
The test removing can module fail on DRA7 due to can_bcm using it.
This patchs handle this case.
Bug-AGL: SPEC-3064
Change-Id: I272e0ea62786fb43c4ea68601f2fb12864a279b6
Signed-off-by: Corentin LABBE <clabbe@baylibre.com>
-rwxr-xr-x | common/scripts/test_can_modules.sh | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/common/scripts/test_can_modules.sh b/common/scripts/test_can_modules.sh index 1a46034..bf8ee37 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=1 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 @@ -84,6 +92,10 @@ 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 |