]> git.ipfire.org Git - thirdparty/nftables.git/commitdiff
tests/shell: skip destroy tests if kernel lacks support
authorFlorian Westphal <fw@strlen.de>
Mon, 18 Sep 2023 10:28:22 +0000 (12:28 +0200)
committerFlorian Westphal <fw@strlen.de>
Mon, 18 Sep 2023 11:08:49 +0000 (13:08 +0200)
Destroy support was added for table/flowtable/chain etc. in a single
commit, so no need to add capability tests for each destroy subtype.

Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Thomas Haller <thaller@redhat.com>
tests/shell/features/destroy.nft [new file with mode: 0644]
tests/shell/testcases/chains/0044chain_destroy_0
tests/shell/testcases/flowtable/0015destroy_0
tests/shell/testcases/maps/0014destroy_0
tests/shell/testcases/rule_management/0012destroy_0
tests/shell/testcases/sets/0072destroy_0

diff --git a/tests/shell/features/destroy.nft b/tests/shell/features/destroy.nft
new file mode 100644 (file)
index 0000000..b97242e
--- /dev/null
@@ -0,0 +1,3 @@
+# f80a612dd77c ("netfilter: nf_tables: add support to destroy operation")
+# v6.3-rc1~162^2~264^2
+destroy table t
index 8384da66a5b0dc76ce988a0046bfcb1b644fe295..1763d802c1dda64531a0608f7ab081b0ab5cf556 100755 (executable)
@@ -1,5 +1,7 @@
 #!/bin/sh -e
 
+# NFT_TEST_REQUIRES(NFT_TEST_HAVE_destroy)
+
 $NFT add table t
 
 # pass for non-existent chain
index 66fce4992a5023330fe091b1890701238354e029..9e91ef5036a2e3993ef5626d4c451915906da592 100755 (executable)
@@ -1,5 +1,7 @@
 #!/bin/sh -e
 
+# NFT_TEST_REQUIRES(NFT_TEST_HAVE_destroy)
+
 $NFT add table t
 
 # pass for non-existent flowtable
index 14c3f78af7f1959f0139003fa2a5ef36aeeb5049..b17d0021d9267fb8334c485136218d53d89d9373 100755 (executable)
@@ -1,5 +1,7 @@
 #!/bin/sh -e
 
+# NFT_TEST_REQUIRES(NFT_TEST_HAVE_destroy)
+
 $NFT add table x
 
 # pass for non-existent map
index 85f9c9f6d4c78477e919991bfce13ce580899f68..46a906cf36b8380df6218c3c7acd29d096434c59 100755 (executable)
@@ -1,5 +1,7 @@
 #!/bin/sh -e
 
+# NFT_TEST_REQUIRES(NFT_TEST_HAVE_destroy)
+
 $NFT add table t
 $NFT add chain t c
 
index fd1d645057c09756841d4b930756e0f31adeccef..6399dd0ff4c80301af206655e4410b3b3b896681 100755 (executable)
@@ -1,5 +1,7 @@
 #!/bin/sh -e
 
+# NFT_TEST_REQUIRES(NFT_TEST_HAVE_destroy)
+
 $NFT add table x
 
 # pass for non-existent set