Message ID | 20220317071805.43121-1-liuhangbin@gmail.com (mailing list archive) |
---|---|
State | Changes Requested |
Delegated to: | BPF |
Headers | show |
Series | [bpf] selftests/bpf: exit with error code if test failed | expand |
On 3/17/22 8:18 AM, Hangbin Liu wrote: > The test_lirc_mode2.sh test exit with 0 even test failed. Fix it by > exiting with an error code. > > Fixes: 6bdd533cee9a ("bpf: add selftest for lirc_mode2 type program") > Signed-off-by: Hangbin Liu <liuhangbin@gmail.com> > --- > tools/testing/selftests/bpf/test_lirc_mode2.sh | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/tools/testing/selftests/bpf/test_lirc_mode2.sh b/tools/testing/selftests/bpf/test_lirc_mode2.sh > index ec4e15948e40..420dc86362f5 100755 > --- a/tools/testing/selftests/bpf/test_lirc_mode2.sh > +++ b/tools/testing/selftests/bpf/test_lirc_mode2.sh > @@ -36,3 +36,5 @@ then > echo -e ${GREEN}"PASS: $TYPE"${NC} > fi > fi > + > +exit $ret nit: Shouldn't this also exit with error if no test_lirc_mode2_user was run?
diff --git a/tools/testing/selftests/bpf/test_lirc_mode2.sh b/tools/testing/selftests/bpf/test_lirc_mode2.sh index ec4e15948e40..420dc86362f5 100755 --- a/tools/testing/selftests/bpf/test_lirc_mode2.sh +++ b/tools/testing/selftests/bpf/test_lirc_mode2.sh @@ -36,3 +36,5 @@ then echo -e ${GREEN}"PASS: $TYPE"${NC} fi fi + +exit $ret
The test_lirc_mode2.sh test exit with 0 even test failed. Fix it by exiting with an error code. Fixes: 6bdd533cee9a ("bpf: add selftest for lirc_mode2 type program") Signed-off-by: Hangbin Liu <liuhangbin@gmail.com> --- tools/testing/selftests/bpf/test_lirc_mode2.sh | 2 ++ 1 file changed, 2 insertions(+)