Skip to content

Add new test for generic hash feature#10538

Closed
congh-nvidia wants to merge 1 commit intosonic-net:masterfrom
congh-nvidia:generic_hash
Closed

Add new test for generic hash feature#10538
congh-nvidia wants to merge 1 commit intosonic-net:masterfrom
congh-nvidia:generic_hash

Conversation

@congh-nvidia
Copy link
Copy Markdown
Contributor

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

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

Back port request

  • 201911
  • 202012
  • 202205
  • 202305

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

Copy link
Copy Markdown
Contributor

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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done

Copy link
Copy Markdown
Contributor

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?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done

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
@congh-nvidia
Copy link
Copy Markdown
Contributor Author

congh-nvidia commented Dec 7, 2023

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.

@congh-nvidia congh-nvidia deleted the generic_hash branch October 17, 2024 02:59
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.

2 participants