Skip to content

Commit 961799b

Browse files
authored
Add multi-asic support for test-intf-fec (sonic-net#17814)
Description of PR Summary: Add multi ASIC support for test-intf-fec. This is possible with the utility command update in sonic-net/sonic-utilities#3819 Fixes # (issue) 28838870 Approach What is the motivation for this PR? Described How did you do it? Update the command from sonic-net/sonic-utilities#3819 and update the code base so that works with T2. For 202405 Please note that for a release branch to work internally, the following PR here needs to be included: sonic-net#17183 sonic-net#14661 sonic-net#16424 sonic-net#15481 How did you verify/test it? T2 platform verified Signed-off-by: Austin Pham <[email protected]> --------- Signed-off-by: Austin Pham <[email protected]>
1 parent e5571cf commit 961799b

1 file changed

Lines changed: 9 additions & 4 deletions

File tree

tests/platform_tests/test_intf_fec.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
"mlnx_msn",
1616
"8101_32fh",
1717
"8111_32eh",
18-
"arista"
18+
"arista",
19+
"x86_64-88_lc0_36fh_m-r0"
1920
]
2021

2122
SUPPORTED_SPEEDS = [
@@ -78,8 +79,10 @@ def test_config_fec_oper_mode(duthosts, enum_rand_one_per_hwsku_frontend_hostnam
7879
if fec_mode == "n/a":
7980
pytest.fail("FEC status is N/A for interface {}".format(intf))
8081

81-
config_status = duthost.command("sudo config interface fec {} {}"
82-
.format(intf, fec_mode))
82+
asic_cli_option = duthost.get_port_asic_instance(intf).cli_ns_option
83+
84+
config_status = duthost.command("sudo config interface {} fec {} {}"
85+
.format(asic_cli_option, intf, fec_mode))
8386
if config_status:
8487
pytest_assert(wait_until(30, 2, 0, duthost.is_interface_status_up, intf),
8588
"Interface {} did not come up after configuring FEC mode".format(intf))
@@ -177,7 +180,9 @@ def get_fec_histogram(duthost, intf_name):
177180
"""
178181
try:
179182
logging.info("Get output of 'show interfaces counters fec-histogram {}'".format(intf_name))
180-
fec_hist = duthost.show_and_parse("show interfaces counters fec-histogram {}".format(intf_name))
183+
asic_cli_option = duthost.get_port_asic_instance(intf_name).cli_ns_option
184+
fec_hist = duthost.show_and_parse("show interfaces counters fec-histogram {} {}".format(asic_cli_option,
185+
intf_name))
181186
except Exception as e:
182187
logging.error("Failed to execute 'show interfaces counters fec-histogram {}': {}".format(intf_name, e))
183188
pytest.skip("Command 'show interfaces counters fec-histogram {}' not found \

0 commit comments

Comments
 (0)