summaryrefslogtreecommitdiffstats
path: root/tests/shell/testcases/listing/0015dynamic_0
diff options
context:
space:
mode:
Diffstat (limited to 'tests/shell/testcases/listing/0015dynamic_0')
-rwxr-xr-xtests/shell/testcases/listing/0015dynamic_024
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/shell/testcases/listing/0015dynamic_0 b/tests/shell/testcases/listing/0015dynamic_0
new file mode 100755
index 00000000..5ddc4ad8
--- /dev/null
+++ b/tests/shell/testcases/listing/0015dynamic_0
@@ -0,0 +1,24 @@
+#!/bin/bash
+
+# list only the object asked for with table
+
+EXPECTED="table ip filter {
+ set test_set {
+ type ipv4_addr . inet_service . ipv4_addr . inet_service . inet_proto
+ size 100000
+ flags dynamic,timeout
+ }
+}"
+
+set -e
+
+$NFT -f - <<< $EXPECTED
+
+GET="$($NFT list set ip filter test_set)"
+if [ "$EXPECTED" != "$GET" ] ; then
+ DIFF="$(which diff)"
+ [ -x $DIFF ] && $DIFF -u <(echo "$EXPECTED") <(echo "$GET")
+ exit 1
+fi
+
+$NFT flush set ip filter test_set