* [PATCH nft] tests: shell: Add test for chain rename.
@ 2017-10-02 10:47 Varsha
2017-10-02 11:06 ` Varsha Rao
2017-10-02 12:32 ` Pablo Neira Ayuso
0 siblings, 2 replies; 5+ messages in thread
From: Varsha @ 2017-10-02 10:47 UTC (permalink / raw)
To: Pablo Neira Ayuso, netfilter-devel; +Cc: Varsha Rao
From: Varsha Rao <rvarsha016@gmail.com>
This patch adds tests for chain rename use case.
Signed-off-by: Varsha Rao <rvarsha016@gmail.com>
---
tests/shell/testcases/chains/0013rename_1 | 9 +++++++++
1 file changed, 9 insertions(+)
create mode 100755 tests/shell/testcases/chains/0013rename_1
diff --git a/tests/shell/testcases/chains/0013rename_1 b/tests/shell/testcases/chains/0013rename_1
new file mode 100755
index 0000000..a69d855
--- /dev/null
+++ b/tests/shell/testcases/chains/0013rename_1
@@ -0,0 +1,9 @@
+#!/bin/bash
+
+set -e
+
+$NFT add table t
+$NFT add chain t c1
+# kernel should return EEXIST
+$NFT rename chain t c1 c2 2>/dev/null
+echo "E: Renamed chain with non existing chain" >&2
--
2.13.6
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH nft] tests: shell: Add test for chain rename.
@ 2017-10-02 11:01 Varsha Rao
2017-10-02 12:35 ` Pablo Neira Ayuso
0 siblings, 1 reply; 5+ messages in thread
From: Varsha Rao @ 2017-10-02 11:01 UTC (permalink / raw)
To: Pablo Neira Ayuso, netfilter-devel; +Cc: Varsha Rao
This patch adds test for chain rename use case.
Signed-off-by: Varsha Rao <rvarsha016@gmail.com>
---
tests/shell/testcases/chains/0013rename_1 | 9 +++++++++
1 file changed, 9 insertions(+)
create mode 100755 tests/shell/testcases/chains/0013rename_1
diff --git a/tests/shell/testcases/chains/0013rename_1 b/tests/shell/testcases/chains/0013rename_1
new file mode 100755
index 0000000..a69d855
--- /dev/null
+++ b/tests/shell/testcases/chains/0013rename_1
@@ -0,0 +1,9 @@
+#!/bin/bash
+
+set -e
+
+$NFT add table t
+$NFT add chain t c1
+# kernel should return EEXIST
+$NFT rename chain t c1 c2 2>/dev/null
+echo "E: Renamed chain with non existing chain" >&2
--
2.13.6
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH nft] tests: shell: Add test for chain rename.
2017-10-02 10:47 Varsha
@ 2017-10-02 11:06 ` Varsha Rao
2017-10-02 12:32 ` Pablo Neira Ayuso
1 sibling, 0 replies; 5+ messages in thread
From: Varsha Rao @ 2017-10-02 11:06 UTC (permalink / raw)
To: netfilter-devel
On Mon, Oct 2, 2017 at 4:17 PM, Varsha <rvarsha016@gmail.com> wrote:
>
> From: Varsha Rao <rvarsha016@gmail.com>
>
> This patch adds tests for chain rename use case.
Kindly ignore this patch as commit message is not proper.
Thanks,
Varsha
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH nft] tests: shell: Add test for chain rename.
2017-10-02 10:47 Varsha
2017-10-02 11:06 ` Varsha Rao
@ 2017-10-02 12:32 ` Pablo Neira Ayuso
1 sibling, 0 replies; 5+ messages in thread
From: Pablo Neira Ayuso @ 2017-10-02 12:32 UTC (permalink / raw)
To: Varsha; +Cc: netfilter-devel
On Mon, Oct 02, 2017 at 04:17:49PM +0530, Varsha wrote:
> From: Varsha Rao <rvarsha016@gmail.com>
>
> This patch adds tests for chain rename use case.
Applied, thanks Varsha.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH nft] tests: shell: Add test for chain rename.
2017-10-02 11:01 [PATCH nft] tests: shell: Add test for chain rename Varsha Rao
@ 2017-10-02 12:35 ` Pablo Neira Ayuso
0 siblings, 0 replies; 5+ messages in thread
From: Pablo Neira Ayuso @ 2017-10-02 12:35 UTC (permalink / raw)
To: Varsha Rao; +Cc: netfilter-devel
On Mon, Oct 02, 2017 at 04:31:54PM +0530, Varsha Rao wrote:
> This patch adds test for chain rename use case.
>
> Signed-off-by: Varsha Rao <rvarsha016@gmail.com>
> ---
> tests/shell/testcases/chains/0013rename_1 | 9 +++++++++
> 1 file changed, 9 insertions(+)
> create mode 100755 tests/shell/testcases/chains/0013rename_1
>
> diff --git a/tests/shell/testcases/chains/0013rename_1 b/tests/shell/testcases/chains/0013rename_1
> new file mode 100755
> index 0000000..a69d855
> --- /dev/null
> +++ b/tests/shell/testcases/chains/0013rename_1
> @@ -0,0 +1,9 @@
> +#!/bin/bash
> +
> +set -e
> +
> +$NFT add table t
> +$NFT add chain t c1
> +# kernel should return EEXIST
Wait, I guess you mean here: "kernel should not return EEXIST as per
0d18779be13766b33c69cbc26df38383598da373", right? I can mangle this
line here before applying.
> +$NFT rename chain t c1 c2 2>/dev/null
> +echo "E: Renamed chain with non existing chain" >&2
BTW, could you also add a test to make sure we don't allow a rename
from 'c1' to 'c2' if chain 'c2' already exists.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-10-02 12:36 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-02 11:01 [PATCH nft] tests: shell: Add test for chain rename Varsha Rao
2017-10-02 12:35 ` Pablo Neira Ayuso
-- strict thread matches above, loose matches on Subject: below --
2017-10-02 10:47 Varsha
2017-10-02 11:06 ` Varsha Rao
2017-10-02 12:32 ` 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).