netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: William Tu <u9012063@gmail.com>
To: netdev@vger.kernel.org
Cc: Daniel Borkmann <daniel@iogearbox.net>,
	John Fastabend <john.fastabend@gmail.com>
Subject: [PATCH] selftests: bpf: add check for ip XDP redirect
Date: Thu, 10 Aug 2017 17:02:33 -0700	[thread overview]
Message-ID: <1502409753-27516-1-git-send-email-u9012063@gmail.com> (raw)

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>
Cc: Daniel Borkmann <daniel@iogearbox.net>
Cc: John Fastabend <john.fastabend@gmail.com>
---
 tools/testing/selftests/bpf/test_xdp_redirect.sh | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/tools/testing/selftests/bpf/test_xdp_redirect.sh b/tools/testing/selftests/bpf/test_xdp_redirect.sh
index d8c73ed6e040..c5a8b7173c12 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
-- 
2.7.4

             reply	other threads:[~2017-08-11  0:05 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-11  0:02 William Tu [this message]
2017-08-11 11:31 ` [PATCH] selftests: bpf: add check for ip XDP redirect Daniel Borkmann
2017-08-11 13:35   ` William Tu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1502409753-27516-1-git-send-email-u9012063@gmail.com \
    --to=u9012063@gmail.com \
    --cc=daniel@iogearbox.net \
    --cc=john.fastabend@gmail.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).