[tests]: Remove mirror destination route correctly - #4786
Conversation
Delete the routed destination prefix installed by the test so the Ethernet32 router interface is no longer retained across IPv4 and IPv6 cases. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: b6b568a1-5d2a-4309-b1ac-ef21ca155079 Signed-off-by: Xichen96 <lukelin0907@gmail.com>
|
/azp run |
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
There was a problem hiding this comment.
Pull request overview
This PR fixes cleanup in the test_MirrorDestMoveVlan test so it deletes the exact static route the test installs (port_ip_prefix) rather than attempting to delete the VLAN interface’s connected prefix (vlan_intf_addr). This prevents stale route state from keeping the Ethernet32 router interface referenced across the IPv4→IPv6 subtest sequence.
Changes:
- Update
test_MirrorDestMoveVlanteardown to callremove_route(dvs, port_ip_prefix)(matching the earlieradd_route(dvs, port_ip_prefix, ...)).
|
Retrying CI once: build 1173115 ASAN compile hit the 60-minute agent limit, and regular vstest failed before pytest when host preflight sudo ip link del Vrf1 segfaulted (exit 139) on agent sonictest002E9A. |
|
/azp run |
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
|
/azpw run |
|
Retrying failed(or canceled) jobs... |
|
Retrying failed(or canceled) stages in build 1173264: ✅Stage TestAsan:
✅Stage Test:
|
What I did
Corrected
test_MirrorDestMoveVlancleanup to removeport_ip_prefix, the static route installed by the test, instead of attempting to remove the unrelated VLAN interface prefix.Why I did it
The stale route keeps the
Ethernet32router interface referenced after the IPv4 case. The following IPv6 case can then inherit stale mirror-session state or fail interface recreation, especially when removal retry fencing is enabled.How I verified it
PR CI only. The existing test covers both IPv4 and IPv6 paths and now removes the exact prefix each path installs.
Details if related
Observed while investigating repeated
test_MirrorDestMoveVlanfailures in #4746. This cleanup defect predates and is separate from that product change.Work item tracking