selftests: bpf: test_kmod.sh: Fix running out of srctree
authorIlya Leoshkevich <iii@linux.ibm.com>
Fri, 17 Jul 2020 16:53:22 +0000 (18:53 +0200)
committerAlexei Starovoitov <ast@kernel.org>
Tue, 21 Jul 2020 20:26:24 +0000 (13:26 -0700)
commit2ea485980734500d41e4530f038d94a21e2b3b34
tree3051386c5188058fb0ee510225864c8b62daee54
parentc576b9c77bea9a8ad11ddc277af3edbf15733ddd
selftests: bpf: test_kmod.sh: Fix running out of srctree

When running out of srctree, relative path to lib/test_bpf.ko is
different than when running in srctree. Check $building_out_of_srctree
environment variable and use a different relative path if needed.

Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20200717165326.6786-2-iii@linux.ibm.com
tools/testing/selftests/bpf/test_kmod.sh