[PATCH nft] tests: py: add more test cases for queue expr

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

 



From: Liping Zhang <liping.zhang@xxxxxxxxxxxxxx>

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@xxxxxxxxxxxxxx>
---
 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


--
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