[PATCH 8/8] tests: add two tests for error reporting

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

 



Mixed syntactical and non-syntactical errors in individual commands and
blocks.

Signed-off-by: Patrick McHardy <kaber@xxxxxxxxx>
---
 tests/error.1 |  9 +++++++++
 tests/error.2 | 18 ++++++++++++++++++
 2 files changed, 27 insertions(+)
 create mode 100644 tests/error.1
 create mode 100644 tests/error.2

diff --git a/tests/error.1 b/tests/error.1
new file mode 100644
index 0000000..bc3bf16
--- /dev/null
+++ b/tests/error.1
@@ -0,0 +1,9 @@
+#! nft -f
+
+# mixed syntactical and non-syntactical errors
+filter {
+filter input
+filter input tcp
+filter input tcp dport
+filter input tcp dport tcp
+filter input tcp dport tcp dport
diff --git a/tests/error.2 b/tests/error.2
new file mode 100644
index 0000000..744a63d
--- /dev/null
+++ b/tests/error.2
@@ -0,0 +1,18 @@
+#! nft -f
+
+# mixed syntactical and non-syntactical errors in blocks
+table filter {
+	# missing identifier
+	chain
+
+	# missing chain block
+	chain output
+
+	chain output {
+		tcp
+		tcp dport
+		tcp dport tcp
+		tcp dport tcp dport
+		tcp dport ssh
+	}
+}
-- 
1.8.5.3

--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux