On Thu, Jun 27, 2019 at 2:15 AM Ilya Leoshkevich <iii@xxxxxxxxxxxxx> wrote: > > 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. > > This patch uses bash's pipefail option to fail the build when clang > fails, and also make's .DELETE_ON_ERROR target to get rid of partial > BPF bytecode files. > > Signed-off-by: Ilya Leoshkevich <iii@xxxxxxxxxxxxx> > --- > tools/testing/selftests/bpf/Makefile | 9 ++++++--- > 1 file changed, 6 insertions(+), 3 deletions(-) > > diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests/bpf/Makefile > index f2dbe2043067..2316fa2d5b3b 100644 > --- a/tools/testing/selftests/bpf/Makefile > +++ b/tools/testing/selftests/bpf/Makefile > @@ -1,5 +1,6 @@ > # SPDX-License-Identifier: GPL-2.0 > > +SHELL := /bin/bash I am not sure whether it is ok to require bash. I don't see such requirements in other Makefile's under tools/. Can we enable some fall back when bash is not present? Thanks, Song