On Thu, May 18, 2023 at 10:11 PM Mark Michelson <[email protected]> wrote:

> The match used in FORMAT_CT matched on "dst=$1". The problem is that
> if you passed in an IP address like "10.0.0.1", then this could match on
> "10.0.0.1" and "10.0.0.100" for instance. This can allow for unexpected
> entries to show up in the output, causing test failures.
>
> With this change, the match is changed to "dst=$1,", which ensures an
> exact match on the IP address passed in.
>
> Signed-off-by: Mark Michelson <[email protected]>
> ---
>  tests/system-common-macros.at | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tests/system-common-macros.at b/tests/system-common-macros.at
> index e6f204cc1..6b6181e8c 100644
> --- a/tests/system-common-macros.at
> +++ b/tests/system-common-macros.at
> @@ -235,7 +235,7 @@ m4_define([STRIP_MONITOR_CSUM], [grep "csum:" | sed
> 's/csum:.*/csum: <skip>/'])
>  # and limit the output to the rows containing 'ip-addr'.
>  #
>  m4_define([FORMAT_CT],
> -    [[grep -F "dst=$1" | sed -e 's/port=[0-9]*/port=<cleared>/g' -e
> 's/id=[0-9]*/id=<cleared>/g' -e 's/state=[0-9_A-Z]*/state=<cleared>/g' |
> sort | uniq]])
> +    [[grep -F "dst=$1," | sed -e 's/port=[0-9]*/port=<cleared>/g' -e
> 's/id=[0-9]*/id=<cleared>/g' -e 's/state=[0-9_A-Z]*/state=<cleared>/g' |
> sort | uniq]])
>
>  # NETNS_DAEMONIZE([namespace], [command], [pidfile])
>  #
> --
> 2.39.2
>
> _______________________________________________
> dev mailing list
> [email protected]
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
>
>
Looks good to me, thanks.

Acked-by: Ales Musil <[email protected]>

-- 

Ales Musil

Senior Software Engineer - OVN Core

Red Hat EMEA <https://www.redhat.com>

[email protected]    IM: amusil
<https://red.ht/sig>
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to