diff mbox

[nft,2/3] tests: shell: introduce the cache testcases directory

Message ID 147817468263.6881.17616137517734880570.stgit@nfdev2.cica.es
State Changes Requested
Delegated to: Pablo Neira
Headers show

Commit Message

Arturo Borrero Nov. 3, 2016, 12:04 p.m. UTC
From: Arturo Borrero Gonzalez <arturo@debian.org>

This directory is for testcases related to the nft cache.

Signed-off-by: Arturo Borrero Gonzalez <arturo@debian.org>
---
 tests/shell/testcases/cache/0001_cache_handling_0 |   29 +++++++++++++++++++++
 tests/shell/testcases/sets/cache_handling_0       |   29 ---------------------
 2 files changed, 29 insertions(+), 29 deletions(-)
 create mode 100755 tests/shell/testcases/cache/0001_cache_handling_0
 delete mode 100755 tests/shell/testcases/sets/cache_handling_0


--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/tests/shell/testcases/cache/0001_cache_handling_0 b/tests/shell/testcases/cache/0001_cache_handling_0
new file mode 100755
index 0000000..9a73769
--- /dev/null
+++ b/tests/shell/testcases/cache/0001_cache_handling_0
@@ -0,0 +1,29 @@ 
+#!/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 "
+table inet test {
+	set test {
+		type ipv4_addr
+		elements = { 1.1.1.1}
+	}
+
+	chain test {
+		ip saddr @test counter accept
+		ip daddr { 2.2.2.2} counter accept
+	}
+}" > $tmpfile
+
+set -e
+
+$NFT -f $tmpfile
+$NFT delete rule inet test test handle 2
+$NFT delete set inet test test
+$NFT -f $tmpfile
diff --git a/tests/shell/testcases/sets/cache_handling_0 b/tests/shell/testcases/sets/cache_handling_0
deleted file mode 100755
index 9a73769..0000000
--- a/tests/shell/testcases/sets/cache_handling_0
+++ /dev/null
@@ -1,29 +0,0 @@ 
-#!/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 "
-table inet test {
-	set test {
-		type ipv4_addr
-		elements = { 1.1.1.1}
-	}
-
-	chain test {
-		ip saddr @test counter accept
-		ip daddr { 2.2.2.2} counter accept
-	}
-}" > $tmpfile
-
-set -e
-
-$NFT -f $tmpfile
-$NFT delete rule inet test test handle 2
-$NFT delete set inet test test
-$NFT -f $tmpfile