netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH nft] tests: py: fix numgen case failed due to changes in libnftnl
@ 2016-09-15 13:42 Liping Zhang
  2016-09-22 15:27 ` Pablo Neira Ayuso
  0 siblings, 1 reply; 2+ messages in thread
From: Liping Zhang @ 2016-09-15 13:42 UTC (permalink / raw)
  To: pablo; +Cc: netfilter-devel, Liping Zhang

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

In nftnl_expr_ng_snprintf_default, format "(%u)" was changed to
"mod %u", so numgen test case failed:
  ...
  '[ numgen reg 1 = inc(2) ]' mismatches '[ numgen reg 1 = inc mod 2 ]'
  ...
  ip/numgen.t: 3 unit tests, 3 error, 0 warning

Signed-off-by: Liping Zhang <liping.zhang@spreadtrum.com>
---
 tests/py/ip/numgen.t.payload | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tests/py/ip/numgen.t.payload b/tests/py/ip/numgen.t.payload
index 1099e73..a548b5c 100644
--- a/tests/py/ip/numgen.t.payload
+++ b/tests/py/ip/numgen.t.payload
@@ -1,6 +1,6 @@
 # ct mark set numgen inc mod 2
 ip test-ip4 pre
-  [ numgen reg 1 = inc(2) ]
+  [ numgen reg 1 = inc mod 2 ]
   [ ct set mark with reg 1 ]
 
 # dnat to numgen inc mod 2 map { 0 : 192.168.10.100, 1 : 192.168.20.200 }
@@ -8,7 +8,7 @@ __map%d x b
 __map%d x 0
         element 00000000  : 640aa8c0 0 [end]    element 01000000  : c814a8c0 0 [end]
 ip test-ip4 pre 
-  [ numgen reg 1 = inc(2) ]
+  [ numgen reg 1 = inc mod 2 ]
   [ lookup reg 1 set __map%d dreg 1 ]
   [ nat dnat ip addr_min reg 1 addr_max reg 0 ]
 
@@ -17,7 +17,7 @@ __map%d test-ip4 f
 __map%d test-ip4 0
         element 00000000  : 640aa8c0 0 [end]    element 06000000  : c814a8c0 0 [end]    element 0a000000  : 1 [end]
 ip test-ip4 pre
-  [ numgen reg 1 = inc(10) ]
+  [ numgen reg 1 = inc mod 10 ]
   [ byteorder reg 1 = hton(reg 1, 4, 4) ]
   [ lookup reg 1 set __map%d dreg 1 ]
   [ nat dnat ip addr_min reg 1 addr_max reg 0 ]
-- 
2.5.5



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

* Re: [PATCH nft] tests: py: fix numgen case failed due to changes in libnftnl
  2016-09-15 13:42 [PATCH nft] tests: py: fix numgen case failed due to changes in libnftnl Liping Zhang
@ 2016-09-22 15:27 ` Pablo Neira Ayuso
  0 siblings, 0 replies; 2+ messages in thread
From: Pablo Neira Ayuso @ 2016-09-22 15:27 UTC (permalink / raw)
  To: Liping Zhang; +Cc: netfilter-devel, Liping Zhang

On Thu, Sep 15, 2016 at 09:42:49PM +0800, Liping Zhang wrote:
> From: Liping Zhang <liping.zhang@spreadtrum.com>
> 
> In nftnl_expr_ng_snprintf_default, format "(%u)" was changed to
> "mod %u", so numgen test case failed:
>   ...
>   '[ numgen reg 1 = inc(2) ]' mismatches '[ numgen reg 1 = inc mod 2 ]'
>   ...
>   ip/numgen.t: 3 unit tests, 3 error, 0 warning

Applied.

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

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

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-15 13:42 [PATCH nft] tests: py: fix numgen case failed due to changes in libnftnl Liping Zhang
2016-09-22 15:27 ` 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).