selftests/bpf: Move test_progs helpers to testing_helpers object
authorJiri Olsa <jolsa@kernel.org>
Mon, 15 May 2023 13:37:49 +0000 (15:37 +0200)
committerAlexei Starovoitov <ast@kernel.org>
Wed, 17 May 2023 05:09:23 +0000 (22:09 -0700)
commit45db310984bfea977177fb5fc0ea23ab430129bd
tree4674993d74f50c529c8ca3bf0693575758b1eb0e
parent8e9af82171247e2a8d2c08a3dea709d03884a815
selftests/bpf: Move test_progs helpers to testing_helpers object

Moving test_progs helpers to testing_helpers object so they can be
used from test_verifier in following changes.

Also adding missing ifndef header guard to testing_helpers.h header.

Using stderr instead of env.stderr because un/load_bpf_testmod helpers
will be used outside test_progs. Also at the point of calling them
in test_progs the std files are not hijacked yet and stderr is the
same as env.stderr.

Acked-by: David Vernet <void@manifault.com>
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Link: https://lore.kernel.org/r/20230515133756.1658301-4-jolsa@kernel.org
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/testing/selftests/bpf/test_progs.c
tools/testing/selftests/bpf/test_progs.h
tools/testing/selftests/bpf/testing_helpers.c
tools/testing/selftests/bpf/testing_helpers.h