selftests/bpf: Move get_time_ns to testing_helpers.h
authorJiri Olsa <jolsa@kernel.org>
Wed, 9 Aug 2023 08:34:30 +0000 (10:34 +0200)
committerAlexei Starovoitov <ast@kernel.org>
Mon, 21 Aug 2023 22:51:26 +0000 (15:51 -0700)
commit3830d04a7401f277185e4439eb259c1b13e76788
treeb642ea45f6a8743dbae7b8c75f80b69ef8f9f8f8
parent5902da6d8a523ed468ea1f28e001c7d5f30c042d
selftests/bpf: Move get_time_ns to testing_helpers.h

We'd like to have single copy of get_time_ns used b bench and test_progs,
but we can't just include bench.h, because of conflicting 'struct env'
objects.

Moving get_time_ns to testing_helpers.h which is being included by both
bench and test_progs objects.

Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Link: https://lore.kernel.org/r/20230809083440.3209381-19-jolsa@kernel.org
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/testing/selftests/bpf/bench.h
tools/testing/selftests/bpf/prog_tests/kprobe_multi_test.c
tools/testing/selftests/bpf/testing_helpers.h