[PATCH nft 08/14] tests/shell: skip destroy tests if kernel lacks support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Florian Westphal <fw@xxxxxxxxx>

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@xxxxxxxxx>
Signed-off-by: Thomas Haller <thaller@xxxxxxxxxx>
---
 tests/shell/features/destroy.nft                    | 3 +++
 tests/shell/testcases/chains/0044chain_destroy_0    | 2 ++
 tests/shell/testcases/flowtable/0015destroy_0       | 2 ++
 tests/shell/testcases/maps/0014destroy_0            | 2 ++
 tests/shell/testcases/rule_management/0012destroy_0 | 2 ++
 tests/shell/testcases/sets/0072destroy_0            | 2 ++
 6 files changed, 13 insertions(+)
 create mode 100644 tests/shell/features/destroy.nft

diff --git a/tests/shell/features/destroy.nft b/tests/shell/features/destroy.nft
new file mode 100644
index 000000000000..b97242e41e9f
--- /dev/null
+++ b/tests/shell/features/destroy.nft
@@ -0,0 +1,3 @@
+# f80a612dd77c ("netfilter: nf_tables: add support to destroy operation")
+# v6.3-rc1~162^2~264^2
+destroy table t
diff --git a/tests/shell/testcases/chains/0044chain_destroy_0 b/tests/shell/testcases/chains/0044chain_destroy_0
index 8384da66a5b0..1763d802c1dd 100755
--- a/tests/shell/testcases/chains/0044chain_destroy_0
+++ b/tests/shell/testcases/chains/0044chain_destroy_0
@@ -1,5 +1,7 @@
 #!/bin/sh -e
 
+# NFT_TEST_REQUIRES(NFT_TEST_HAVE_destroy)
+
 $NFT add table t
 
 # pass for non-existent chain
diff --git a/tests/shell/testcases/flowtable/0015destroy_0 b/tests/shell/testcases/flowtable/0015destroy_0
index 66fce4992a50..9e91ef5036a2 100755
--- a/tests/shell/testcases/flowtable/0015destroy_0
+++ b/tests/shell/testcases/flowtable/0015destroy_0
@@ -1,5 +1,7 @@
 #!/bin/sh -e
 
+# NFT_TEST_REQUIRES(NFT_TEST_HAVE_destroy)
+
 $NFT add table t
 
 # pass for non-existent flowtable
diff --git a/tests/shell/testcases/maps/0014destroy_0 b/tests/shell/testcases/maps/0014destroy_0
index 14c3f78af7f1..b17d0021d926 100755
--- a/tests/shell/testcases/maps/0014destroy_0
+++ b/tests/shell/testcases/maps/0014destroy_0
@@ -1,5 +1,7 @@
 #!/bin/sh -e
 
+# NFT_TEST_REQUIRES(NFT_TEST_HAVE_destroy)
+
 $NFT add table x
 
 # pass for non-existent map
diff --git a/tests/shell/testcases/rule_management/0012destroy_0 b/tests/shell/testcases/rule_management/0012destroy_0
index 85f9c9f6d4c7..46a906cf36b8 100755
--- a/tests/shell/testcases/rule_management/0012destroy_0
+++ b/tests/shell/testcases/rule_management/0012destroy_0
@@ -1,5 +1,7 @@
 #!/bin/sh -e
 
+# NFT_TEST_REQUIRES(NFT_TEST_HAVE_destroy)
+
 $NFT add table t
 $NFT add chain t c
 
diff --git a/tests/shell/testcases/sets/0072destroy_0 b/tests/shell/testcases/sets/0072destroy_0
index fd1d645057c0..6399dd0ff4c8 100755
--- a/tests/shell/testcases/sets/0072destroy_0
+++ b/tests/shell/testcases/sets/0072destroy_0
@@ -1,5 +1,7 @@
 #!/bin/sh -e
 
+# NFT_TEST_REQUIRES(NFT_TEST_HAVE_destroy)
+
 $NFT add table x
 
 # pass for non-existent set
-- 
2.41.0




[Index of Archives]     [Netfitler Users]     [Berkeley Packet Filter]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux