From 4b263fd3625dbb9a2f30c77bbd8e49bde0bca967 Mon Sep 17 00:00:00 2001 From: Khouloud Touil Date: Thu, 3 Oct 2019 11:17:04 +0200 Subject: Avoid some test cases failures To make sure that the can interface could be configured, we have to make it dowm each time before the start of the config step. Change-Id: I7bebea65072ffd822ee30241c68a0a89123b1576 Signed-off-by: Khouloud Touil --- common/scripts/test_can_loopback_mode.sh | 5 +++++ common/scripts/test_can_modules.sh | 5 +++++ common/scripts/test_can_send_receive.sh | 5 +++++ 3 files changed, 15 insertions(+) (limited to 'common') diff --git a/common/scripts/test_can_loopback_mode.sh b/common/scripts/test_can_loopback_mode.sh index 7f86ef9..4425c5d 100755 --- a/common/scripts/test_can_loopback_mode.sh +++ b/common/scripts/test_can_loopback_mode.sh @@ -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 diff --git a/common/scripts/test_can_modules.sh b/common/scripts/test_can_modules.sh index d6caf54..12e82ee 100755 --- a/common/scripts/test_can_modules.sh +++ b/common/scripts/test_can_modules.sh @@ -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 diff --git a/common/scripts/test_can_send_receive.sh b/common/scripts/test_can_send_receive.sh index 06bde6f..150ce37 100755 --- a/common/scripts/test_can_send_receive.sh +++ b/common/scripts/test_can_send_receive.sh @@ -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 -- cgit 1.2.3-korg