diff mbox series

[ovs-dev] tests: Fix wrong IPv6 notation.

Message ID 20240724062350.1134387-1-amusil@redhat.com
State Accepted
Headers show
Series [ovs-dev] tests: Fix wrong IPv6 notation. | expand

Checks

Context Check Description
ovsrobot/apply-robot success apply and check: success
ovsrobot/github-robot-_ovn-kubernetes success github build: passed
ovsrobot/github-robot-_Build_and_Test fail github build: failed

Commit Message

Ales Musil July 24, 2024, 6:23 a.m. UTC
Fix wrong IPv6 notation which could result in test failures when
the DNS server was slow to respond as scapy tried to resolve the
IPv6 as hostname.

scapy-server | ERR | failed to process payload request: [Errno -2] Name or service not known

Fixes: 21e85be04226 ("tests: Use fmt_pkt in portsecurity : 3 HVs, 1 LS, 3 lports/HV.")
Signed-off-by: Ales Musil <amusil@redhat.com>
---
 tests/ovn.at | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Ilya Maximets July 24, 2024, 8:44 p.m. UTC | #1
On 7/24/24 08:23, Ales Musil wrote:
> Fix wrong IPv6 notation which could result in test failures when
> the DNS server was slow to respond as scapy tried to resolve the
> IPv6 as hostname.
> 
> scapy-server | ERR | failed to process payload request: [Errno -2] Name or service not known
> 
> Fixes: 21e85be04226 ("tests: Use fmt_pkt in portsecurity : 3 HVs, 1 LS, 3 lports/HV.")
> Signed-off-by: Ales Musil <amusil@redhat.com>
> ---
>  tests/ovn.at | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tests/ovn.at b/tests/ovn.at
> index 13b393932..2826a03ff 100644
> --- a/tests/ovn.at
> +++ b/tests/ovn.at
> @@ -5882,7 +5882,7 @@ for i in 1 2 3; do
>      test_icmpv6 ${i}3 f0:00:00:00:0${i}:${i}3 f0:00:00:00:00:21 $sip ff02::16:0 "ICMPv6EchoRequest()"
>  
>      # should be dropped
> -    sip=ae80::ea2aeafffe2800aa
> +    sip=ae80::ea2a:eaff:fe28:00aa
>      test_ipv6 ${i}3 f0:00:00:00:0${i}:${i}3 f0:00:00:00:00:21 $sip $tip
>  done
>  

Hmm.  Does it return the IP address after DNS lookup fails?
If not, why the test doesn't fail in this case?

Bets regards, Ilya Maximets.
Ales Musil July 25, 2024, 5:28 a.m. UTC | #2
On Wed, Jul 24, 2024 at 10:44 PM Ilya Maximets <i.maximets@ovn.org> wrote:

> On 7/24/24 08:23, Ales Musil wrote:
> > Fix wrong IPv6 notation which could result in test failures when
> > the DNS server was slow to respond as scapy tried to resolve the
> > IPv6 as hostname.
> >
> > scapy-server | ERR | failed to process payload request: [Errno -2] Name
> or service not known
> >
> > Fixes: 21e85be04226 ("tests: Use fmt_pkt in portsecurity : 3 HVs, 1 LS,
> 3 lports/HV.")
> > Signed-off-by: Ales Musil <amusil@redhat.com>
> > ---
> >  tests/ovn.at | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/tests/ovn.at b/tests/ovn.at
> > index 13b393932..2826a03ff 100644
> > --- a/tests/ovn.at
> > +++ b/tests/ovn.at
> > @@ -5882,7 +5882,7 @@ for i in 1 2 3; do
> >      test_icmpv6 ${i}3 f0:00:00:00:0${i}:${i}3 f0:00:00:00:00:21 $sip
> ff02::16:0 "ICMPv6EchoRequest()"
> >
> >      # should be dropped
> > -    sip=ae80::ea2aeafffe2800aa
> > +    sip=ae80::ea2a:eaff:fe28:00aa
> >      test_ipv6 ${i}3 f0:00:00:00:0${i}:${i}3 f0:00:00:00:00:21 $sip $tip
> >  done
> >
>
> Hmm.  Does it return the IP address after DNS lookup fails?
> If not, why the test doesn't fail in this case?
>
> Bets regards, Ilya Maximets.
>
>
It doesn't return IP and the test does't fail because it expects
that nothing gets through anyway in case of this IP.

Regards,
Ales
Ilya Maximets July 25, 2024, 12:14 p.m. UTC | #3
On 7/25/24 07:28, Ales Musil wrote:
> 
> 
> On Wed, Jul 24, 2024 at 10:44 PM Ilya Maximets <i.maximets@ovn.org <mailto:i.maximets@ovn.org>> wrote:
> 
>     On 7/24/24 08:23, Ales Musil wrote:
>     > Fix wrong IPv6 notation which could result in test failures when
>     > the DNS server was slow to respond as scapy tried to resolve the
>     > IPv6 as hostname.
>     >
>     > scapy-server | ERR | failed to process payload request: [Errno -2] Name or service not known
>     >
>     > Fixes: 21e85be04226 ("tests: Use fmt_pkt in portsecurity : 3 HVs, 1 LS, 3 lports/HV.")
>     > Signed-off-by: Ales Musil <amusil@redhat.com <mailto:amusil@redhat.com>>
>     > ---
>     >  tests/ovn.at <http://ovn.at> | 2 +-
>     >  1 file changed, 1 insertion(+), 1 deletion(-)
>     >
>     > diff --git a/tests/ovn.at <http://ovn.at> b/tests/ovn.at <http://ovn.at>
>     > index 13b393932..2826a03ff 100644
>     > --- a/tests/ovn.at <http://ovn.at>
>     > +++ b/tests/ovn.at <http://ovn.at>
>     > @@ -5882,7 +5882,7 @@ for i in 1 2 3; do
>     >      test_icmpv6 ${i}3 f0:00:00:00:0${i}:${i}3 f0:00:00:00:00:21 $sip ff02::16:0 "ICMPv6EchoRequest()"
>     > 
>     >      # should be dropped
>     > -    sip=ae80::ea2aeafffe2800aa
>     > +    sip=ae80::ea2a:eaff:fe28:00aa
>     >      test_ipv6 ${i}3 f0:00:00:00:0${i}:${i}3 f0:00:00:00:00:21 $sip $tip
>     >  done
>     > 
> 
>     Hmm.  Does it return the IP address after DNS lookup fails?
>     If not, why the test doesn't fail in this case?
> 
>     Bets regards, Ilya Maximets.
> 
> 
> It doesn't return IP and the test does't fail because it expects
> that nothing gets through anyway in case of this IP.

Okay.  I guess, this particular patch is fine as-is, so:

Acked-by: Ilya Maximets <i.maximets@ovn.org>


However, there is a larger problem that OVN tests do a huge amount
of stuff without checking that commands actually worked.  And the
logs are also not being checked at the end.

In this particular case, it is important to check that the packet
was actually sent, since we're testing the non-delivery.

Best regards, Ilya Maximets.
diff mbox series

Patch

diff --git a/tests/ovn.at b/tests/ovn.at
index 13b393932..2826a03ff 100644
--- a/tests/ovn.at
+++ b/tests/ovn.at
@@ -5882,7 +5882,7 @@  for i in 1 2 3; do
     test_icmpv6 ${i}3 f0:00:00:00:0${i}:${i}3 f0:00:00:00:00:21 $sip ff02::16:0 "ICMPv6EchoRequest()"
 
     # should be dropped
-    sip=ae80::ea2aeafffe2800aa
+    sip=ae80::ea2a:eaff:fe28:00aa
     test_ipv6 ${i}3 f0:00:00:00:0${i}:${i}3 f0:00:00:00:00:21 $sip $tip
 done