-
Notifications
You must be signed in to change notification settings - Fork 739
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[test-gap] Test IPinIP decap after VXLAN setup and teardown (#5834)
Fix test-gap to address a recently discovered issue where ipinip decap functionality failed after CPA teardown (teardown of vxlan tunnel + mirror acls). A recent warmboot issue highlighted that decap functionality will fail after CPA (control plane assistant) session was teardown. Although CPA is relevant during warmboot, but this issue does not necessarily require warmboot. Just setting up and teardown CPA session will trigger this. I this PR, a new param vxlan to test_decap is added. Now all the cases in decap will run with or without a prestep of vxlan set-and-unset. Changes made: Before running decap test, if vxlan set_unset knob is enabled, create a CPA session and then tear it down. Also, do not apply the config from template. This will ensure new tables are not created, and hence the test will run with default config loaded on the device.
- Loading branch information
Showing
4 changed files
with
136 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,25 @@ | ||
|
||
def build_ttl_dscp_params(uniform_support_info): | ||
ttl_uni = {'ttl': 'uniform', 'dscp': 'pipe'} | ||
dscp_uni = {'ttl': 'pipe', 'dscp': 'uniform'} | ||
both_pipe = {'ttl': 'pipe', 'dscp': 'pipe'} | ||
ttl_uni_vxlan = {'ttl': 'uniform', 'dscp': 'pipe', 'vxlan': 'set_unset'} | ||
dscp_uni_vxlan = {'ttl': 'pipe', 'dscp': 'uniform', 'vxlan': 'set_unset'} | ||
both_pipe_vxlan = {'ttl': 'pipe', 'dscp': 'pipe', 'vxlan': 'set_unset'} | ||
ttl_uni = {'ttl': 'uniform', 'dscp': 'pipe', 'vxlan': 'disable'} | ||
dscp_uni = {'ttl': 'pipe', 'dscp': 'uniform', 'vxlan': 'disable'} | ||
both_pipe = {'ttl': 'pipe', 'dscp': 'pipe', 'vxlan': 'disable'} | ||
params = [] | ||
if uniform_support_info['ttl']: | ||
params.append(ttl_uni) | ||
params.append(ttl_uni_vxlan) | ||
if uniform_support_info['dscp']: | ||
params.append(dscp_uni) | ||
if len(params) < 2: | ||
params.append(dscp_uni_vxlan) | ||
if len(params) < 4: | ||
params.append(both_pipe) | ||
params.append(both_pipe_vxlan) | ||
return params | ||
|
||
def pytest_generate_tests(metafunc): | ||
ttl = metafunc.config.getoption("ttl_uniform") | ||
dscp = metafunc.config.getoption("dscp_uniform") | ||
if "supported_ttl_dscp_params" in metafunc.fixturenames: | ||
params = build_ttl_dscp_params({'ttl': ttl, 'dscp': dscp}) | ||
metafunc.parametrize("supported_ttl_dscp_params", params, ids=lambda p: "ttl=%s, dscp=%s" % (p['ttl'], p['dscp']), scope="module") | ||
metafunc.parametrize("supported_ttl_dscp_params", params, ids=lambda p: "ttl=%s, dscp=%s, vxlan=%s" % (p['ttl'], p['dscp'], p['vxlan']), scope="module") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters