summaryrefslogtreecommitdiffstats
path: root/tests/shell/testcases/sets/typeof_sets_0
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2023-09-18 12:28:24 +0200
committerFlorian Westphal <fw@strlen.de>2023-09-18 13:08:54 +0200
commit5b7d55bafeb306f95b3a16b28c7d00bf79635aab (patch)
treea8edd2102515a17331f7fb3a99da226dc4a2fa5b /tests/shell/testcases/sets/typeof_sets_0
parentb512f79edbf476fe6b551cb6c7d007d81dd9f154 (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-xtests/shell/testcases/sets/typeof_sets_023
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