selftests/bpf: do not ignore clang failures
authorIlya Leoshkevich <iii@linux.ibm.com>
Thu, 11 Jul 2019 09:12:49 +0000 (11:12 +0200)
committerDaniel Borkmann <daniel@iogearbox.net>
Fri, 12 Jul 2019 13:18:33 +0000 (15:18 +0200)
commit9cae4ace80ef39005da106fbb89c952b27d7b89e
tree1606868e0319a8ae83095d9fa1632773a3e883d6
parent216b65fb706e34128a5317d71b300daac9c428c4
selftests/bpf: do not ignore clang failures

When compiling an eBPF prog fails, make still returns 0, because
failing clang command's output is piped to llc and therefore its
exit status is ignored.

When clang fails, pipe the string "clang failed" to llc. This will make
llc fail with an informative error message. This solution was chosen
over using pipefail, having separate targets or getting rid of llc
invocation due to its simplicity.

In addition, pull Kbuild.include in order to get .DELETE_ON_ERROR target,
which would cause partial .o files to be removed.

Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Acked-by: Andrii Nakryiko <andriin@fb.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
tools/testing/selftests/bpf/Makefile