On Mon, Sep 14, 2020 at 11:37 AM Stanislav Fomichev <sdf@xxxxxxxxxx> wrote: > > From: YiFei Zhu <zhuyifei@xxxxxxxxxx> > > This is a simple test to check that loading and dumping metadata > in btftool works, whether or not metadata contents are used by the > program. > > A C test is also added to make sure the skeleton code can read the > metadata values. > > Cc: YiFei Zhu <zhuyifei1999@xxxxxxxxx> > Signed-off-by: YiFei Zhu <zhuyifei@xxxxxxxxxx> > Signed-off-by: Stanislav Fomichev <sdf@xxxxxxxxxx> > --- Acked-by: Andrii Nakryiko <andriin@xxxxxx> > tools/testing/selftests/bpf/Makefile | 3 +- > .../selftests/bpf/prog_tests/metadata.c | 141 ++++++++++++++++++ > .../selftests/bpf/progs/metadata_unused.c | 15 ++ > .../selftests/bpf/progs/metadata_used.c | 15 ++ > .../selftests/bpf/test_bpftool_metadata.sh | 82 ++++++++++ > 5 files changed, 255 insertions(+), 1 deletion(-) > create mode 100644 tools/testing/selftests/bpf/prog_tests/metadata.c > create mode 100644 tools/testing/selftests/bpf/progs/metadata_unused.c > create mode 100644 tools/testing/selftests/bpf/progs/metadata_used.c > create mode 100755 tools/testing/selftests/bpf/test_bpftool_metadata.sh > [...]