tests: Make ovs setup idempotent

Try and delete the bridge if it exists before setting up for the test.
This prevents cascading failures where if the test fails once any
subsequent run of the test will fail during the setup.

Signed-off-by: Rob Bradford <rbradford@meta.com>
This commit is contained in:
Rob Bradford
2026-05-07 14:21:32 +01:00
parent 1a74c666e5
commit 05fd26b601

View File

@@ -337,6 +337,9 @@ pub(crate) fn setup_ovs_dpdk() {
);
assert!(exec_host_command_status("service openvswitch-switch restart").success());
// Clean up any stale bridge from a previous failed run
exec_host_command_status("ovs-vsctl --if-exists del-br ovsbr0");
// Create OVS-DPDK bridge and ports
assert!(
exec_host_command_status(