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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Arturo Borrero Gonzalez <arturo@xxxxxxxxxx>

This directory is for testcases related to the nft cache.

Signed-off-by: Arturo Borrero Gonzalez <arturo@xxxxxxxxxx>
---
 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

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

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



[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux