-
Notifications
You must be signed in to change notification settings - Fork 732
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add new test for generic hash feature #10538
Conversation
tests/common/devices/sonic.py
Outdated
@@ -2317,6 +2317,17 @@ def links_status_up(self, ports): | |||
logging.info("Interface {} is up on {}".format(output_port, self.hostname)) | |||
return True | |||
|
|||
def interface_status_up(self, interface): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
**is_**interface_status_up would be more clear
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
|
||
def pytest_addoption(parser): | ||
parser.addoption("--hash_field", action="store", default="random", | ||
help="The hash field to test, can be 'all', 'random' or a designated one") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it possible to list all the available ones?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
c397ded
to
08c3665
Compare
Add nine test cases according to test plan: https://github.com/sonic-net/sonic-mgmt/blob/master/docs/testplan/Generic-Hash-test-plan.md 6 files added/updated: conftest.py: the conftest for generic hash test generic_hash_test.py: the ptf test file sonic.py: add functions for generic hash cli generic_hash_helper.py: helper file of the test test_generic_hash.py: pytest file of the test test_pretest.py: update the metadata to store the global hash capabilities of the dut
08c3665
to
cb86989
Compare
Since the Hash Algorithm feature has been merged to master, we need to align the test with it. This part of work is being handled by @echuawu. Close this draft and Chuan will open a new one based on this. |
Description of PR
Summary:
Add nine test cases according to test plan:
https://github.com/sonic-net/sonic-mgmt/blob/master/docs/testplan/Generic-Hash-test-plan.md
For now, the test contains the validation for hash fields IN_PORT, SRC_MAC, DST_MAC, ETHERTYPE, VLAN_ID, L4_SRC_PORT, L4_DST_PORT, IP_PROTOCOL, INNER_SRC_IP, INNER_DST_IP. Test for other field will be added in future.
The test covers IPv4 and IPv6, vxlan/nvgre/ipinip encapsulations.
By default, the test is executed in random mode, the test parameters(including hash filed, ip version, encapsulation, reboot type) are generated randomly. The parameters can also be specified by pytest options.
Type of change
Back port request
Approach
What is the motivation for this PR?
Add new test for generic hash feature.
How did you do it?
How did you verify/test it?
Run test on Nvidia testbeds.
Any platform specific information?
Supported testbed topology if it's a new test case?
Documentation