From b512f79edbf476fe6b551cb6c7d007d81dd9f154 Mon Sep 17 00:00:00 2001 From: Florian Westphal Date: Mon, 18 Sep 2023 12:28:23 +0200 Subject: tests/shell: skip catchall tests if kernel lacks support Signed-off-by: Florian Westphal Signed-off-by: Thomas Haller --- tests/shell/testcases/maps/0011vmap_0 | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'tests/shell/testcases/maps/0011vmap_0') diff --git a/tests/shell/testcases/maps/0011vmap_0 b/tests/shell/testcases/maps/0011vmap_0 index 83704d48..3e6fa78d 100755 --- a/tests/shell/testcases/maps/0011vmap_0 +++ b/tests/shell/testcases/maps/0011vmap_0 @@ -22,4 +22,12 @@ EXPECTED="table inet filter { }" $NFT -f - <<< "$EXPECTED" -$NFT 'add element inet filter portmap { 22 : jump ssh_input, * : drop }' + +if [ "$NFT_TEST_HAVE_catchall_element" != n ]; then + $NFT 'add element inet filter portmap { 22 : jump ssh_input, * : drop }' +fi + +if [ "$NFT_TEST_HAVE_catchall_element" = n ]; then + echo "Ran partial tests due to NFT_TEST_HAVE_catchall_element=n (skipped)" + exit 77 +fi -- cgit v1.2.3