diff options
author | Hangbin Liu <liuhangbin@gmail.com> | 2022-02-09 16:25:51 +0800 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2022-02-09 11:07:06 +0100 |
commit | 2e71ec1a725a794a16e3862791ed43fe5ba6a06b (patch) | |
tree | cf632f7a89e2245d4fb9c5ee04b9d85929174707 | |
parent | 75063c9294fb239bbe64eb72141b6871fe526d29 (diff) | |
download | linux-stable-2e71ec1a725a794a16e3862791ed43fe5ba6a06b.tar.gz linux-stable-2e71ec1a725a794a16e3862791ed43fe5ba6a06b.tar.bz2 linux-stable-2e71ec1a725a794a16e3862791ed43fe5ba6a06b.zip |
selftests: netfilter: fix exit value for nft_concat_range
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>
-rwxr-xr-x | tools/testing/selftests/netfilter/nft_concat_range.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/testing/selftests/netfilter/nft_concat_range.sh b/tools/testing/selftests/netfilter/nft_concat_range.sh index df322e47a54f..b35010cc7f6a 100755 --- a/tools/testing/selftests/netfilter/nft_concat_range.sh +++ b/tools/testing/selftests/netfilter/nft_concat_range.sh @@ -1601,4 +1601,4 @@ for name in ${TESTS}; do done done -[ ${passed} -eq 0 ] && exit ${KSELFTEST_SKIP} +[ ${passed} -eq 0 ] && exit ${KSELFTEST_SKIP} || exit 0 |