summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2023-11-21 21:16:38 +0100
committerPablo Neira Ayuso <pablo@netfilter.org>2023-11-22 10:14:10 +0100
commitfff913c1eefbc84eb2d9c52038ef29fe881e9ee9 (patch)
treec7cc878d24358fa0975189cb72a526e139fb985e /tests
parentb975de80bd1dbf0a04c6cb7a42e46c323c865de8 (diff)
tests: shell: skip secmark tests if kernel does not support it
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/shell/features/secmark.nft7
-rwxr-xr-xtests/shell/testcases/json/0005secmark_objref_01
2 files changed, 8 insertions, 0 deletions
diff --git a/tests/shell/features/secmark.nft b/tests/shell/features/secmark.nft
new file mode 100644
index 00000000..ccbb572f
--- /dev/null
+++ b/tests/shell/features/secmark.nft
@@ -0,0 +1,7 @@
+# fb961945457f ("netfilter: nf_tables: add SECMARK support")
+# v4.20-rc1~14^2~125^2~5
+table inet x {
+ secmark ssh_server {
+ "system_u:object_r:ssh_server_packet_t:s0"
+ }
+}
diff --git a/tests/shell/testcases/json/0005secmark_objref_0 b/tests/shell/testcases/json/0005secmark_objref_0
index 992d1b00..5c44f093 100755
--- a/tests/shell/testcases/json/0005secmark_objref_0
+++ b/tests/shell/testcases/json/0005secmark_objref_0
@@ -1,6 +1,7 @@
#!/bin/bash
# NFT_TEST_REQUIRES(NFT_TEST_HAVE_json)
+# NFT_TEST_REQUIRES(NFT_TEST_HAVE_secmark)
set -e