Merge "Avoid some test cases failures"
authorJan-Simon Moeller <jsmoeller@linuxfoundation.org>
Sun, 6 Oct 2019 13:27:40 +0000 (13:27 +0000)
committerGerrit Code Review <gerrit@automotivelinux.org>
Sun, 6 Oct 2019 13:27:40 +0000 (13:27 +0000)
common/scripts/test_can_loopback_mode.sh
common/scripts/test_can_modules.sh
common/scripts/test_can_send_receive.sh

index 7f86ef9..4425c5d 100755 (executable)
@@ -9,6 +9,11 @@ if [ ! -e /sys/class/net/can0 ];then
         exit 0
 fi
 sleep 2
+
+#Make sure always that the can interface is down before
+#starting the config step.
+ip link set can0 down
+
 #config the can interfaces
 ip link set can0 type can bitrate 50000 loopback on
 sleep 2
index d6caf54..12e82ee 100755 (executable)
@@ -121,6 +121,11 @@ fi
 
 sleep 5
 
+#Make sure always that the can interface is down before
+#starting the config step.
+ip link set can0 down
+ip link set can1 down
+
 ip link set can0 type can bitrate 50000
 if [ $? -eq 0 ];then
        lava-test-case canconfig_can0 --result pass
index 06bde6f..150ce37 100755 (executable)
@@ -13,6 +13,11 @@ if [ ! -e /sys/class/net/can1 ];then
        exit 0
 fi
 
+#Make sure always that the can interface is down before
+#starting the config step.
+ip link set can0 down
+ip link set can1 down
+
 #config the can interfaces
 ip link set can0 type can bitrate 50000
 if [ $? -eq 0 ];then