From a0c7876d744180eac28e3f01ea04b1f960cc42d9 Mon Sep 17 00:00:00 2001 From: Niklas Eiling Date: Wed, 8 Jul 2020 16:08:09 +0200 Subject: [PATCH] can: for integration test check if interface is up --- tests/integration/node-can.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/integration/node-can.sh b/tests/integration/node-can.sh index dadb326ef..3a2de91cc 100755 --- a/tests/integration/node-can.sh +++ b/tests/integration/node-can.sh @@ -35,6 +35,11 @@ CAN_IF=vcan0 NUM_SAMPLES=${NUM_SAMPLES:-10} NUM_VALUES=${NUM_VALUES:-3} +# Check if vcan0 interface is present +if [[ ! $(ip link show "${CAN_IF}" up) ]]; then + echo "Did not find any vcan interface ${CAN_IF} or interface is not up" + exit 99 +fi #sudo modprobe vcan #sudo ip link add dev vcan0 type vcan