netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH nft] tests: py: add more test cases for queue expr
@ 2016-09-14 16:02 Liping Zhang
  2016-09-22 15:15 ` Pablo Neira Ayuso
  0 siblings, 1 reply; 2+ messages in thread
From: Liping Zhang @ 2016-09-14 16:02 UTC (permalink / raw)
  To: pablo; +Cc: netfilter-devel, Liping Zhang

From: Liping Zhang <liping.zhang@spreadtrum.com>

It's necessary to cover more test cases, for example, large queue
range 1-65535, error queue number 65536.

Also add a space before tailing square brackets, this is updated to
keep consistent with other expr.

Signed-off-by: Liping Zhang <liping.zhang@spreadtrum.com>
---
 tests/py/any/queue.t         |  3 +++
 tests/py/any/queue.t.payload | 20 ++++++++++++++------
 2 files changed, 17 insertions(+), 6 deletions(-)

diff --git a/tests/py/any/queue.t b/tests/py/any/queue.t
index a1aefa1..75c071d 100644
--- a/tests/py/any/queue.t
+++ b/tests/py/any/queue.t
@@ -8,7 +8,10 @@
 
 queue;ok;queue num 0
 queue num 2;ok
+queue num 65535;ok
+queue num 65536;fail
 queue num 2-3;ok
+queue num 1-65535;ok
 - queue num {3, 4, 6};ok
 queue num 4-5 fanout bypass;ok;queue num 4-5 bypass,fanout
 queue num 4-5 fanout;ok
diff --git a/tests/py/any/queue.t.payload b/tests/py/any/queue.t.payload
index 43a6650..78d939c 100644
--- a/tests/py/any/queue.t.payload
+++ b/tests/py/any/queue.t.payload
@@ -1,24 +1,32 @@
 # queue
 ip test-ip4 output
-  [ queue num 0]
+  [ queue num 0 ]
 
 # queue num 2
 ip test-ip4 output
-  [ queue num 2]
+  [ queue num 2 ]
+
+# queue num 65535
+ip test-ip4 output
+  [ queue num 65535 ]
 
 # queue num 2-3
 ip test-ip4 output
-  [ queue num 2-3]
+  [ queue num 2-3 ]
+
+# queue num 1-65535
+ip test-ip4 output
+  [ queue num 1-65535 ]
 
 # queue num 4-5 fanout bypass
 ip test-ip4 output
-  [ queue num 4-5 bypass fanout]
+  [ queue num 4-5 bypass fanout ]
 
 # queue num 4-5 fanout
 ip test-ip4 output
-  [ queue num 4-5 fanout]
+  [ queue num 4-5 fanout ]
 
 # queue num 4-5 bypass
 ip test-ip4 output
-  [ queue num 4-5 bypass]
+  [ queue num 4-5 bypass ]
 
-- 
2.5.5



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

* Re: [PATCH nft] tests: py: add more test cases for queue expr
  2016-09-14 16:02 [PATCH nft] tests: py: add more test cases for queue expr Liping Zhang
@ 2016-09-22 15:15 ` Pablo Neira Ayuso
  0 siblings, 0 replies; 2+ messages in thread
From: Pablo Neira Ayuso @ 2016-09-22 15:15 UTC (permalink / raw)
  To: Liping Zhang; +Cc: netfilter-devel, Liping Zhang

On Thu, Sep 15, 2016 at 12:02:09AM +0800, Liping Zhang wrote:
> From: Liping Zhang <liping.zhang@spreadtrum.com>
> 
> It's necessary to cover more test cases, for example, large queue
> range 1-65535, error queue number 65536.
> 
> Also add a space before tailing square brackets, this is updated to
> keep consistent with other expr.

Applied, thanks.

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

end of thread, other threads:[~2016-09-22 15:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-14 16:02 [PATCH nft] tests: py: add more test cases for queue expr Liping Zhang
2016-09-22 15:15 ` 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).