Skip to contentSkip to conversation

selftests: bpf: test_lwt_ip_encap: add missing object file to TEST_FILES

PATCH In review Anders Roxell 3 participants 5 messages Nov 10, 2019 – Nov 11, 2019

Subsystems (5)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 selftests: bpf: test_lwt_ip_encap: add missing object file to TEST_FILES

When installing kselftests to its own directory and running the test_lwt_ip_encap.sh it will complain that test_lwt_ip_encap.o can't be find.

$ ./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 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")
---
 tools/testing/selftests/bpf/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/testing/selftests/bpf/Makefile +1 -1
index b334a6db15c1..cc09b5df9403 100644
@@ -38,7 +38,7 @@ TEST_GEN_PROGS += test_progs-bpf_gcc
 endif
 
 TEST_GEN_FILES =
-TEST_FILES =
+TEST_FILES = test_lwt_ip_encap.o
 
 # Order correspond to 'make run_tests' order
 TEST_PROGS := test_kmod.sh \
Signature · 1 line
2.20.1
#1 lore raw

PATCH 2/2 selftests: bpf: test_tc_edt: add missing object file to TEST_FILES

When installing kselftests to its own directory and running the test_tc_edt.sh it will complain that test_tc_edt.o can't be find.

$ ./test_tc_edt.sh
Error opening object test_tc_edt.o: No such file or directory
Object hashing failed!
Cannot initialize ELF context!
Unable to load program

Rework to add 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")
---
 tools/testing/selftests/bpf/Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
tools/testing/selftests/bpf/Makefile +2 -1
index cc09b5df9403..b03dc2298fea 100644
@@ -38,7 +38,8 @@ TEST_GEN_PROGS += test_progs-bpf_gcc
 endif
 
 TEST_GEN_FILES =
-TEST_FILES = test_lwt_ip_encap.o
+TEST_FILES = test_lwt_ip_encap.o \
+	test_tc_edt.o
 
 # Order correspond to 'make run_tests' order
 TEST_PROGS := test_kmod.sh \
Signature · 1 line
2.20.1
#2 lore raw

Re: [PATCH bpf-next 2/2] selftests: bpf: test_tc_edt: add missing object file to TEST_FILES

Quoted 9 lines · Anders Roxell

When installing kselftests to its own directory and running the test_tc_edt.sh it will complain that test_tc_edt.o can't be find.

$ ./test_tc_edt.sh
Error opening object test_tc_edt.o: No such file or directory
Object hashing failed!
Cannot initialize ELF context!
Unable to load program
Quoted 6 lines

Rework to add 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")

It seems to me that the two patches that comprise this series should be combined as they seem to be fixing two halves of the same problem.

Quoted 21 lines
---
 tools/testing/selftests/bpf/Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
tools/testing/selftests/bpf/Makefile +2 -1
index cc09b5df9403..b03dc2298fea 100644
@@ -38,7 +38,8 @@ TEST_GEN_PROGS += test_progs-bpf_gcc
 endif
 
 TEST_GEN_FILES =
-TEST_FILES = test_lwt_ip_encap.o
+TEST_FILES = test_lwt_ip_encap.o \
+	test_tc_edt.o
 
 # Order correspond to 'make run_tests' order
 TEST_PROGS := test_kmod.sh \
Signature · 1 line
2.20.1
maintainer
#3 lore raw

Re: [PATCH bpf-next 2/2] selftests: bpf: test_tc_edt: add missing object file to TEST_FILES

Quoted 13 lines · Simon Horman
Quoted 12 lines · Anders Roxell

When installing kselftests to its own directory and running the test_tc_edt.sh it will complain that test_tc_edt.o can't be find.

$ ./test_tc_edt.sh
Error opening object test_tc_edt.o: No such file or directory
Object hashing failed!
Cannot initialize ELF context!
Unable to load program

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

Quoted 7 lines
Quoted 3 lines
Fixes 74b5a5968fe8 ("selftests/bpf: Replace test_progs and test_maps w/ general rule")

It seems to me that the two patches that comprise this series should be combined as they seem to be fixing two halves of the same problem.

Yep, agree, please respin as single patch.

Thanks,
Daniel

#4 lore raw

Re: [PATCH bpf-next 2/2] selftests: bpf: test_tc_edt: add missing object file to TEST_FILES

Quoted 19 lines · Daniel Borkmann
Quoted 17 lines · Simon Horman
Quoted 15 lines · Anders Roxell

When installing kselftests to its own directory and running the test_tc_edt.sh it will complain that test_tc_edt.o can't be find.

$ ./test_tc_edt.sh
Error opening object test_tc_edt.o: No such file or directory
Object hashing failed!
Cannot initialize ELF context!
Unable to load program

Rework to add 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")
Quoted 5 lines
Quoted 3 lines

It seems to me that the two patches that comprise this series should be combined as they seem to be fixing two halves of the same problem.

Yep, agree, please respin as single patch.

OK I'll respin it to a single patch.

Cheers,
Anders