Netdev List
 help / color / mirror / Atom feed
From: Jakub Kicinski <jakub.kicinski@netronome.com>
To: alexei.starovoitov@gmail.com, daniel@iogearbox.net
Cc: oss-drivers@netronome.com, netdev@vger.kernel.org,
	Jakub Kicinski <jakub.kicinski@netronome.com>
Subject: [PATCH bpf-next v2 02/12] selftests/bpf: add Error: prefix in check_extack helper
Date: Mon,  9 Jul 2018 10:59:34 -0700	[thread overview]
Message-ID: <20180709175944.32265-3-jakub.kicinski@netronome.com> (raw)
In-Reply-To: <20180709175944.32265-1-jakub.kicinski@netronome.com>

Currently the test only checks errors, not warnings, so save typing
and prefix the extack messages with "Error:" inside the check helper.

Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: Quentin Monnet <quentin.monnet@netronome.com>
---
 tools/testing/selftests/bpf/test_offload.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/tools/testing/selftests/bpf/test_offload.py b/tools/testing/selftests/bpf/test_offload.py
index a257e4b08392..f8d9bd81d9a4 100755
--- a/tools/testing/selftests/bpf/test_offload.py
+++ b/tools/testing/selftests/bpf/test_offload.py
@@ -547,11 +547,11 @@ netns = [] # net namespaces to be removed
     if skip_extack:
         return
     lines = output.split("\n")
-    comp = len(lines) >= 2 and lines[1] == reference
+    comp = len(lines) >= 2 and lines[1] == 'Error: ' + reference
     fail(not comp, "Missing or incorrect netlink extack message")
 
 def check_extack_nsim(output, reference, args):
-    check_extack(output, "Error: netdevsim: " + reference, args)
+    check_extack(output, "netdevsim: " + reference, args)
 
 def check_no_extack(res, needle):
     fail((res[1] + res[2]).count(needle) or (res[1] + res[2]).count("Warning:"),
@@ -654,7 +654,7 @@ netns = []
     ret, _, err = sim.cls_bpf_add_filter(obj, skip_sw=True,
                                          fail=False, include_stderr=True)
     fail(ret == 0, "TC filter loaded without enabling TC offloads")
-    check_extack(err, "Error: TC offload is disabled on net device.", args)
+    check_extack(err, "TC offload is disabled on net device.", args)
     sim.wait_for_flush()
 
     sim.set_ethtool_tc_offloads(True)
@@ -694,7 +694,7 @@ netns = []
                                          skip_sw=True,
                                          fail=False, include_stderr=True)
     fail(ret == 0, "Offloaded a filter to chain other than 0")
-    check_extack(err, "Error: Driver supports only offload of chain 0.", args)
+    check_extack(err, "Driver supports only offload of chain 0.", args)
     sim.tc_flush_filters()
 
     start_test("Test TC replace...")
-- 
2.17.1

  parent reply	other threads:[~2018-07-09 17:59 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-09 17:59 [PATCH bpf-next v2 00/12] tools: bpf: extend bpftool prog load Jakub Kicinski
2018-07-09 17:59 ` [PATCH bpf-next v2 01/12] selftests/bpf: remove duplicated word from test offloads Jakub Kicinski
2018-07-09 17:59 ` Jakub Kicinski [this message]
2018-07-09 17:59 ` [PATCH bpf-next v2 03/12] tools: bpftool: refactor argument parsing for prog load Jakub Kicinski
2018-07-09 17:59 ` [PATCH bpf-next v2 04/12] tools: bpftool: add support for loading programs for offload Jakub Kicinski
2018-07-09 17:59 ` [PATCH bpf-next v2 05/12] tools: libbpf: expose the prog type guessing from section name logic Jakub Kicinski
2018-07-10  5:10   ` Andrey Ignatov
2018-07-09 17:59 ` [PATCH bpf-next v2 06/12] tools: bpftool: allow users to specify program type for prog load Jakub Kicinski
2018-07-09 17:59 ` [PATCH bpf-next v2 07/12] tools: libbpf: recognize offload neutral maps Jakub Kicinski
2018-07-09 17:59 ` [PATCH bpf-next v2 08/12] tools: libbpf: add extended attributes version of bpf_object__open() Jakub Kicinski
2018-07-10  5:39   ` Andrey Ignatov
2018-07-09 17:59 ` [PATCH bpf-next v2 09/12] tools: bpftool: reimplement bpf_prog_load() for prog load Jakub Kicinski
2018-07-09 19:40   ` Alexei Starovoitov
2018-07-09 17:59 ` [PATCH bpf-next v2 10/12] tools: bpf: make use of reallocarray Jakub Kicinski
2018-07-09 17:59 ` [PATCH bpf-next v2 11/12] tools: libbpf: allow map reuse Jakub Kicinski
2018-07-09 20:22   ` Andrey Ignatov
2018-07-10  2:49     ` Jakub Kicinski
2018-07-10  4:23       ` Andrey Ignatov
2018-07-10 18:09         ` Jakub Kicinski
2018-07-10 18:16           ` Daniel Borkmann
2018-07-10 20:58             ` Jakub Kicinski
2018-07-09 17:59 ` [PATCH bpf-next v2 12/12] tools: bpftool: allow reuse of maps with bpftool prog load Jakub Kicinski
2018-07-09 19:48   ` Alexei Starovoitov
2018-07-10  1:38     ` Jakub Kicinski

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=20180709175944.32265-3-jakub.kicinski@netronome.com \
    --to=jakub.kicinski@netronome.com \
    --cc=alexei.starovoitov@gmail.com \
    --cc=daniel@iogearbox.net \
    --cc=netdev@vger.kernel.org \
    --cc=oss-drivers@netronome.com \
    /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