Skip to content

Commit 5d433e9

Browse files
XuChen-MSFTwangxin
authored andcommitted
[QoS] fix FDB aging in dualtor's qos sai test (#7819)
* refresh arp entry per testcase * Revert "refresh arp entry per testcase" This reverts commit 21f72cc. * to match with mux cable toggle behavior, force lower tor as test target testbed * clear arp and fdb before populate arp entries
1 parent 2b9944e commit 5d433e9

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

tests/qos/qos_sai_base.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1146,7 +1146,7 @@ def __deleteTmpSwitchConfig(self, duthost):
11461146
duthost.file(path=file["path"], state="absent")
11471147

11481148
@pytest.fixture(scope='class', autouse=True)
1149-
def handleFdbAging(self, duthosts, enum_rand_one_per_hwsku_frontend_hostname):
1149+
def handleFdbAging(self, tbinfo, duthosts, lower_tor_host, enum_rand_one_per_hwsku_frontend_hostname):
11501150
"""
11511151
Disable FDB aging and reenable at the end of tests
11521152
@@ -1159,7 +1159,10 @@ def handleFdbAging(self, duthosts, enum_rand_one_per_hwsku_frontend_hostname):
11591159
Returns:
11601160
None
11611161
"""
1162-
duthost = duthosts[enum_rand_one_per_hwsku_frontend_hostname]
1162+
if 'dualtor' in tbinfo['topo']['name']:
1163+
duthost = lower_tor_host
1164+
else:
1165+
duthost = duthosts[enum_rand_one_per_hwsku_frontend_hostname]
11631166
fdbAgingTime = 0
11641167

11651168
self.__deleteTmpSwitchConfig(duthost)
@@ -1210,6 +1213,10 @@ def populateArpEntries(
12101213
duthost = duthosts[enum_rand_one_per_hwsku_frontend_hostname]
12111214

12121215
dut_asic = duthost.asic_instance(enum_frontend_asic_index)
1216+
1217+
dut_asic.command('sonic-clear fdb all')
1218+
dut_asic.command('sonic-clear arp')
1219+
12131220
saiQosTest = None
12141221
if dutTestParams["topo"] in self.SUPPORTED_T0_TOPOS:
12151222
saiQosTest = "sai_qos_tests.ARPpopulate"

0 commit comments

Comments
 (0)