Skip to content

[pytest][Multi ASIC] Add multi ASIC test for QoS DSCP verification on backend ASICs#3254

Merged
smaheshm merged 8 commits intosonic-net:masterfrom
smaheshm:pfca
Jun 11, 2021
Merged

[pytest][Multi ASIC] Add multi ASIC test for QoS DSCP verification on backend ASICs#3254
smaheshm merged 8 commits intosonic-net:masterfrom
smaheshm:pfca

Conversation

@smaheshm
Copy link
Copy Markdown
Contributor

@smaheshm smaheshm commented Mar 31, 2021

Description of PR

Added multi ASIC test for QoS DSCP verification on backend ASICs. Test is not applicable to single ASIC platforms.

Summary:
Fixes # (issue)

Type of change

  • Bug fix
  • Testbed and Framework(new/improvement)
  • Test case(new/improvement)

Approach

What is the motivation for this PR?

New QoS DSCP test case to verify on backend ASICs on multi ASIC platform

How did you do it?

The majority of the code changes is to identify the tx and rx ports on a backend ASIC.

Added parameterization for backend ASICs so the test runs for each backend ASIC. Following are the steps to identify tx and rx ports.

  • Find the source and destination ASIC, these should be separate ASICs so that traffic gets forwarded by backend ASICs.
  • On the source ASIC shutdown the backend ASIC IFs to all backedn ASICs except the one under test. This ensures traffic is forwarded by the ASIC under test.
  • Send a burst of packets to identify the tx and rx ports on the backend ASIC under test.
  • Pass these ports to saitest to perform DSCP test.

How did you verify/test it?

samaddik@svcstr-server-2:/var/sonic-mgmt/tests$ pytest --count=2 qos/test_qos_sai.py  --testbed=vmsvc1-t1-n3164-acs-1 --inventory=../ansible/strsvc  --testbed_file=../ansible/testbed.csv --host-pattern=svcstr-n3164-acs-1  --module-path=../ansible/library --disable_loganalyzer --skip_sanity  -k masic_dscp_queue
/usr/local/lib/python2.7/dist-packages/ansible/parsing/vault/__init__.py:44: CryptographyDeprecationWarning: Python 2 is no longer supported by the Python core team. Support for it is now deprecated in cryptography, and will be removed in the next release.
  from cryptography.exceptions import InvalidSignature
========================================================================================================================================================================== test session starts ===========================================================================================================================================================================
platform linux2 -- Python 2.7.17, pytest-4.6.5, py-1.10.0, pluggy-0.13.1
ansible: 2.8.12
rootdir: /var/sonic-mgmt/tests, inifile: pytest.ini
plugins: html-1.22.1, repeat-0.9.1, forked-1.3.0, xdist-1.28.0, metadata-1.11.0, ansible-2.2.2
collected 156 items / 152 deselected / 4 selected                                                                                                                                                                                                                              

qos/test_qos_sai.py ....                                                                                                                                                                                                                                                                                                                                           [100%]

============================================================================================================================================================================ warnings summary ============================================================================================================================================================================
/usr/local/lib/python2.7/dist-packages/_pytest/config/__init__.py:538
  /usr/local/lib/python2.7/dist-packages/_pytest/config/__init__.py:538: PytestAssertRewriteWarning: Module already imported so cannot be rewritten: tests.common.dualtor
    self.import_plugin(import_spec)

-- Docs: https://docs.pytest.org/en/latest/warnings.html
========================================================================================================================================================= 4 passed, 152 deselected, 1 warnings in 464.87 seconds =========================================================================================================================================================

Any platform specific information?

Relevant to Multi ASIC platforms

Supported testbed topology if it's a new test case?

Documentation

@smaheshm smaheshm requested a review from a team as a code owner March 31, 2021 19:02
@lgtm-com
Copy link
Copy Markdown

lgtm-com bot commented Mar 31, 2021

This pull request introduces 12 alerts when merging 7de0175 into 11ff976 - view on LGTM.com

new alerts:

  • 6 for Unused local variable
  • 4 for Variable defined multiple times
  • 1 for Unused import
  • 1 for Unguarded next in generator

@smaheshm smaheshm requested a review from neethajohn April 28, 2021 00:50
@smaheshm
Copy link
Copy Markdown
Contributor Author

🛎️

Copy link
Copy Markdown
Contributor

@arlakshm arlakshm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Few minor comments, but change lgtm

@smaheshm smaheshm requested a review from arlakshm June 10, 2021 16:09
@smaheshm smaheshm merged commit 4d52182 into sonic-net:master Jun 11, 2021
vmittal-msft pushed a commit to vmittal-msft/sonic-mgmt that referenced this pull request Sep 28, 2021
… backend ASICs (sonic-net#3254)

The test selects src and dst ports on different frontend ASICs so that traffic flows via backend ASIC. Changes include determining the rx and tx ports taken by the traffic flow of backend ASIC. The test runs once on each backend ASIC.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants