OSDN Git Service

selftests/bpf: fix test_btf_dump with O=
authorIlya Leoshkevich <iii@linux.ibm.com>
Mon, 19 Aug 2019 12:38:47 +0000 (14:38 +0200)
committerDaniel Borkmann <daniel@iogearbox.net>
Wed, 21 Aug 2019 15:00:59 +0000 (17:00 +0200)
commite91dcb536ae263ecff07118e36bf820c229a6ecd
tree9e396c3c951cf8ef49f26bfefe4af2f67ee7ed91
parent806ce6e2117a42528e7bb979e04e28229b34a612
selftests/bpf: fix test_btf_dump with O=

test_btf_dump fails when run with O=, because it needs to access source
files and assumes they live in ./progs/, which is not the case in this
scenario.

Fix by instructing kselftest to copy btf_dump_test_case_*.c files to the
test directory. Since kselftest does not preserve directory structure,
adjust the test to look in ./progs/ and then in ./.

Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
tools/testing/selftests/bpf/Makefile
tools/testing/selftests/bpf/test_btf_dump.c