selftests: netfilter: fix exit value for nft_concat_range
authorHangbin Liu <liuhangbin@gmail.com>
Wed, 9 Feb 2022 08:25:51 +0000 (16:25 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 23 Feb 2022 11:03:10 +0000 (12:03 +0100)
commita1d9e1f14207c911474b7b88cb661b4e608ac5f6
tree2c0c8dabe0a02e40ac52f8bac6ae26c623159533
parentb10f4b00e10a89aa2f9faf53f90a29216bfc61d7
selftests: netfilter: fix exit value for nft_concat_range

commit 2e71ec1a725a794a16e3862791ed43fe5ba6a06b upstream.

When the nft_concat_range test failed, it exit 1 in the code
specifically.

But when part of, or all of the test passed, it will failed the
[ ${passed} -eq 0 ] check and thus exit with 1, which is the same
exit value with failure result. Fix it by exit 0 when passed is not 0.

Fixes: 611973c1e06f ("selftests: netfilter: Introduce tests for sets with range concatenation")
Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
Reviewed-by: Stefano Brivio <sbrivio@redhat.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
tools/testing/selftests/netfilter/nft_concat_range.sh