]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit4a7b5c1a0884a73716db041ddefebf4e7bc28265
tree1606868e0319a8ae83095d9fa1632773a3e883d6
parent8a50f3da66040cc78791abcec1bf1fdc18d76f75
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