Code Review
/
src
/
qa-testdefinitions.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Extend the waiting time for emulated platforms
[src/qa-testdefinitions.git]
/
common
/
scripts
/
test_can_modules.sh
diff --git
a/common/scripts/test_can_modules.sh
b/common/scripts/test_can_modules.sh
index
3b317af
..
87b2a86
100755
(executable)
--- a/
common/scripts/test_can_modules.sh
+++ b/
common/scripts/test_can_modules.sh
@@
-1,5
+1,8
@@
#!/bin/sh
#!/bin/sh
+RCAR_CAN=0
+CAN_BCM=0
+
if [ ! -e /sys/class/net/can1 ];then
lava-test-case show_can_modules --result skip
lava-test-case unload_can_raw_module --result skip
if [ ! -e /sys/class/net/can1 ];then
lava-test-case show_can_modules --result skip
lava-test-case unload_can_raw_module --result skip
@@
-42,13
+45,26
@@
modprobe_module() {
remove_module can_raw
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
remove_module c_can
remove_module can
remove_module c_can_platform
remove_module c_can
-remove_module can_dev unload_can_dev_module
+lsmod | grep -q rcar_can
+if [ $? -eq 0 ];then
+ RCAR_CAN=1
+ remove_module rcar_can
+fi
+
+remove_module can_dev
ip -V 2>&1 | grep -q -i BusyBox
if [ $? -eq 0 ];then
ip -V 2>&1 | grep -q -i BusyBox
if [ $? -eq 0 ];then
@@
-72,6
+88,14
@@
modprobe_module c_can_platform
modprobe_module can_dev
modprobe_module can_dev
+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
#Make sure always that the can interface is down before
#starting the config step.
ip link set can0 down