Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

selftests: net: make ovs-dpctl.py fail when pyroute2 is unsupported

The pmtu.sh kselftest configures OVS using ovs-dpctl.py and falls back
to ovs-vsctl only when ovs-dpctl.py fails. However, ovs-dpctl.py exits
with a success status when the installed pyroute2 package version is
lower than 0.6, even though the OVS datapath is not configured.

As a result, pmtu.sh assumes that the setup was successful and
continues running the test, which later fails due to the missing
OVS configuration.

Fix the exit code handling in ovs-dpctl.py so that pmtu.sh can detect
that the setup did not complete successfully and fall back to
ovs-vsctl.

Signed-off-by: Aleksei Oladko <aleksey.oladko@virtuozzo.com>
Reviewed-by: Aaron Conole <aconole@redhat.com>
Link: https://patch.msgid.link/20260306000127.519064-3-aleksey.oladko@virtuozzo.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Aleksei Oladko and committed by
Jakub Kicinski
0bcac7b1 f4ac0cc8

+1 -1
+1 -1
tools/testing/selftests/net/openvswitch/ovs-dpctl.py
··· 2583 2583 prverscheck = pyroute2.__version__.split(".") 2584 2584 if int(prverscheck[0]) == 0 and int(prverscheck[1]) < 6: 2585 2585 print("Need to upgrade the python pyroute2 package to >= 0.6.") 2586 - sys.exit(0) 2586 + sys.exit(1) 2587 2587 2588 2588 parser = argparse.ArgumentParser() 2589 2589 parser.add_argument(