Skip to content

Commit

Permalink
[chassis][voq] fix for voq fabric related tests (sonic-net#16068)
Browse files Browse the repository at this point in the history
What is the motivation for this PR?
Fixing issue 16067.

How did you do it?
Changed to not re-write originalIsolateStatus but instead write to isolateStatus.
Also added try/catch block to both tests as today if the test fails it exits without restoring the state of the port.

I also added check to tests/voq/test_fabric_reach.py::test_fabric_reach_supervisor to run against only if asic is present. Right not the tests get the max asics for the platform and assumes they are all present.

How did you verify/test it?
Ran against t2 Nokia chassis
  • Loading branch information
rawal01 authored and yaqiangz committed Dec 31, 2024
1 parent 1574885 commit 7cf8cf8
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions tests/common/plugins/sanity_check/recover.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,10 +163,12 @@ def adaptive_recover(dut, localhost, fanouthosts, nbrhosts, tbinfo, check_result
action = _recover_services(dut, result)
elif result['check_item'] == 'bgp':
# If there is only default route missing issue, only need to re-announce routes to recover
if ("no_v4_default_route" in result['bgp'] and len(result['bgp']) == 1 or
"no_v6_default_route" in result['bgp'] and len(result['bgp']) == 1 or
# Currently only support single asic
if (dut.facts["num_asic"] == 1 and
("no_v4_default_route" in result['bgp'] and len(result['bgp']) == 1 or
"no_v6_default_route" in result['bgp'] and len(result['bgp']) == 1 or
("no_v4_default_route" in result['bgp'] and "no_v6_default_route" in result['bgp'] and
len(result['bgp']) == 2)):
len(result['bgp']) == 2))):
action = re_announce_routes(localhost, tbinfo["topo"]["name"], tbinfo["ptf_ip"])
else:
action = neighbor_vm_restore(dut, nbrhosts, tbinfo, result)
Expand Down

0 comments on commit 7cf8cf8

Please sign in to comment.