netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH nft] tests: shell: add test case for inserting element into verdict map
@ 2016-11-08 15:06 Liping Zhang
  2016-11-09 10:50 ` Arturo Borrero Gonzalez
  2016-12-04 20:28 ` Pablo Neira Ayuso
  0 siblings, 2 replies; 3+ messages in thread
From: Liping Zhang @ 2016-11-08 15:06 UTC (permalink / raw)
  To: pablo; +Cc: netfilter-devel, arturo, Liping Zhang

From: Liping Zhang <zlpnobody@gmail.com>

"dalegaard@gmail.com" reports that when inserting an element into a
verdict map, kernel crash will happen. Now add this test case so we
can avoid future regressions fail.

Signed-off-by: Liping Zhang <zlpnobody@gmail.com>
---
 .../shell/testcases/sets/0008create_verdict_map_0  | 25 ++++++++++++++++++++++
 1 file changed, 25 insertions(+)
 create mode 100755 tests/shell/testcases/sets/0008create_verdict_map_0

diff --git a/tests/shell/testcases/sets/0008create_verdict_map_0 b/tests/shell/testcases/sets/0008create_verdict_map_0
new file mode 100755
index 0000000..8ebb450
--- /dev/null
+++ b/tests/shell/testcases/sets/0008create_verdict_map_0
@@ -0,0 +1,25 @@
+#!/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 ip t {
+	map sourcemap {
+		type ipv4_addr : verdict;
+	}
+	chain postrouting {
+		ip saddr vmap @sourcemap accept
+	}
+}
+add chain t c
+add element t sourcemap { 100.123.10.2 : jump c }
+" > $tmpfile
+
+set -e
+$NFT -f $tmpfile
-- 
2.5.5



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH nft] tests: shell: add test case for inserting element into verdict map
  2016-11-08 15:06 [PATCH nft] tests: shell: add test case for inserting element into verdict map Liping Zhang
@ 2016-11-09 10:50 ` Arturo Borrero Gonzalez
  2016-12-04 20:28 ` Pablo Neira Ayuso
  1 sibling, 0 replies; 3+ messages in thread
From: Arturo Borrero Gonzalez @ 2016-11-09 10:50 UTC (permalink / raw)
  To: Liping Zhang
  Cc: Pablo Neira Ayuso, Netfilter Development Mailing list,
	Liping Zhang

On 8 November 2016 at 16:06, Liping Zhang <zlpnobody@163.com> wrote:
> From: Liping Zhang <zlpnobody@gmail.com>
>
> "dalegaard@gmail.com" reports that when inserting an element into a
> verdict map, kernel crash will happen. Now add this test case so we
> can avoid future regressions fail.
>
> Signed-off-by: Liping Zhang <zlpnobody@gmail.com>
> ---
>  .../shell/testcases/sets/0008create_verdict_map_0  | 25 ++++++++++++++++++++++
>  1 file changed, 25 insertions(+)
>  create mode 100755 tests/shell/testcases/sets/0008create_verdict_map_0
>

Acked-by: Arturo Borrero Gonzalez <arturo@debian.org>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH nft] tests: shell: add test case for inserting element into verdict map
  2016-11-08 15:06 [PATCH nft] tests: shell: add test case for inserting element into verdict map Liping Zhang
  2016-11-09 10:50 ` Arturo Borrero Gonzalez
@ 2016-12-04 20:28 ` Pablo Neira Ayuso
  1 sibling, 0 replies; 3+ messages in thread
From: Pablo Neira Ayuso @ 2016-12-04 20:28 UTC (permalink / raw)
  To: Liping Zhang; +Cc: netfilter-devel, arturo, Liping Zhang

On Tue, Nov 08, 2016 at 11:06:37PM +0800, Liping Zhang wrote:
> From: Liping Zhang <zlpnobody@gmail.com>
> 
> "dalegaard@gmail.com" reports that when inserting an element into a
> verdict map, kernel crash will happen. Now add this test case so we
> can avoid future regressions fail.

Applied, thanks Liping.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-12-04 20:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-08 15:06 [PATCH nft] tests: shell: add test case for inserting element into verdict map Liping Zhang
2016-11-09 10:50 ` Arturo Borrero Gonzalez
2016-12-04 20:28 ` Pablo Neira Ayuso

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).