On Wed, Jul 2, 2025 at 11:49 AM Xavier Simonart via dev <
ovs-dev@openvswitch.org> wrote:

> When a multinode test was failing, there were little or no logs
> available.
> Logs are added whether the test succeeds or not.
> Except if requested (by -d option), test result folder for a test is
> anyway removed if the test succeeds, so this patch will not dramatically
> increase the size/number of logs.
>
> Signed-off-by: Xavier Simonart <xsimo...@redhat.com>
> ---
>  tests/multinode-macros.at |  4 ++++
>  tests/multinode.at        | 10 ----------
>  2 files changed, 4 insertions(+), 10 deletions(-)
>
> diff --git a/tests/multinode-macros.at b/tests/multinode-macros.at
> index 1346f17ce..3f610f2e0 100644
> --- a/tests/multinode-macros.at
> +++ b/tests/multinode-macros.at
> @@ -84,6 +84,10 @@ check_fake_multinode_setup_by_nodes() {
>      for c in $1
>      do
>          AT_CHECK([m_as $c ovn-appctl -t ovn-controller version], [0],
> [ignore])
> +        on_exit "m_as $c ovs-vsctl list Interface > interfaces-${c}.txt"
> +        on_exit "m_as $c ovs-vsctl show > ovs-${chassis}.txt"
> +        on_exit "m_as $c ovs-ofctl dump-flows br-int > flow-${c}.txt"
> +        on_exit "m_as $c ovs-vsctl get open . external_ids >
> extids-${c}.txt"
>      done
>  }
>
> diff --git a/tests/multinode.at b/tests/multinode.at
> index 1a91de4ee..0991b0e39 100644
> --- a/tests/multinode.at
> +++ b/tests/multinode.at
> @@ -3124,15 +3124,6 @@ m_as ovn-gw-2 ovn-appctl vlog/set vconn:dbg
>  m_as ovn-gw-1 ovn-appctl vlog/disable-rate-limit
>  m_as ovn-gw-2 ovn-appctl vlog/disable-rate-limit
>
> -# Add some logs in case the test fails.
> -export test_success=0
> -for chassis in ovn-gw-1 ovn-gw-2 ovn-chassis-1 ovn-chassis-2; do
> -    on_exit "if test $test_success != 1; then m_as $chassis ovs-vsctl
> list Interface > interfaces-${chassis}.txt; fi"
> -    on_exit "if test $test_success != 1; then m_as $chassis ovs-vsctl
> show > ovs-${chassis}.txt; fi"
> -    on_exit "if test $test_success != 1; then m_as $chassis ovs-ofctl
> dump-flows br-int > flow-${chassis}.txt; fi"
> -    on_exit "if test $test_success != 1; then m_as $chassis ovs-vsctl get
> open . external_ids > extids-${chassis}.txt; fi"
> -done
> -
>  check_fake_multinode_setup_by_nodes 'ovn-chassis-1 ovn-chassis-2 ovn-gw-1
> ovn-gw-2'
>
>  # Delete the multinode NB and OVS resources before starting the test.
> @@ -3413,6 +3404,5 @@ gw2_rep=$(grep -c "ICMP echo reply" gw2.tcpdump)
>  echo "$n1 claims in gw1 and $n2 in gw2"
>  echo "ch2_request=$ch2_req gw1_request=$gw1_req gw2_request=$gw2_req
> ch1_request=$ch1_req ch1_reply=$ch1_rep gw1_reply=$gw1_rep
> gw2_reply=$gw2_rep ch2_reply=$ch2_rep"
>
> -export test_success=1
>  AT_CLEANUP
>  ])
> --
> 2.47.1
>
> _______________________________________________
> dev mailing list
> d...@openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
>
>
Thank you Xavier,

I went ahead and merged this into main and backported to 25.03.

Regards,
Ales
_______________________________________________
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to