Skip to content

Commit

Permalink
selftests: netfilter: fix exit value for nft_concat_range
Browse files Browse the repository at this point in the history
commit 2e71ec1 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: 611973c ("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>
  • Loading branch information
liuhangbin authored and gregkh committed Feb 23, 2022
1 parent b10f4b0 commit a1d9e1f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/testing/selftests/netfilter/nft_concat_range.sh
Expand Up @@ -1583,4 +1583,4 @@ for name in ${TESTS}; do
done
done

[ ${passed} -eq 0 ] && exit ${KSELFTEST_SKIP}
[ ${passed} -eq 0 ] && exit ${KSELFTEST_SKIP} || exit 0

0 comments on commit a1d9e1f

Please sign in to comment.