summaryrefslogtreecommitdiffstats
path: root/common/scripts/test_stats.sh
blob: de73671028a0177ed826dc41583d2c72d477b53f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/bin/sh


if [ ! -e /sys/class/net/can1 ];then
	lava-test-case show_can_stats --result skip
	lava-test-case show_can0_stats --result skip
	lava-test-case show_can1_stats --result skip
    exit 0
fi

# show can interfaces stats
cat /proc/net/can/stats
if [ $? -eq 0 ];then
	lava-test-case show_can_stats --result pass
else
	lava-test-case show_can_stats --result fail
fi

sleep 5

ip -d -s link show can0
if [ $? -eq 0 ];then
	lava-test-case show_can0_stats --result pass
else
	lava-test-case show_can0_stats --result fail
fi

sleep 5

ip -d -s link show can1
if [ $? -eq 0 ];then
	lava-test-case show_can1_stats --result pass
else
	lava-test-case show_can1_stats --result fail
fi

sleep 7