summaryrefslogtreecommitdiffstats
path: root/tests/shell
diff options
context:
space:
mode:
Diffstat (limited to 'tests/shell')
-rwxr-xr-xtests/shell/testcases/chains/0044chain_destroy_07
-rwxr-xr-xtests/shell/testcases/chains/0045chain_destroy_08
-rw-r--r--tests/shell/testcases/chains/dumps/0044chain_destroy_0.nft2
-rw-r--r--tests/shell/testcases/chains/dumps/0045chain_destroy_0.nft2
-rwxr-xr-xtests/shell/testcases/flowtable/0015destroy_07
-rwxr-xr-xtests/shell/testcases/flowtable/0016destroy_06
-rw-r--r--tests/shell/testcases/flowtable/dumps/0015destroy_0.nft2
-rw-r--r--tests/shell/testcases/flowtable/dumps/0016destroy_0.nft2
-rwxr-xr-xtests/shell/testcases/maps/0014destroy_08
-rwxr-xr-xtests/shell/testcases/maps/0015destroy_07
-rw-r--r--tests/shell/testcases/maps/dumps/0014destroy_0.nft2
-rw-r--r--tests/shell/testcases/maps/dumps/0015destroy_0.nft2
-rwxr-xr-xtests/shell/testcases/rule_management/0013destroy_0 (renamed from tests/shell/testcases/rule_management/0011destroy_0)0
-rw-r--r--tests/shell/testcases/rule_management/dumps/0013destroy_0 (renamed from tests/shell/testcases/rule_management/dumps/0011destroy_0.nft)0
-rwxr-xr-xtests/shell/testcases/sets/0072destroy_08
-rwxr-xr-xtests/shell/testcases/sets/0073destroy_07
-rw-r--r--tests/shell/testcases/sets/dumps/0072destroy_0.nft2
-rw-r--r--tests/shell/testcases/sets/dumps/0073destroy_0.nft2
18 files changed, 74 insertions, 0 deletions
diff --git a/tests/shell/testcases/chains/0044chain_destroy_0 b/tests/shell/testcases/chains/0044chain_destroy_0
new file mode 100755
index 00000000..070021cf
--- /dev/null
+++ b/tests/shell/testcases/chains/0044chain_destroy_0
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+set -e
+
+$NFT add table t
+
+$NFT destroy chain t nochain
diff --git a/tests/shell/testcases/chains/0045chain_destroy_0 b/tests/shell/testcases/chains/0045chain_destroy_0
new file mode 100755
index 00000000..b356f8f8
--- /dev/null
+++ b/tests/shell/testcases/chains/0045chain_destroy_0
@@ -0,0 +1,8 @@
+#!/bin/bash
+
+set -e
+
+$NFT add table t
+$NFT add chain t c
+
+$NFT destroy chain t c
diff --git a/tests/shell/testcases/chains/dumps/0044chain_destroy_0.nft b/tests/shell/testcases/chains/dumps/0044chain_destroy_0.nft
new file mode 100644
index 00000000..985768ba
--- /dev/null
+++ b/tests/shell/testcases/chains/dumps/0044chain_destroy_0.nft
@@ -0,0 +1,2 @@
+table ip t {
+}
diff --git a/tests/shell/testcases/chains/dumps/0045chain_destroy_0.nft b/tests/shell/testcases/chains/dumps/0045chain_destroy_0.nft
new file mode 100644
index 00000000..985768ba
--- /dev/null
+++ b/tests/shell/testcases/chains/dumps/0045chain_destroy_0.nft
@@ -0,0 +1,2 @@
+table ip t {
+}
diff --git a/tests/shell/testcases/flowtable/0015destroy_0 b/tests/shell/testcases/flowtable/0015destroy_0
new file mode 100755
index 00000000..4828d818
--- /dev/null
+++ b/tests/shell/testcases/flowtable/0015destroy_0
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+set -e
+$NFT add table t
+$NFT add flowtable t f { hook ingress priority 10 \; devices = { lo }\; }
+
+$NFT destroy flowtable t f
diff --git a/tests/shell/testcases/flowtable/0016destroy_0 b/tests/shell/testcases/flowtable/0016destroy_0
new file mode 100755
index 00000000..ce23c753
--- /dev/null
+++ b/tests/shell/testcases/flowtable/0016destroy_0
@@ -0,0 +1,6 @@
+#!/bin/bash
+
+set -e
+$NFT add table t
+
+$NFT destroy flowtable t f
diff --git a/tests/shell/testcases/flowtable/dumps/0015destroy_0.nft b/tests/shell/testcases/flowtable/dumps/0015destroy_0.nft
new file mode 100644
index 00000000..985768ba
--- /dev/null
+++ b/tests/shell/testcases/flowtable/dumps/0015destroy_0.nft
@@ -0,0 +1,2 @@
+table ip t {
+}
diff --git a/tests/shell/testcases/flowtable/dumps/0016destroy_0.nft b/tests/shell/testcases/flowtable/dumps/0016destroy_0.nft
new file mode 100644
index 00000000..985768ba
--- /dev/null
+++ b/tests/shell/testcases/flowtable/dumps/0016destroy_0.nft
@@ -0,0 +1,2 @@
+table ip t {
+}
diff --git a/tests/shell/testcases/maps/0014destroy_0 b/tests/shell/testcases/maps/0014destroy_0
new file mode 100755
index 00000000..b769276d
--- /dev/null
+++ b/tests/shell/testcases/maps/0014destroy_0
@@ -0,0 +1,8 @@
+#!/bin/bash
+
+set -e
+
+$NFT add table x
+$NFT add map x y { type ipv4_addr : ipv4_addr\; }
+
+$NFT destroy map x y
diff --git a/tests/shell/testcases/maps/0015destroy_0 b/tests/shell/testcases/maps/0015destroy_0
new file mode 100755
index 00000000..abad4d57
--- /dev/null
+++ b/tests/shell/testcases/maps/0015destroy_0
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+set -e
+
+$NFT add table x
+
+$NFT destroy map x nonmap
diff --git a/tests/shell/testcases/maps/dumps/0014destroy_0.nft b/tests/shell/testcases/maps/dumps/0014destroy_0.nft
new file mode 100644
index 00000000..5d4d2caf
--- /dev/null
+++ b/tests/shell/testcases/maps/dumps/0014destroy_0.nft
@@ -0,0 +1,2 @@
+table ip x {
+}
diff --git a/tests/shell/testcases/maps/dumps/0015destroy_0.nft b/tests/shell/testcases/maps/dumps/0015destroy_0.nft
new file mode 100644
index 00000000..5d4d2caf
--- /dev/null
+++ b/tests/shell/testcases/maps/dumps/0015destroy_0.nft
@@ -0,0 +1,2 @@
+table ip x {
+}
diff --git a/tests/shell/testcases/rule_management/0011destroy_0 b/tests/shell/testcases/rule_management/0013destroy_0
index 895c24a4..895c24a4 100755
--- a/tests/shell/testcases/rule_management/0011destroy_0
+++ b/tests/shell/testcases/rule_management/0013destroy_0
diff --git a/tests/shell/testcases/rule_management/dumps/0011destroy_0.nft b/tests/shell/testcases/rule_management/dumps/0013destroy_0
index 1e0d1d60..1e0d1d60 100644
--- a/tests/shell/testcases/rule_management/dumps/0011destroy_0.nft
+++ b/tests/shell/testcases/rule_management/dumps/0013destroy_0
diff --git a/tests/shell/testcases/sets/0072destroy_0 b/tests/shell/testcases/sets/0072destroy_0
new file mode 100755
index 00000000..c9cf9ff7
--- /dev/null
+++ b/tests/shell/testcases/sets/0072destroy_0
@@ -0,0 +1,8 @@
+#!/bin/bash
+
+set -e
+
+$NFT add table x
+$NFT add set x s {type ipv4_addr\; size 2\;}
+
+$NFT destroy set x s
diff --git a/tests/shell/testcases/sets/0073destroy_0 b/tests/shell/testcases/sets/0073destroy_0
new file mode 100755
index 00000000..a9d65a55
--- /dev/null
+++ b/tests/shell/testcases/sets/0073destroy_0
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+set -e
+
+$NFT add table x
+
+$NFT destroy set x s
diff --git a/tests/shell/testcases/sets/dumps/0072destroy_0.nft b/tests/shell/testcases/sets/dumps/0072destroy_0.nft
new file mode 100644
index 00000000..5d4d2caf
--- /dev/null
+++ b/tests/shell/testcases/sets/dumps/0072destroy_0.nft
@@ -0,0 +1,2 @@
+table ip x {
+}
diff --git a/tests/shell/testcases/sets/dumps/0073destroy_0.nft b/tests/shell/testcases/sets/dumps/0073destroy_0.nft
new file mode 100644
index 00000000..5d4d2caf
--- /dev/null
+++ b/tests/shell/testcases/sets/dumps/0073destroy_0.nft
@@ -0,0 +1,2 @@
+table ip x {
+}