Skip to content

Commit

Permalink
mixed-speed addition in variable.py file
Browse files Browse the repository at this point in the history
  • Loading branch information
amitpawar12 committed Oct 30, 2024
1 parent 3d2dd43 commit ec6f306
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -298,8 +298,9 @@ def run_pfc_test(api,
# Check for lossless and lossy stream percentage drop for a given tolerance limit.
lossless_drop = round((1 - float(test_stats['tgen_lossless_rx_pkts']) / test_stats['tgen_lossless_tx_pkts']), 2)
lossy_drop = round((1 - float(test_stats['tgen_lossy_rx_pkts']) / test_stats['tgen_lossy_tx_pkts']), 2)
logger.info('Lossless Drop %:{}, Lossy Drop %:{}'.format(lossless_drop, lossy_drop))
pytest_assert((lossless_drop*100) <= test_check['lossless'], 'Lossless packet drop outside tolerance limit')
logger.info('Lossless Drop %:{}, Lossy Drop %:{}'.format(lossless_drop*100, lossy_drop*100))
if test_def['enable_pfcwd']:
pytest_assert((lossless_drop*100) <= test_check['lossless'], 'Lossless packet drop outside tolerance limit')
pytest_assert((lossy_drop*100) <= test_check['lossy'], 'Lossy packet drop outside tolerance limit')

# Checking if the actual line rate on egress is within tolerable limit of egress line speed.
Expand Down
13 changes: 12 additions & 1 deletion tests/snappi_tests/variables.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,18 @@
}
})
)}

MIXED_SPEED_PORT_INFO = {MULTIDUT_TESTBED: (
({
'multiple-dut-any-asic': {
'rx_ports': [
{'port_name': 'Ethernet0', 'hostname': "sonic-s6100-dut1"}
],
'tx_ports': [
{'port_name': 'Ethernet0', 'hostname': "sonic-s6100-dut2"}
]
}
})
)}
'''
In this file user can modify the line_card_choice and it chooses the corresponding hostname
and asic values from the config_set hostnames can be modified according to the dut hostname mentioned
Expand Down

0 comments on commit ec6f306

Please sign in to comment.