On Wed, Oct 27, 2021 at 11:35 PM Kumar Kartikeya Dwivedi <memxor@xxxxxxxxx> wrote: > > Also, avoid using CO-RE features, as lskel doesn't support CO-RE, yet. > Include both light and libbpf skeleton in same file to test both of them > together. > > In c48e51c8b07a ("bpf: selftests: Add selftests for module kfunc support"), > I added support for generating both lskel and libbpf skel for a BPF > object, however the name parameter for bpftool caused collisions when > included in same file together. This meant that every test needed a > separate file for a libbpf/light skeleton separation instead of > subtests. > > Change that by appending a "_lskel" suffix to the name for files using > light skeleton, and convert all existing users. > > Signed-off-by: Kumar Kartikeya Dwivedi <memxor@xxxxxxxxx> > --- I like the simplicity, thanks. Acked-by: Andrii Nakryiko <andrii@xxxxxxxxxx> > tools/testing/selftests/bpf/Makefile | 4 +- > .../selftests/bpf/prog_tests/atomics.c | 34 ++++++++-------- > .../selftests/bpf/prog_tests/fentry_fexit.c | 16 ++++---- > .../selftests/bpf/prog_tests/fentry_test.c | 14 +++---- > .../selftests/bpf/prog_tests/fexit_sleep.c | 12 +++--- > .../selftests/bpf/prog_tests/fexit_test.c | 14 +++---- > .../selftests/bpf/prog_tests/kfunc_call.c | 6 +-- > .../selftests/bpf/prog_tests/ksyms_btf.c | 35 +++++++++++++++- > .../selftests/bpf/prog_tests/ksyms_module.c | 40 +++++++++++++++++-- > .../bpf/prog_tests/ksyms_module_libbpf.c | 28 ------------- > .../selftests/bpf/prog_tests/ringbuf.c | 12 +++--- > .../selftests/bpf/prog_tests/trace_printk.c | 14 +++---- > .../selftests/bpf/prog_tests/trace_vprintk.c | 12 +++--- > .../selftests/bpf/prog_tests/verif_stats.c | 6 +-- > .../selftests/bpf/progs/test_ksyms_weak.c | 2 +- > 15 files changed, 142 insertions(+), 107 deletions(-) > delete mode 100644 tools/testing/selftests/bpf/prog_tests/ksyms_module_libbpf.c > [...]