mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
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:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user