mbox series

[net,0/4] selftests: openvswitch: Minor fixes for some systems

Message ID 20231006151258.983906-1-aconole@redhat.com
Headers show
Series selftests: openvswitch: Minor fixes for some systems | expand

Message

Aaron Conole Oct. 6, 2023, 3:12 p.m. UTC
A number of corner cases were caught when trying to run the selftests on
older systems.  Missed skip conditions, some error cases, and outdated
python setups would all report failures but the issue would actually be
related to some other condition rather than the selftest suite.

Address these individual cases.

Aaron Conole (4):
  selftests: openvswitch: Add version check for pyroute2
  selftests: openvswitch: Catch cases where the tests are killed
  selftests: openvswitch: Skip drop testing on older kernels
  selftests: openvswitch: Fix the ct_tuple for v4

 .../selftests/net/openvswitch/openvswitch.sh  | 21 ++++++++-
 .../selftests/net/openvswitch/ovs-dpctl.py    | 46 ++++++++++++++++++-
 2 files changed, 65 insertions(+), 2 deletions(-)

Comments

Paolo Abeni Oct. 10, 2023, 10:29 a.m. UTC | #1
On Fri, 2023-10-06 at 11:12 -0400, Aaron Conole wrote:
> Kernels that don't have support for openvswitch drop reasons also
> won't have the drop counter reasons, so we should skip the test
> completely.  It previously wasn't possible to build a test case
> for this without polluting the datapath, so we introduce a mechanism
> to clear all the flows from a datapath allowing us to test for
> explicit drop actions, and then clear the flows to build the
> original test case.
> 
> Fixes: 4242029164d6 ("selftests: openvswitch: add explicit drop testcase")
> Signed-off-by: Aaron Conole <aconole@redhat.com>
> ---
>  .../selftests/net/openvswitch/openvswitch.sh  | 17 ++++++++++
>  .../selftests/net/openvswitch/ovs-dpctl.py    | 34 +++++++++++++++++++
>  2 files changed, 51 insertions(+)
> 
> diff --git a/tools/testing/selftests/net/openvswitch/openvswitch.sh b/tools/testing/selftests/net/openvswitch/openvswitch.sh
> index 2a0112be7ead5..ca7090e71bff2 100755
> --- a/tools/testing/selftests/net/openvswitch/openvswitch.sh
> +++ b/tools/testing/selftests/net/openvswitch/openvswitch.sh
> @@ -144,6 +144,12 @@ ovs_add_flow () {
>  	return 0
>  }
>  
> +ovs_del_flows () {
> +	info "Deleting all flows from DP: sbx:$1 br:$2"
> +	ovs_sbx "$1" python3 $ovs_base/ovs-dpctl.py del-flows "$2"
> +        return 0

The chunk above mixes whitespaces and tabs for indenting, please be
consistent.


Thanks!

Paolo
Paolo Abeni Oct. 10, 2023, 10:31 a.m. UTC | #2
On Fri, 2023-10-06 at 11:12 -0400, Aaron Conole wrote:
> Caught during code review.

Since there are a few other small things, please additionally expand
this changelog briefly describing the addressed problem and it's
consequences.

Thanks,

Paolo
Aaron Conole Oct. 11, 2023, 1:41 p.m. UTC | #3
Paolo Abeni <pabeni@redhat.com> writes:

> On Fri, 2023-10-06 at 11:12 -0400, Aaron Conole wrote:
>> Caught during code review.
>
> Since there are a few other small things, please additionally expand
> this changelog briefly describing the addressed problem and it's
> consequences.

ACK.  will fix in v2.  Thanks Paolo!

> Thanks,
>
> Paolo