diff options
author | Florian Westphal <fw@strlen.de> | 2023-09-18 12:28:24 +0200 |
---|---|---|
committer | Florian Westphal <fw@strlen.de> | 2023-09-18 13:08:54 +0200 |
commit | 5b7d55bafeb306f95b3a16b28c7d00bf79635aab (patch) | |
tree | a8edd2102515a17331f7fb3a99da226dc4a2fa5b /tests/shell/testcases/sets/typeof_sets_0 | |
parent | b512f79edbf476fe6b551cb6c7d007d81dd9f154 (diff) |
tests/shell: skip test cases involving osf match if kernel lacks support
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Thomas Haller <thaller@redhat.com>
Diffstat (limited to 'tests/shell/testcases/sets/typeof_sets_0')
-rwxr-xr-x | tests/shell/testcases/sets/typeof_sets_0 | 23 |
1 files changed, 17 insertions, 6 deletions
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 |