netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net 0/2] unbreak 'basic' and 'bpf' tdc testcases
@ 2020-02-03 15:29 Davide Caratti
  2020-02-03 15:29 ` [PATCH net 1/2] tc-testing: fix eBPF tests failure on linux fresh clones Davide Caratti
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Davide Caratti @ 2020-02-03 15:29 UTC (permalink / raw)
  To: Roman Mashak, Hangbin Liu; +Cc: Jamal Hadi Salim, David S . Miller, netdev

- patch 1/2 fixes tdc failures with 'bpf' action on fresch clones of the
  kernel tree
- patch 2/2 allow running tdc for the 'basic' classifier without tweaking
  tdc_config.py

Davide Caratti (2):
  tc-testing: fix eBPF tests failure on linux fresh clones
  tc-testing: add missing 'nsPlugin' to basic.json

 .../tc-testing/plugin-lib/buildebpfPlugin.py  |  2 +-
 .../tc-testing/tc-tests/filters/basic.json    | 51 +++++++++++++++++++
 2 files changed, 52 insertions(+), 1 deletion(-)

-- 
2.24.1


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

* [PATCH net 1/2] tc-testing: fix eBPF tests failure on linux fresh clones
  2020-02-03 15:29 [PATCH net 0/2] unbreak 'basic' and 'bpf' tdc testcases Davide Caratti
@ 2020-02-03 15:29 ` Davide Caratti
  2020-02-03 15:29 ` [PATCH net 2/2] tc-testing: add missing 'nsPlugin' to basic.json Davide Caratti
  2020-02-04  8:30 ` [PATCH net 0/2] unbreak 'basic' and 'bpf' tdc testcases David Miller
  2 siblings, 0 replies; 4+ messages in thread
From: Davide Caratti @ 2020-02-03 15:29 UTC (permalink / raw)
  To: Roman Mashak, Hangbin Liu; +Cc: Jamal Hadi Salim, David S . Miller, netdev

when the following command is done on a fresh clone of the kernel tree,

 [root@f31 tc-testing]# ./tdc.py -c bpf

test cases that need to build the eBPF sample program fail systematically,
because 'buildebpfPlugin' is unable to install the kernel headers (i.e, the
'khdr' target fails). Pass the correct environment to 'make', in place of
ENVIR, to allow running these tests.

Fixes: 4c2d39bd40c1 ("tc-testing: use a plugin to build eBPF program")
Signed-off-by: Davide Caratti <dcaratti@redhat.com>
---
 .../testing/selftests/tc-testing/plugin-lib/buildebpfPlugin.py  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/testing/selftests/tc-testing/plugin-lib/buildebpfPlugin.py b/tools/testing/selftests/tc-testing/plugin-lib/buildebpfPlugin.py
index e98c36750fae..d34fe06268d2 100644
--- a/tools/testing/selftests/tc-testing/plugin-lib/buildebpfPlugin.py
+++ b/tools/testing/selftests/tc-testing/plugin-lib/buildebpfPlugin.py
@@ -54,7 +54,7 @@ class SubPlugin(TdcPlugin):
             shell=True,
             stdout=subprocess.PIPE,
             stderr=subprocess.PIPE,
-            env=ENVIR)
+            env=os.environ.copy())
         (rawout, serr) = proc.communicate()
 
         if proc.returncode != 0 and len(serr) > 0:
-- 
2.24.1


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

* [PATCH net 2/2] tc-testing: add missing 'nsPlugin' to basic.json
  2020-02-03 15:29 [PATCH net 0/2] unbreak 'basic' and 'bpf' tdc testcases Davide Caratti
  2020-02-03 15:29 ` [PATCH net 1/2] tc-testing: fix eBPF tests failure on linux fresh clones Davide Caratti
@ 2020-02-03 15:29 ` Davide Caratti
  2020-02-04  8:30 ` [PATCH net 0/2] unbreak 'basic' and 'bpf' tdc testcases David Miller
  2 siblings, 0 replies; 4+ messages in thread
From: Davide Caratti @ 2020-02-03 15:29 UTC (permalink / raw)
  To: Roman Mashak, Hangbin Liu; +Cc: Jamal Hadi Salim, David S . Miller, netdev

since tdc tests for cls_basic need $DEV1, use 'nsPlugin' so that the
following command can be run without errors:

 [root@f31 tc-testing]# ./tdc.py -c basic

Fixes: 4717b05328ba ("tc-testing: Introduced tdc tests for basic filter")
Signed-off-by: Davide Caratti <dcaratti@redhat.com>
---
 .../tc-testing/tc-tests/filters/basic.json    | 51 +++++++++++++++++++
 1 file changed, 51 insertions(+)

diff --git a/tools/testing/selftests/tc-testing/tc-tests/filters/basic.json b/tools/testing/selftests/tc-testing/tc-tests/filters/basic.json
index 2e361cea63bc..98a20faf3198 100644
--- a/tools/testing/selftests/tc-testing/tc-tests/filters/basic.json
+++ b/tools/testing/selftests/tc-testing/tc-tests/filters/basic.json
@@ -6,6 +6,9 @@
             "filter",
             "basic"
         ],
+        "plugins": {
+            "requires": "nsPlugin"
+        },
         "setup": [
             "$TC qdisc add dev $DEV1 ingress"
         ],
@@ -25,6 +28,9 @@
             "filter",
             "basic"
         ],
+        "plugins": {
+            "requires": "nsPlugin"
+        },
         "setup": [
             "$TC qdisc add dev $DEV1 ingress"
         ],
@@ -44,6 +50,9 @@
             "filter",
             "basic"
         ],
+        "plugins": {
+            "requires": "nsPlugin"
+        },
         "setup": [
             "$TC qdisc add dev $DEV1 ingress"
         ],
@@ -63,6 +72,9 @@
             "filter",
             "basic"
         ],
+        "plugins": {
+            "requires": "nsPlugin"
+        },
         "setup": [
             "$TC qdisc add dev $DEV1 ingress"
         ],
@@ -82,6 +94,9 @@
             "filter",
             "basic"
         ],
+        "plugins": {
+            "requires": "nsPlugin"
+        },
         "setup": [
             "$TC qdisc add dev $DEV1 ingress"
         ],
@@ -101,6 +116,9 @@
             "filter",
             "basic"
         ],
+        "plugins": {
+            "requires": "nsPlugin"
+        },
         "setup": [
             "$TC qdisc add dev $DEV1 ingress"
         ],
@@ -120,6 +138,9 @@
             "filter",
             "basic"
         ],
+        "plugins": {
+            "requires": "nsPlugin"
+        },
         "setup": [
             "$TC qdisc add dev $DEV1 ingress"
         ],
@@ -139,6 +160,9 @@
             "filter",
             "basic"
         ],
+        "plugins": {
+            "requires": "nsPlugin"
+        },
         "setup": [
             "$TC qdisc add dev $DEV1 ingress"
         ],
@@ -158,6 +182,9 @@
             "filter",
             "basic"
         ],
+        "plugins": {
+            "requires": "nsPlugin"
+        },
         "setup": [
             "$TC qdisc add dev $DEV1 ingress"
         ],
@@ -177,6 +204,9 @@
             "filter",
             "basic"
         ],
+        "plugins": {
+            "requires": "nsPlugin"
+        },
         "setup": [
             "$TC qdisc add dev $DEV1 ingress"
         ],
@@ -196,6 +226,9 @@
             "filter",
             "basic"
         ],
+        "plugins": {
+            "requires": "nsPlugin"
+        },
         "setup": [
             "$TC qdisc add dev $DEV1 ingress"
         ],
@@ -215,6 +248,9 @@
             "filter",
             "basic"
         ],
+        "plugins": {
+            "requires": "nsPlugin"
+        },
         "setup": [
             "$TC qdisc add dev $DEV1 ingress"
         ],
@@ -234,6 +270,9 @@
             "filter",
             "basic"
         ],
+        "plugins": {
+            "requires": "nsPlugin"
+        },
         "setup": [
             "$TC qdisc add dev $DEV1 ingress"
         ],
@@ -253,6 +292,9 @@
             "filter",
             "basic"
         ],
+        "plugins": {
+            "requires": "nsPlugin"
+        },
         "setup": [
             "$TC qdisc add dev $DEV1 ingress"
         ],
@@ -272,6 +314,9 @@
             "filter",
             "basic"
         ],
+        "plugins": {
+            "requires": "nsPlugin"
+        },
         "setup": [
             "$TC qdisc add dev $DEV1 ingress"
         ],
@@ -291,6 +336,9 @@
             "filter",
             "basic"
         ],
+        "plugins": {
+            "requires": "nsPlugin"
+        },
         "setup": [
             "$TC qdisc add dev $DEV1 ingress"
         ],
@@ -310,6 +358,9 @@
             "filter",
             "basic"
         ],
+        "plugins": {
+            "requires": "nsPlugin"
+        },
         "setup": [
             "$TC qdisc add dev $DEV1 ingress"
         ],
-- 
2.24.1


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

* Re: [PATCH net 0/2] unbreak 'basic' and 'bpf' tdc testcases
  2020-02-03 15:29 [PATCH net 0/2] unbreak 'basic' and 'bpf' tdc testcases Davide Caratti
  2020-02-03 15:29 ` [PATCH net 1/2] tc-testing: fix eBPF tests failure on linux fresh clones Davide Caratti
  2020-02-03 15:29 ` [PATCH net 2/2] tc-testing: add missing 'nsPlugin' to basic.json Davide Caratti
@ 2020-02-04  8:30 ` David Miller
  2 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2020-02-04  8:30 UTC (permalink / raw)
  To: dcaratti; +Cc: mrv, liuhangbin, jhs, netdev

From: Davide Caratti <dcaratti@redhat.com>
Date: Mon,  3 Feb 2020 16:29:28 +0100

> - patch 1/2 fixes tdc failures with 'bpf' action on fresch clones of the
>   kernel tree
> - patch 2/2 allow running tdc for the 'basic' classifier without tweaking
>   tdc_config.py

Series applied, thanks Davide.

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

end of thread, other threads:[~2020-02-04  8:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-03 15:29 [PATCH net 0/2] unbreak 'basic' and 'bpf' tdc testcases Davide Caratti
2020-02-03 15:29 ` [PATCH net 1/2] tc-testing: fix eBPF tests failure on linux fresh clones Davide Caratti
2020-02-03 15:29 ` [PATCH net 2/2] tc-testing: add missing 'nsPlugin' to basic.json Davide Caratti
2020-02-04  8:30 ` [PATCH net 0/2] unbreak 'basic' and 'bpf' tdc testcases 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).