summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2023-09-21 01:05:26 +0200
committerFlorian Westphal <fw@strlen.de>2023-09-21 15:41:52 +0200
commit424b1c3a0487e3cea19ec40439ab16816ced8370 (patch)
tree7659e0d4b97ee8c3084a014c19fdcaa26a9ca3fd
parent7d803cd5fbf70ca55b213cd4a7fa2c624482c3ca (diff)
tests: shell: skip adding catchall elements if unuspported
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>
-rwxr-xr-xtests/shell/testcases/maps/vmap_timeout8
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/shell/testcases/maps/vmap_timeout b/tests/shell/testcases/maps/vmap_timeout
index 43d03197..0cd965f7 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