Add dualtor support for directed broadcast test#6395
Add dualtor support for directed broadcast test#6395xwjiang-ms merged 7 commits intosonic-net:masterfrom
Conversation
What is the motivation for this PR? Directed bcast test only support t0 topo, but dualtor also support this function How did you do it? 1. Use mgfacts to get src/dst ports instead of hard code 2. Use json file to record src/dst ports 3. Dualtor will forward dir bcast packets from active ports, so after toggling, dst ports should be all active ports in "show mux status" How did you verify/test it? Run test Any platform specific information? Supported testbed topology if it's a new test case?
|
This pull request introduces 3 alerts when merging 877e47d into e22a588 - view on LGTM.com new alerts:
|
|
Dualtor don't support directed broadcast, so use xfail now, created an issue: sonic-net/sonic-buildimage#12167 |
tests/ipfwd/test_dir_bcast.py
Outdated
| ptfhost.copy(content=json.dumps(ptf_test_port_map), dest=PTF_TEST_PORT_MAP) | ||
|
|
||
|
|
||
| @pytest.mark.xfail |
There was a problem hiding this comment.
Please add the xfail mark to conditional mark yaml file.
Currently, dir_bcast only fails on dualtor. It should be able to pass on other topologies.
tests/ipfwd/test_dir_bcast.py
Outdated
|
|
||
| PTF_TEST_PORT_MAP = '/root/ptf_test_port_map.json' | ||
|
|
||
| def parse_mux_status(output_lines): |
There was a problem hiding this comment.
Can you take advantage of the existing show_and_parse method to avoid code duplication: https://github.com/sonic-net/sonic-mgmt/blob/master/tests/common/devices/sonic.py#L1387
There was a problem hiding this comment.
Sure, that will be better
|
@xwjiang-ms Can you also resolve the merge conflicts? |
OK, I will solve it |
1. Record vlan ip port pair in json file in case multi vlan 2. Use "show_and_parse" to parse duthost output 3. Do not skip dualtor but xfail in conditional mark
| - "topo_type not in ['t0', 'm0', 'dualtor']" | ||
|
|
||
| ipfwd/test_dir_bcast.py: | ||
| xfail: |
There was a problem hiding this comment.
The xfail mark need to be specified under the same ipfwd/test_dir_bcast.py entry. Otherwise, we will have duplicated entries in this yaml file.
There was a problem hiding this comment.
OK, I will change it
… Otherwise, in case have duplicated entries in this yaml file.
…/sonic-mgmt into dir_bcast_for_dualtor
* Add dualtor support for directed bcast test What is the motivation for this PR? Directed bcast test only support t0 topo, but dualtor also support this function How did you do it? 1. Use mgfacts to get src ports instead of hard code 2. Use json file to record src ports, vlan prefix and dst ports parir 3. Dualtor will forward dir bcast packets from active ports, so after toggling, dst ports should be all active ports in "show mux status" 4. Do not skip dualtor but xfail in conditional mark How did you verify/test it? Run test Any platform specific information? Supported testbed topology if it's a new test case?
* Add dualtor support for directed bcast test What is the motivation for this PR? Directed bcast test only support t0 topo, but dualtor also support this function How did you do it? 1. Use mgfacts to get src ports instead of hard code 2. Use json file to record src ports, vlan prefix and dst ports parir 3. Dualtor will forward dir bcast packets from active ports, so after toggling, dst ports should be all active ports in "show mux status" 4. Do not skip dualtor but xfail in conditional mark How did you verify/test it? Run test Any platform specific information? Supported testbed topology if it's a new test case?
* Add dualtor support for directed bcast test What is the motivation for this PR? Directed bcast test only support t0 topo, but dualtor also support this function How did you do it? 1. Use mgfacts to get src ports instead of hard code 2. Use json file to record src ports, vlan prefix and dst ports parir 3. Dualtor will forward dir bcast packets from active ports, so after toggling, dst ports should be all active ports in "show mux status" 4. Do not skip dualtor but xfail in conditional mark How did you verify/test it? Run test Any platform specific information? Supported testbed topology if it's a new test case?
What is the motivation for this PR? dir_bcast test always fails in t0-56 topo How did you do it? Add topo support and sync with master branch ref PR: sonic-net#6395
* [202012]Fix dir bcast failure in to-56 topo What is the motivation for this PR? dir_bcast test always fails in t0-56 topo How did you do it? Add topo support and sync with master branch ref PR: #6395
Description of PR
Summary:
Fixes # (issue)
Type of change
Back port request
Approach
What is the motivation for this PR?
Directed bcast test only support t0 topo, but dualtor also support this function
How did you do it?
How did you verify/test it?
Run test
Any platform specific information?
Supported testbed topology if it's a new test case?
Documentation