netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net] tc-testing: fix tdc tests for 'bpf' action
@ 2018-05-09 16:45 Davide Caratti
  2018-05-09 21:51 ` Lucas Bates
  2018-05-10 21:28 ` David Miller
  0 siblings, 2 replies; 3+ messages in thread
From: Davide Caratti @ 2018-05-09 16:45 UTC (permalink / raw)
  To: Roman Mashak, Lucas Bates, David Miller; +Cc: netdev

- correct a typo in the value of 'matchPattern' of test 282d, potentially
 causing false negative
- allow errors when 'teardown' executes '$TC action flush action bpf' in
 test 282d, to fix false positive when it is run with act_bpf unloaded
- correct the value of 'matchPattern' in test e939, causing false positive
 in case the BPF JIT is enabled

Fixes: 440ea4ae1828 ("tc-testing: add selftests for 'bpf' action")
Signed-off-by: Davide Caratti <dcaratti@redhat.com>
---
 tools/testing/selftests/tc-testing/tc-tests/actions/bpf.json | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/tools/testing/selftests/tc-testing/tc-tests/actions/bpf.json b/tools/testing/selftests/tc-testing/tc-tests/actions/bpf.json
index 5b012f4981d4..6f289a49e5ec 100644
--- a/tools/testing/selftests/tc-testing/tc-tests/actions/bpf.json
+++ b/tools/testing/selftests/tc-testing/tc-tests/actions/bpf.json
@@ -66,7 +66,7 @@
         "cmdUnderTest": "$TC action add action bpf object-file _b.o index 667",
         "expExitCode": "0",
         "verifyCmd": "$TC action get action bpf index 667",
-        "matchPattern": "action order [0-9]*: bpf _b.o:\\[action\\] id [0-9]* tag 3b185187f1855c4c default-action pipe.*index 667 ref",
+        "matchPattern": "action order [0-9]*: bpf _b.o:\\[action\\] id [0-9]* tag 3b185187f1855c4c( jited)? default-action pipe.*index 667 ref",
         "matchCount": "1",
         "teardown": [
             "$TC action flush action bpf",
@@ -92,10 +92,15 @@
         "cmdUnderTest": "$TC action add action bpf object-file _c.o index 667",
         "expExitCode": "255",
         "verifyCmd": "$TC action get action bpf index 667",
-        "matchPattern": "action order [0-9]*: bpf _b.o:\\[action\\] id [0-9].*index 667 ref",
+        "matchPattern": "action order [0-9]*: bpf _c.o:\\[action\\] id [0-9].*index 667 ref",
         "matchCount": "0",
         "teardown": [
-            "$TC action flush action bpf",
+            [
+                "$TC action flush action bpf",
+                0,
+                1,
+                255
+            ],
             "rm -f _c.o"
         ]
     },
-- 
2.14.3

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH net] tc-testing: fix tdc tests for 'bpf' action
  2018-05-09 16:45 [PATCH net] tc-testing: fix tdc tests for 'bpf' action Davide Caratti
@ 2018-05-09 21:51 ` Lucas Bates
  2018-05-10 21:28 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: Lucas Bates @ 2018-05-09 21:51 UTC (permalink / raw)
  To: Davide Caratti
  Cc: Roman Mashak, David Miller, Linux Kernel Network Developers

On Wed, May 9, 2018 at 12:45 PM, Davide Caratti <dcaratti@redhat.com> wrote:
> - correct a typo in the value of 'matchPattern' of test 282d, potentially
>  causing false negative
> - allow errors when 'teardown' executes '$TC action flush action bpf' in
>  test 282d, to fix false positive when it is run with act_bpf unloaded
> - correct the value of 'matchPattern' in test e939, causing false positive
>  in case the BPF JIT is enabled
>
> Fixes: 440ea4ae1828 ("tc-testing: add selftests for 'bpf' action")
> Signed-off-by: Davide Caratti <dcaratti@redhat.com>
> ---
>  tools/testing/selftests/tc-testing/tc-tests/actions/bpf.json | 11 ++++++++---
>  1 file changed, 8 insertions(+), 3 deletions(-)
>
> diff --git a/tools/testing/selftests/tc-testing/tc-tests/actions/bpf.json b/tools/testing/selftests/tc-testing/tc-tests/actions/bpf.json
> index 5b012f4981d4..6f289a49e5ec 100644
> --- a/tools/testing/selftests/tc-testing/tc-tests/actions/bpf.json
> +++ b/tools/testing/selftests/tc-testing/tc-tests/actions/bpf.json
> @@ -66,7 +66,7 @@
>          "cmdUnderTest": "$TC action add action bpf object-file _b.o index 667",
>          "expExitCode": "0",
>          "verifyCmd": "$TC action get action bpf index 667",
> -        "matchPattern": "action order [0-9]*: bpf _b.o:\\[action\\] id [0-9]* tag 3b185187f1855c4c default-action pipe.*index 667 ref",
> +        "matchPattern": "action order [0-9]*: bpf _b.o:\\[action\\] id [0-9]* tag 3b185187f1855c4c( jited)? default-action pipe.*index 667 ref",
>          "matchCount": "1",
>          "teardown": [
>              "$TC action flush action bpf",
> @@ -92,10 +92,15 @@
>          "cmdUnderTest": "$TC action add action bpf object-file _c.o index 667",
>          "expExitCode": "255",
>          "verifyCmd": "$TC action get action bpf index 667",
> -        "matchPattern": "action order [0-9]*: bpf _b.o:\\[action\\] id [0-9].*index 667 ref",
> +        "matchPattern": "action order [0-9]*: bpf _c.o:\\[action\\] id [0-9].*index 667 ref",
>          "matchCount": "0",
>          "teardown": [
> -            "$TC action flush action bpf",
> +            [
> +                "$TC action flush action bpf",
> +                0,
> +                1,
> +                255
> +            ],
>              "rm -f _c.o"
>          ]
>      },
> --
> 2.14.3
>

Acked-by: Lucas Bates <lucasb@mojatatu.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH net] tc-testing: fix tdc tests for 'bpf' action
  2018-05-09 16:45 [PATCH net] tc-testing: fix tdc tests for 'bpf' action Davide Caratti
  2018-05-09 21:51 ` Lucas Bates
@ 2018-05-10 21:28 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2018-05-10 21:28 UTC (permalink / raw)
  To: dcaratti; +Cc: mrv, lucasb, netdev

From: Davide Caratti <dcaratti@redhat.com>
Date: Wed,  9 May 2018 18:45:42 +0200

> - correct a typo in the value of 'matchPattern' of test 282d, potentially
>  causing false negative
> - allow errors when 'teardown' executes '$TC action flush action bpf' in
>  test 282d, to fix false positive when it is run with act_bpf unloaded
> - correct the value of 'matchPattern' in test e939, causing false positive
>  in case the BPF JIT is enabled
> 
> Fixes: 440ea4ae1828 ("tc-testing: add selftests for 'bpf' action")
> Signed-off-by: Davide Caratti <dcaratti@redhat.com>

Applied.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-05-10 21:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-05-09 16:45 [PATCH net] tc-testing: fix tdc tests for 'bpf' action Davide Caratti
2018-05-09 21:51 ` Lucas Bates
2018-05-10 21:28 ` David Miller

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).