summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2017-03-13 13:22:03 +0100
committerPablo Neira Ayuso <pablo@netfilter.org>2017-03-13 13:22:03 +0100
commitc7fad18a7ed53c840620b1286dde5245b82fcd7a (patch)
tree2812b5d003f9c968539100ac90678124858e491e
parent70c0d26675194ba66cb3c3d5c6af5bdbdf8504f1 (diff)
tests: shell: test comments with small sets
Just a test to cover the bitmap backend implementation. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
-rwxr-xr-xtests/shell/testcases/sets/0020comments_012
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/shell/testcases/sets/0020comments_0 b/tests/shell/testcases/sets/0020comments_0
new file mode 100755
index 00000000..44d451a8
--- /dev/null
+++ b/tests/shell/testcases/sets/0020comments_0
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+# Test that comments are added to set elements in standard sets.
+# Explicitly test bitmap backend set implementation.
+
+$NFT add table inet t
+$NFT add set inet t s {type inet_service \; }
+$NFT add element inet t s { 22 comment "test" }
+if ! $NFT list ruleset | grep test >/dev/null ; then
+ echo "E: missing comment in set element" >&2
+ exit 1
+fi