| From 6dbe3b29d20f7429d66c913d496a1e77f50265e5 Mon Sep 17 00:00:00 2001 |
| From: Davide Caratti <dcaratti@redhat.com> |
| Date: Mon, 3 Feb 2020 16:29:29 +0100 |
| Subject: [PATCH] tc-testing: fix eBPF tests failure on linux fresh clones |
| |
| commit 7145fcfffef1fad4266aaf5ca96727696916edb7 upstream. |
| |
| 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> |
| Signed-off-by: David S. Miller <davem@davemloft.net> |
| Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> |
| |
| diff --git a/tools/testing/selftests/tc-testing/plugin-lib/buildebpfPlugin.py b/tools/testing/selftests/tc-testing/plugin-lib/buildebpfPlugin.py |
| index 9f0ba10c44b4..6c03a6bbcc2f 100644 |
| --- a/tools/testing/selftests/tc-testing/plugin-lib/buildebpfPlugin.py |
| +++ b/tools/testing/selftests/tc-testing/plugin-lib/buildebpfPlugin.py |
| @@ -53,7 +53,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.7.4 |
| |