* [PATCH nft] tests: shell: add typeof with concatenations
@ 2020-04-01 15:51 Pablo Neira Ayuso
2020-04-01 16:05 ` Florian Westphal
0 siblings, 1 reply; 2+ messages in thread
From: Pablo Neira Ayuso @ 2020-04-01 15:51 UTC (permalink / raw)
To: netfilter-devel
Add a test to cover typeof with concatenations.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
---
tests/shell/testcases/sets/0045typeof_sets_0 | 14 ++++++++++++++
tests/shell/testcases/sets/dumps/0045typeof_sets_0.nft | 7 +++++++
2 files changed, 21 insertions(+)
create mode 100755 tests/shell/testcases/sets/0045typeof_sets_0
create mode 100644 tests/shell/testcases/sets/dumps/0045typeof_sets_0.nft
diff --git a/tests/shell/testcases/sets/0045typeof_sets_0 b/tests/shell/testcases/sets/0045typeof_sets_0
new file mode 100755
index 000000000000..3cf8d0b0c22d
--- /dev/null
+++ b/tests/shell/testcases/sets/0045typeof_sets_0
@@ -0,0 +1,14 @@
+#!/bin/bash
+
+EXPECTED="table ip foo {
+ set whitelist {
+ typeof ip saddr . ip daddr . meta mark
+ elements = { 192.168.10.35 . 192.168.10.11 . 0x00000010,
+ 192.168.10.101 . 192.168.10.12 . 0x00000020,
+ }
+ }
+}
+"
+
+set -e
+$NFT -f - <<< $EXPECTED
diff --git a/tests/shell/testcases/sets/dumps/0045typeof_sets_0.nft b/tests/shell/testcases/sets/dumps/0045typeof_sets_0.nft
new file mode 100644
index 000000000000..68c900a72ac6
--- /dev/null
+++ b/tests/shell/testcases/sets/dumps/0045typeof_sets_0.nft
@@ -0,0 +1,7 @@
+table ip foo {
+ set whitelist {
+ typeof ip saddr . ip daddr . meta mark
+ elements = { 192.168.10.35 . 192.168.10.11 . 0x00000010,
+ 192.168.10.101 . 192.168.10.12 . 0x00000020 }
+ }
+}
--
2.11.0
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH nft] tests: shell: add typeof with concatenations
2020-04-01 15:51 [PATCH nft] tests: shell: add typeof with concatenations Pablo Neira Ayuso
@ 2020-04-01 16:05 ` Florian Westphal
0 siblings, 0 replies; 2+ messages in thread
From: Florian Westphal @ 2020-04-01 16:05 UTC (permalink / raw)
To: Pablo Neira Ayuso; +Cc: netfilter-devel
Pablo Neira Ayuso <pablo@netfilter.org> wrote:
> Add a test to cover typeof with concatenations.
>
> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
> ---
> tests/shell/testcases/sets/0045typeof_sets_0 | 14 ++++++++++++++
> tests/shell/testcases/sets/dumps/0045typeof_sets_0.nft | 7 +++++++
> 2 files changed, 21 insertions(+)
> create mode 100755 tests/shell/testcases/sets/0045typeof_sets_0
> create mode 100644 tests/shell/testcases/sets/dumps/0045typeof_sets_0.nft
Thanks, but I already pushed a test case for this, sorry :/
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-04-01 16:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-04-01 15:51 [PATCH nft] tests: shell: add typeof with concatenations Pablo Neira Ayuso
2020-04-01 16:05 ` Florian Westphal
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.