diff mbox series

[bpf-next,5/5] selftests/bpf: Install btf_dump test cases

Message ID 20210112135959.649075-6-jean-philippe@linaro.org (mailing list archive)
State Superseded
Delegated to: BPF
Headers show
Series selftests/bpf: Some build fixes | expand

Checks

Context Check Description
netdev/cover_letter success Link
netdev/fixes_present success Link
netdev/patch_count success Link
netdev/tree_selection success Clearly marked for bpf-next
netdev/subject_prefix success Link
netdev/cc_maintainers warning 1 maintainers not CCed: netdev@vger.kernel.org
netdev/source_inline success Was 0 now: 0
netdev/verify_signedoff success Link
netdev/module_param success Was 0 now: 0
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/verify_fixes success Link
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 15 lines checked
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/header_inline success Link
netdev/stable success Stable not CCed

Commit Message

Jean-Philippe Brucker Jan. 12, 2021, 2 p.m. UTC
The btf_dump test cannot access the original source files for comparison
when running the selftests out of tree, causing several failures:

awk: btf_dump_test_case_syntax.c: No such file or directory
...

Add those files to $(TEST_FILES) to have "make install" pick them up.

Signed-off-by: Jean-Philippe Brucker <jean-philippe@linaro.org>
---
 tools/testing/selftests/bpf/Makefile | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

Comments

Andrii Nakryiko Jan. 12, 2021, 8:55 p.m. UTC | #1
On Tue, Jan 12, 2021 at 6:01 AM Jean-Philippe Brucker
<jean-philippe@linaro.org> wrote:
>
> The btf_dump test cannot access the original source files for comparison
> when running the selftests out of tree, causing several failures:
>
> awk: btf_dump_test_case_syntax.c: No such file or directory
> ...
>
> Add those files to $(TEST_FILES) to have "make install" pick them up.
>
> Signed-off-by: Jean-Philippe Brucker <jean-philippe@linaro.org>
> ---
>  tools/testing/selftests/bpf/Makefile | 9 ++++++++-
>  1 file changed, 8 insertions(+), 1 deletion(-)
>
> diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests/bpf/Makefile
> index bffb4ad59a3d..fb8cddc410c0 100644
> --- a/tools/testing/selftests/bpf/Makefile
> +++ b/tools/testing/selftests/bpf/Makefile
> @@ -46,7 +46,14 @@ endif
>
>  TEST_GEN_FILES = test_lwt_ip_encap.o \
>         test_tc_edt.o
> -TEST_FILES = xsk_prereqs.sh
> +TEST_FILES = xsk_prereqs.sh \
> +       progs/btf_dump_test_case_syntax.c \
> +       progs/btf_dump_test_case_ordering.c \
> +       progs/btf_dump_test_case_padding.c \
> +       progs/btf_dump_test_case_packing.c \
> +       progs/btf_dump_test_case_bitfields.c \
> +       progs/btf_dump_test_case_multidim.c \
> +       progs/btf_dump_test_case_namespacing.c


maybe wildcard(progs/btf_dump_test_case_*) instead? one less thing to
remember to update, if we ever add another test case

>
>  # Order correspond to 'make run_tests' order
>  TEST_PROGS := test_kmod.sh \
> --
> 2.30.0
>
Jean-Philippe Brucker Jan. 13, 2021, 9:59 a.m. UTC | #2
On Tue, Jan 12, 2021 at 12:55:02PM -0800, Andrii Nakryiko wrote:
> > -TEST_FILES = xsk_prereqs.sh
> > +TEST_FILES = xsk_prereqs.sh \
> > +       progs/btf_dump_test_case_syntax.c \
> > +       progs/btf_dump_test_case_ordering.c \
> > +       progs/btf_dump_test_case_padding.c \
> > +       progs/btf_dump_test_case_packing.c \
> > +       progs/btf_dump_test_case_bitfields.c \
> > +       progs/btf_dump_test_case_multidim.c \
> > +       progs/btf_dump_test_case_namespacing.c
> 
> 
> maybe wildcard(progs/btf_dump_test_case_*) instead? one less thing to
> remember to update, if we ever add another test case

Sure, I'll send a v2

Thanks,
Jean
diff mbox series

Patch

diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests/bpf/Makefile
index bffb4ad59a3d..fb8cddc410c0 100644
--- a/tools/testing/selftests/bpf/Makefile
+++ b/tools/testing/selftests/bpf/Makefile
@@ -46,7 +46,14 @@  endif
 
 TEST_GEN_FILES = test_lwt_ip_encap.o \
 	test_tc_edt.o
-TEST_FILES = xsk_prereqs.sh
+TEST_FILES = xsk_prereqs.sh \
+	progs/btf_dump_test_case_syntax.c \
+	progs/btf_dump_test_case_ordering.c \
+	progs/btf_dump_test_case_padding.c \
+	progs/btf_dump_test_case_packing.c \
+	progs/btf_dump_test_case_bitfields.c \
+	progs/btf_dump_test_case_multidim.c \
+	progs/btf_dump_test_case_namespacing.c
 
 # Order correspond to 'make run_tests' order
 TEST_PROGS := test_kmod.sh \