Commit 3099c59d authored by Florian Westphal's avatar Florian Westphal Committed by David S. Miller

selftests: rtnetlink: skip ipsec offload tests if netdevsim isn't present

running the script on systems without netdevsim now prints:

SKIP: ipsec_offload can't load netdevsim

instead of error message & failed status.
Signed-off-by: default avatarFlorian Westphal <fw@strlen.de>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent fc413885
......@@ -738,13 +738,17 @@ kci_test_ipsec_offload()
sysfsd=/sys/kernel/debug/netdevsim/netdevsim0/ports/0/
sysfsf=$sysfsd/ipsec
sysfsnet=/sys/bus/netdevsim/devices/netdevsim0/net/
probed=false
# setup netdevsim since dummydev doesn't have offload support
modprobe netdevsim
if [ ! -w /sys/bus/netdevsim/new_device ] ; then
modprobe -q netdevsim
check_err $?
if [ $ret -ne 0 ]; then
echo "FAIL: ipsec_offload can't load netdevsim"
return 1
echo "SKIP: ipsec_offload can't load netdevsim"
return $ksft_skip
fi
probed=true
fi
echo "0" > /sys/bus/netdevsim/new_device
......@@ -824,7 +828,7 @@ EOF
fi
# clean up any leftovers
rmmod netdevsim
$probed && rmmod netdevsim
if [ $ret -ne 0 ]; then
echo "FAIL: ipsec_offload"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment