From 424b1c3a0487e3cea19ec40439ab16816ced8370 Mon Sep 17 00:00:00 2001 From: Florian Westphal Date: Thu, 21 Sep 2023 01:05:26 +0200 Subject: 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 --- 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 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 -- cgit v1.2.3