[PATCH nft 05/16] tests: shell: Add test for log flags.

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

 



This patch adds test cases for log flags.

Signed-off-by: Varsha Rao <rvarsha016@xxxxxxxxx>
---
 tests/shell/testcases/optionals/log_flags_0 | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)
 create mode 100755 tests/shell/testcases/optionals/log_flags_0

diff --git a/tests/shell/testcases/optionals/log_flags_0 b/tests/shell/testcases/optionals/log_flags_0
new file mode 100755
index 0000000..7b8550f
--- /dev/null
+++ b/tests/shell/testcases/optionals/log_flags_0
@@ -0,0 +1,29 @@
+#!/bin/bash
+
+set -e
+
+EXPECTED="table ip x {
+	chain y {
+		log flags tcp sequence,options
+		log flags ip options
+		log flags skuid
+		log flags ether
+		log flags all
+	}
+}"
+
+$NFT add table ip x
+$NFT add chain ip x y
+$NFT add rule x y log flags tcp sequence,options
+$NFT add rule x y log flags ip options
+$NFT add rule x y log flags skuid
+$NFT add rule x y log flags ether
+$NFT add rule x y log flags all
+
+GET="$($NFT list ruleset)"
+
+if [ "$EXPECTED" != "$GET" ] ; then
+        DIFF="$(which diff)"
+        [ -x $DIFF ] && $DIFF -u <(echo "$EXPECTED") <(echo "$GET")
+        exit 1
+fi
-- 
2.13.6

--
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