]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
tc-testing: fix eBPF tests failure on linux fresh clones
authorDavide Caratti <dcaratti@redhat.com>
Mon, 3 Feb 2020 15:29:29 +0000 (16:29 +0100)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Mon, 16 Mar 2020 11:27:25 +0000 (12:27 +0100)
BugLink: https://bugs.launchpad.net/bugs/1867051
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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
tools/testing/selftests/tc-testing/plugin-lib/buildebpfPlugin.py

index e98c36750faedcb5084fa15c9bcb55afda270112..d34fe06268d2f49e60bf3bd1406c0ca4a9ee6e0e 100644 (file)
@@ -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: