netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Florian Westphal <fw@strlen.de>
To: <netfilter-devel@vger.kernel.org>
Cc: Florian Westphal <fw@strlen.de>
Subject: [PATCH 1/3] tests: shell: skip adding catchall elements if unuspported
Date: Thu, 21 Sep 2023 10:48:44 +0200	[thread overview]
Message-ID: <20230921084849.634-2-fw@strlen.de> (raw)
In-Reply-To: <20230921084849.634-1-fw@strlen.de>

The test fails on kernels without catchall support, so elide this
small part.

No need to skip the test in this case, the dump file validates that
the added elements are no longer there after the timeout.

Signed-off-by: Florian Westphal <fw@strlen.de>
---
 tests/shell/testcases/maps/vmap_timeout | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/tests/shell/testcases/maps/vmap_timeout b/tests/shell/testcases/maps/vmap_timeout
index 43d031979cb3..0cd965f76d0e 100755
--- a/tests/shell/testcases/maps/vmap_timeout
+++ b/tests/shell/testcases/maps/vmap_timeout
@@ -42,8 +42,12 @@ for i in $(seq 1 100) ; do
 	$NFT add element inet filter portaddrmap "$batched_addr"
 done
 
-$NFT add element inet filter portaddrmap { "* timeout 2s : drop" }
-$NFT add element inet filter portmap { "* timeout 3s : drop" }
+if [ "$NFT_TEST_HAVE_catchall_element" = n ] ; then
+	echo "Partial test due to NFT_TEST_HAVE_catchall_element=n."
+else
+	$NFT add element inet filter portaddrmap { "* timeout 2s : drop" }
+	$NFT add element inet filter portmap { "* timeout 3s : drop" }
+fi
 
 # wait for elements to time out
 sleep 5
-- 
2.41.0


  reply	other threads:[~2023-09-21 17:08 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-21  8:48 [PATCH 0/3] nftables: add feature probes for sctp and multistmt set support Florian Westphal
2023-09-21  8:48 ` Florian Westphal [this message]
2023-09-21  8:48 ` [PATCH 2/3] tests: shell: add feature probe for sets with more than one element Florian Westphal
2023-09-21  8:48 ` [PATCH 3/3] tests: shell: add feature probe for sctp chunk matching Florian Westphal

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=20230921084849.634-2-fw@strlen.de \
    --to=fw@strlen.de \
    --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).