Skip to content

Commit

Permalink
Move the lossy skip condition above. (#15096)
Browse files Browse the repository at this point in the history
Description of PR
Summary:
The skip for non-single-asic variant for the test:qos/test_qos_sai.py::ttestQosSaiPgSharedWatermark[wm_pg_shared_lossy] was added by #14892 in the wrong location. We need to move this skip before it checks for the wm_pg_shared_lossy key.

Approach
What is the motivation for this PR?
The keyerror addressed in the PR:#14892 is still occuring, since the skip was added after the Key checking code. This PR moves it up above the Keychecking code.

How did you do it?
Moved the skip block above.

How did you verify/test it?
Ran it on my TB:

co-authorized by: [email protected]
  • Loading branch information
rraghav-cisco authored Oct 30, 2024
1 parent a97f4a7 commit 6acc725
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tests/qos/test_qos_sai.py
Original file line number Diff line number Diff line change
Expand Up @@ -1610,6 +1610,12 @@ def testQosSaiPgSharedWatermark(
else:
qosConfig = dutQosConfig["param"]

if dutTestParams["basicParams"].get("platform_asic", None) \
== "cisco-8000":
if not get_src_dst_asic_and_duts['single_asic_test']:
if pgProfile == "wm_pg_shared_lossy":
pytest.skip("The lossy test is not valid for multiAsic configuration.")

if "wm_pg_shared_lossless" in pgProfile:
pktsNumFillShared = qosConfig[pgProfile]["pkts_num_trig_pfc"]
elif "wm_pg_shared_lossy" in pgProfile:
Expand All @@ -1620,12 +1626,6 @@ def testQosSaiPgSharedWatermark(
pktsNumFillShared = int(
qosConfig[pgProfile]["pkts_num_trig_egr_drp"]) - 1

if dutTestParams["basicParams"].get("platform_asic", None) \
== "cisco-8000":
if not get_src_dst_asic_and_duts['single_asic_test']:
if pgProfile == "wm_pg_shared_lossy":
pytest.skip("The lossy test is not valid for multiAsic configuration.")

self.updateTestPortIdIp(dutConfig, get_src_dst_asic_and_duts)

testParams = dict()
Expand Down

0 comments on commit 6acc725

Please sign in to comment.