summaryrefslogtreecommitdiffstats
path: root/tests/shell/testcases/maps
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/maps
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/maps')
-rwxr-xr-xtests/shell/testcases/maps/typeof_maps_019
1 files changed, 15 insertions, 4 deletions
diff --git a/tests/shell/testcases/maps/typeof_maps_0 b/tests/shell/testcases/maps/typeof_maps_0
index 5cf5ddde..263390d5 100755
--- a/tests/shell/testcases/maps/typeof_maps_0
+++ b/tests/shell/testcases/maps/typeof_maps_0
@@ -4,11 +4,18 @@
# without typeof, this is 'type string' and 'type integer',
# but neither could be used because it lacks size information.
-EXPECTED="table inet t {
- map m1 {
+OSFMAP=""
+OSFRULE=""
+if [ "$NFT_TEST_HAVE_osf" != n ] ; then
+ OSFMAP="map m1 {
typeof osf name : ct mark
elements = { "Linux" : 0x00000001 }
- }
+ }"
+ OSFRULE="ct mark set osf name map @m1"
+fi
+
+EXPECTED="table inet t {
+ $OSFMAP
map m2 {
typeof vlan id : mark
@@ -33,7 +40,7 @@ EXPECTED="table inet t {
}
chain c {
- ct mark set osf name map @m1
+ $OSFRULE
ether type vlan meta mark set vlan id map @m2
meta mark set ip saddr . ip daddr map @m3
iifname . ip protocol . th dport vmap @m4
@@ -45,3 +52,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