selftests: openvswitch: Skip drop testing on older kernels
authorAaron Conole <aconole@redhat.com>
Wed, 11 Oct 2023 19:49:38 +0000 (15:49 -0400)
committerDavid S. Miller <davem@davemloft.net>
Sun, 15 Oct 2023 19:02:51 +0000 (20:02 +0100)
commit76035fd12cb9046be00ffb9d4262b5b3277d5068
tree9807c839c94881fdabb0f23b399b56f8bafba33c
parentaf846afad5ca1c1a24d320adf9e48255e97db84e
selftests: openvswitch: Skip drop testing on older kernels

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>
Signed-off-by: David S. Miller <davem@davemloft.net>
tools/testing/selftests/net/openvswitch/openvswitch.sh
tools/testing/selftests/net/openvswitch/ovs-dpctl.py