From 8bbf030baa8169312e81c5a43a5ee2adfeb925d5 Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Tue, 12 Jan 2016 16:38:19 +0100 Subject: tests/py: don't test log statement from protocol match I think this unit tests should be self-contained at some level. The shell/ directory should be used to catch regressions at ruleset level, ie. these kind of combinations. Another motivation is that I want that netdev/ingress gets tested (coming in a follow up patch), and we don't support log there yet, so I would need to skip this test for that case. Signed-off-by: Pablo Neira Ayuso --- tests/py/ip6/ip6.t | 4 ++-- tests/py/ip6/ip6.t.payload.inet | 6 ++---- tests/py/ip6/ip6.t.payload.ip6 | 6 ++---- 3 files changed, 6 insertions(+), 10 deletions(-) (limited to 'tests/py/ip6') diff --git a/tests/py/ip6/ip6.t b/tests/py/ip6/ip6.t index ceb2a823..96366721 100644 --- a/tests/py/ip6/ip6.t +++ b/tests/py/ip6/ip6.t @@ -37,7 +37,7 @@ ip6 length != 33-45;ok ip6 length { 33-55};ok - ip6 length != { 33-55};ok -ip6 nexthdr {udp, ah, comp, udplite, tcp, dccp, sctp} log;ok;ip6 nexthdr { 132, 51, 108, 136, 17, 33, 6} log +ip6 nexthdr {udp, ah, comp, udplite, tcp, dccp, sctp};ok;ip6 nexthdr { 132, 51, 108, 136, 17, 33, 6} ip6 nexthdr {esp, ah, comp, udp, udplite, tcp, dccp, sctp, icmpv6};ok;ip6 nexthdr { 6, 136, 108, 33, 50, 17, 132, 58, 51} - ip6 nexthdr != {esp, ah, comp, udp, udplite, tcp, dccp, sctp, icmpv6};ok ip6 nexthdr esp;ok;ip6 nexthdr 50 @@ -47,7 +47,7 @@ ip6 nexthdr { 33-44};ok ip6 nexthdr 33-44;ok ip6 nexthdr != 33-44;ok -ip6 hoplimit 1 log;ok +ip6 hoplimit 1;ok ip6 hoplimit != 233;ok ip6 hoplimit 33-45;ok ip6 hoplimit != 33-45;ok diff --git a/tests/py/ip6/ip6.t.payload.inet b/tests/py/ip6/ip6.t.payload.inet index b4fd2779..4bafb267 100644 --- a/tests/py/ip6/ip6.t.payload.inet +++ b/tests/py/ip6/ip6.t.payload.inet @@ -72,7 +72,7 @@ inet test-inet input [ payload load 2b @ network header + 4 => reg 1 ] [ lookup reg 1 set set%d ] -# ip6 nexthdr {udp, ah, comp, udplite, tcp, dccp, sctp} log +# ip6 nexthdr {udp, ah, comp, udplite, tcp, dccp, sctp} set%d test-inet 3 set%d test-inet 0 element 00000011 : 0 [end] element 00000033 : 0 [end] element 0000006c : 0 [end] element 00000088 : 0 [end] element 00000006 : 0 [end] element 00000021 : 0 [end] element 00000084 : 0 [end] @@ -81,7 +81,6 @@ inet test-inet input [ cmp eq reg 1 0x0000000a ] [ payload load 1b @ network header + 6 => reg 1 ] [ lookup reg 1 set set%d ] - [ log prefix (null) ] # ip6 nexthdr {esp, ah, comp, udp, udplite, tcp, dccp, sctp, icmpv6} set%d test-inet 3 @@ -133,13 +132,12 @@ inet test-inet input [ cmp lt reg 1 0x00000021 ] [ cmp gt reg 1 0x0000002c ] -# ip6 hoplimit 1 log +# ip6 hoplimit 1 inet test-inet input [ meta load nfproto => reg 1 ] [ cmp eq reg 1 0x0000000a ] [ payload load 1b @ network header + 7 => reg 1 ] [ cmp eq reg 1 0x00000001 ] - [ log prefix (null) ] # ip6 hoplimit != 233 inet test-inet input diff --git a/tests/py/ip6/ip6.t.payload.ip6 b/tests/py/ip6/ip6.t.payload.ip6 index d355adae..c6e856cc 100644 --- a/tests/py/ip6/ip6.t.payload.ip6 +++ b/tests/py/ip6/ip6.t.payload.ip6 @@ -54,14 +54,13 @@ ip6 test-ip6 input [ payload load 2b @ network header + 4 => reg 1 ] [ lookup reg 1 set set%d ] -# ip6 nexthdr {udp, ah, comp, udplite, tcp, dccp, sctp} log +# ip6 nexthdr {udp, ah, comp, udplite, tcp, dccp, sctp} set%d test-ip6 3 set%d test-ip6 0 element 00000011 : 0 [end] element 00000033 : 0 [end] element 0000006c : 0 [end] element 00000088 : 0 [end] element 00000006 : 0 [end] element 00000021 : 0 [end] element 00000084 : 0 [end] ip6 test-ip6 input [ payload load 1b @ network header + 6 => reg 1 ] [ lookup reg 1 set set%d ] - [ log prefix (null) ] # ip6 nexthdr {esp, ah, comp, udp, udplite, tcp, dccp, sctp, icmpv6} set%d test-ip6 3 @@ -101,11 +100,10 @@ ip6 test-ip6 input [ cmp lt reg 1 0x00000021 ] [ cmp gt reg 1 0x0000002c ] -# ip6 hoplimit 1 log +# ip6 hoplimit 1 ip6 test-ip6 input [ payload load 1b @ network header + 7 => reg 1 ] [ cmp eq reg 1 0x00000001 ] - [ log prefix (null) ] # ip6 hoplimit != 233 ip6 test-ip6 input -- cgit v1.2.3