]> git.ipfire.org Git - thirdparty/nftables.git/commitdiff
tests: shell: restore pipapo and chain binding coverage in standalone 30s-stress
authorPablo Neira Ayuso <pablo@netfilter.org>
Tue, 14 Nov 2023 19:16:08 +0000 (20:16 +0100)
committerPablo Neira Ayuso <pablo@netfilter.org>
Wed, 15 Nov 2023 12:27:20 +0000 (13:27 +0100)
Do not disable pipapo and chain binding coverage for standalone runs by
default. Instead, turn them on by default and allow users to disable them
through:

 # export NFT_TEST_HAVE_chain_binding=n; bash tests/shell/testcases/transactions/30s-stress 3600
 ...
 running standalone with:
 NFT_TEST_HAVE_chain_binding=n
 NFT_TEST_HAVE_pipapo=y

given feature detection is not available in this case, thus, user has to
provide an explicit hint on what this kernel supports.

Fixes: c5b5b1044fdd ("tests/shell: add feature probing via "features/*.nft" files")
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
tests/shell/testcases/transactions/30s-stress

index b6ad06abed320965dc3ee5500a1a33659f075d17..ef3e1d3e3e4be129ab080e19e83645893f0f37cf 100755 (executable)
@@ -6,6 +6,15 @@ runtime=30
 
 # allow stand-alone execution as well, e.g. '$0 3600'
 if [ x"$1" != "x" ] ;then
+       if [ -z "${NFT_TEST_HAVE_chain_binding+x}" ]; then
+               NFT_TEST_HAVE_chain_binding=y
+       fi
+       if [ -z "${NFT_TEST_HAVE_pipapo+x}" ]; then
+               NFT_TEST_HAVE_pipapo=y
+       fi
+       echo "running standalone with:"
+       echo "NFT_TEST_HAVE_chain_binding="$NFT_TEST_HAVE_chain_binding
+       echo "NFT_TEST_HAVE_pipapo="$NFT_TEST_HAVE_pipapo
        if [ $1 -ge 0 ]; then
                runtime="$1"
        else