]> git.ipfire.org Git - thirdparty/nftables.git/commitdiff
tests: shell: set timeout and size combination coverage
authorPablo Neira Ayuso <pablo@netfilter.org>
Mon, 5 Mar 2018 15:19:02 +0000 (16:19 +0100)
committerPablo Neira Ayuso <pablo@netfilter.org>
Mon, 5 Mar 2018 15:19:41 +0000 (16:19 +0100)
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
tests/shell/testcases/sets/0031set_timeout_size_0 [new file with mode: 0755]

diff --git a/tests/shell/testcases/sets/0031set_timeout_size_0 b/tests/shell/testcases/sets/0031set_timeout_size_0
new file mode 100755 (executable)
index 0000000..ef65972
--- /dev/null
@@ -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