From: Pablo Neira Ayuso <pablo@netfilter.org>
To: netfilter-devel@vger.kernel.org
Cc: davem@davemloft.net, netdev@vger.kernel.org, kuba@kernel.org
Subject: [PATCH net 3/6] selftests: netfilter: fix exit value for nft_concat_range
Date: Fri, 11 Feb 2022 00:10:18 +0100 [thread overview]
Message-ID: <20220210231021.204488-4-pablo@netfilter.org> (raw)
In-Reply-To: <20220210231021.204488-1-pablo@netfilter.org>
From: Hangbin Liu <liuhangbin@gmail.com>
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>
---
tools/testing/selftests/netfilter/nft_concat_range.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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
--
2.30.2
next prev parent reply other threads:[~2022-02-10 23:10 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-10 23:10 [PATCH net 0/6] Netfilter fixes for net Pablo Neira Ayuso
2022-02-10 23:10 ` [PATCH net 1/6] selftests: netfilter: add synproxy test Pablo Neira Ayuso
2022-02-11 12:10 ` patchwork-bot+netdevbpf
2022-02-10 23:10 ` [PATCH net 2/6] netfilter: xt_socket: fix a typo in socket_mt_destroy() Pablo Neira Ayuso
2022-02-10 23:10 ` Pablo Neira Ayuso [this message]
2022-02-10 23:10 ` [PATCH net 4/6] netfilter: nft_synproxy: unregister hooks on init error path Pablo Neira Ayuso
2022-02-10 23:10 ` [PATCH net 5/6] selftests: netfilter: synproxy test requires nf_conntrack Pablo Neira Ayuso
2022-02-10 23:10 ` [PATCH net 6/6] selftests: netfilter: disable rp_filter on router Pablo Neira Ayuso
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220210231021.204488-4-pablo@netfilter.org \
--to=pablo@netfilter.org \
--cc=davem@davemloft.net \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=netfilter-devel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).