From 5b7d55bafeb306f95b3a16b28c7d00bf79635aab Mon Sep 17 00:00:00 2001 From: Florian Westphal Date: Mon, 18 Sep 2023 12:28:24 +0200 Subject: tests/shell: skip test cases involving osf match if kernel lacks support Signed-off-by: Florian Westphal Signed-off-by: Thomas Haller --- tests/shell/testcases/sets/typeof_sets_0 | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) (limited to 'tests/shell/testcases/sets/typeof_sets_0') diff --git a/tests/shell/testcases/sets/typeof_sets_0 b/tests/shell/testcases/sets/typeof_sets_0 index 9f777a8c..6ed0c354 100755 --- a/tests/shell/testcases/sets/typeof_sets_0 +++ b/tests/shell/testcases/sets/typeof_sets_0 @@ -4,11 +4,20 @@ # s1 and s2 are identical, they just use different # ways for declaration. -EXPECTED="table inet t { - set s1 { +OSFSET="" +OSFCHAIN="" +if [ "$NFT_TEST_HAVE_osf" != n ] ; then + OSFSET="set s1 { typeof osf name elements = { \"Linux\" } - } + }" + OSFCHAIN="chain c1 { + osf name @s1 accept + }" +fi + +EXPECTED="table inet t { + $OSFSET set s2 { typeof vlan id @@ -60,9 +69,7 @@ EXPECTED="table inet t { elements = { 3567 . 1.2.3.4 } } - chain c1 { - osf name @s1 accept - } + $OSFCHAIN chain c2 { ether type vlan vlan id @s2 accept @@ -104,3 +111,7 @@ EXPECTED="table inet t { set -e $NFT -f - <<< $EXPECTED +if [ "$NFT_TEST_HAVE_osf" = n ] ; then + echo "Partial test due to NFT_TEST_HAVE_osf=n. Skip" + exit 77 +fi -- cgit v1.2.3