]> git.baikalelectronics.ru Git - kernel.git/commit
selftests/bpf: fix return value comparison for tests in test_libbpf.sh
authorQuentin Monnet <quentin.monnet@netronome.com>
Sat, 20 Oct 2018 21:58:44 +0000 (22:58 +0100)
committerAlexei Starovoitov <ast@kernel.org>
Sun, 21 Oct 2018 06:17:43 +0000 (23:17 -0700)
commitb9e1603ffa0406393ca3df22e242342d982c75d7
tree6d9be8ac450553a0730f939aad476fdc17a2f6e2
parent7e9577d833d95b54dfc6206f93156d41cec5f831
selftests/bpf: fix return value comparison for tests in test_libbpf.sh

The return value for each test in test_libbpf.sh is compared with

    if (( $? == 0 )) ; then ...

This works well with bash, but not with dash, that /bin/sh is aliased to
on some systems (such as Ubuntu).

Let's replace this comparison by something that works on both shells.

Signed-off-by: Quentin Monnet <quentin.monnet@netronome.com>
Reviewed-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/testing/selftests/bpf/test_libbpf.sh