summaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/bpf
diff options
context:
space:
mode:
authorWilliam Tu <u9012063@gmail.com>2017-08-11 06:46:39 -0700
committerDavid S. Miller <davem@davemloft.net>2017-08-11 14:57:31 -0700
commit047dbb27ff470782c4bd3d574942e571e747463f (patch)
tree14da113cfb29e3f4befc877333ea5625afdfc8d6 /tools/testing/selftests/bpf
parent159fe88efda2f5b84681727a4291511338132c1f (diff)
downloadblackbird-op-linux-047dbb27ff470782c4bd3d574942e571e747463f.tar.gz
blackbird-op-linux-047dbb27ff470782c4bd3d574942e571e747463f.zip
selftests: bpf: add check for ip XDP redirect
Kernel test robot reports error when running test_xdp_redirect.sh. Check if ip tool supports xdpgeneric, if not, skip the test. Signed-off-by: William Tu <u9012063@gmail.com> Acked-by: Daniel Borkmann <daniel@iogearbox.net> Cc: John Fastabend <john.fastabend@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'tools/testing/selftests/bpf')
-rwxr-xr-xtools/testing/selftests/bpf/test_xdp_redirect.sh5
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/testing/selftests/bpf/test_xdp_redirect.sh b/tools/testing/selftests/bpf/test_xdp_redirect.sh
index d8c73ed6e040..344a3656dea6 100755
--- a/tools/testing/selftests/bpf/test_xdp_redirect.sh
+++ b/tools/testing/selftests/bpf/test_xdp_redirect.sh
@@ -23,6 +23,11 @@ cleanup()
ip netns del ns2 2> /dev/null
}
+ip link set dev lo xdpgeneric off 2>/dev/null > /dev/null
+if [ $? -ne 0 ];then
+ echo "selftests: [SKIP] Could not run test without the ip xdpgeneric support"
+ exit 0
+fi
set -e
ip netns add ns1
OpenPOWER on IntegriCloud