diff mbox series

selftests: bpf: add missing object file to TEST_FILES

Message ID 20191111161728.8854-1-anders.roxell@linaro.org
State Accepted
Commit e47a179997ceee6864fbae620eee09ea9c345a4d
Headers show
Series selftests: bpf: add missing object file to TEST_FILES | expand

Commit Message

Anders Roxell Nov. 11, 2019, 4:17 p.m. UTC
When installing kselftests to its own directory and run the
test_lwt_ip_encap.sh it will complain that test_lwt_ip_encap.o can't be
found. Same with the test_tc_edt.sh test it will complain that
test_tc_edt.o can't be found.

$ ./test_lwt_ip_encap.sh
starting egress IPv4 encap test
Error opening object test_lwt_ip_encap.o: No such file or directory
Object hashing failed!
Cannot initialize ELF context!
Failed to parse eBPF program: Invalid argument

Rework to add test_lwt_ip_encap.o and test_tc_edt.o to TEST_FILES so the
object file gets installed when installing kselftest.

Fixes: 74b5a5968fe8 ("selftests/bpf: Replace test_progs and test_maps w/ general rule")
Signed-off-by: Anders Roxell <anders.roxell@linaro.org>

Acked-by: Song Liu <songliubraving@fb.com>

---
 tools/testing/selftests/bpf/Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

-- 
2.20.1

Comments

Daniel Borkmann Nov. 11, 2019, 9:36 p.m. UTC | #1
On 11/11/19 5:17 PM, Anders Roxell wrote:
> When installing kselftests to its own directory and run the

> test_lwt_ip_encap.sh it will complain that test_lwt_ip_encap.o can't be

> found. Same with the test_tc_edt.sh test it will complain that

> test_tc_edt.o can't be found.

> 

> $ ./test_lwt_ip_encap.sh

> starting egress IPv4 encap test

> Error opening object test_lwt_ip_encap.o: No such file or directory

> Object hashing failed!

> Cannot initialize ELF context!

> Failed to parse eBPF program: Invalid argument

> 

> Rework to add test_lwt_ip_encap.o and test_tc_edt.o to TEST_FILES so the

> object file gets installed when installing kselftest.

> 

> Fixes: 74b5a5968fe8 ("selftests/bpf: Replace test_progs and test_maps w/ general rule")

> Signed-off-by: Anders Roxell <anders.roxell@linaro.org>

> Acked-by: Song Liu <songliubraving@fb.com>


Applied, thanks!
diff mbox series

Patch

diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests/bpf/Makefile
index b334a6db15c1..b03dc2298fea 100644
--- a/tools/testing/selftests/bpf/Makefile
+++ b/tools/testing/selftests/bpf/Makefile
@@ -38,7 +38,8 @@  TEST_GEN_PROGS += test_progs-bpf_gcc
 endif
 
 TEST_GEN_FILES =
-TEST_FILES =
+TEST_FILES = test_lwt_ip_encap.o \
+	test_tc_edt.o
 
 # Order correspond to 'make run_tests' order
 TEST_PROGS := test_kmod.sh \