summaryrefslogtreecommitdiffstats
path: root/tests/shell/testcases/sets
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2018-03-05 16:19:02 +0100
committerPablo Neira Ayuso <pablo@netfilter.org>2018-03-05 16:19:41 +0100
commited183e43dbe5a896909470be172ad6ee45219f76 (patch)
treeabd0ef231740456b8d136450ffd0167b76fab769 /tests/shell/testcases/sets
parent4f2d472e6b628410ff7d7a053f8cca8e98f08a28 (diff)
tests: shell: set timeout and size combination coverage
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'tests/shell/testcases/sets')
-rwxr-xr-xtests/shell/testcases/sets/0031set_timeout_size_015
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/shell/testcases/sets/0031set_timeout_size_0 b/tests/shell/testcases/sets/0031set_timeout_size_0
new file mode 100755
index 00000000..ef65972a
--- /dev/null
+++ b/tests/shell/testcases/sets/0031set_timeout_size_0
@@ -0,0 +1,15 @@
+#!/bin/bash
+
+tmpfile=$(mktemp)
+if [ ! -w $tmpfile ] ; then
+ echo "Failed to create tmp file" >&2
+ exit 0
+fi
+
+trap "rm -rf $tmpfile" EXIT # cleanup if aborted
+
+echo "add table x
+add set x y { type ipv4_addr; size 128; timeout 30s; }"
+
+set -e
+$NFT -f $tmpfile