Use ptf_runner in qos sai test and fdb mac expire test#6869
Use ptf_runner in qos sai test and fdb mac expire test#6869liat-grozovik merged 1 commit intosonic-net:masterfrom
Conversation
|
This pull request introduces 1 alert and fixes 2 when merging eef4c42 into 3cf50ec - view on LGTM.com new alerts:
fixed alerts:
Heads-up: LGTM.com's PR analysis will be disabled on the 5th of December, and LGTM.com will be shut down ⏻ completely on the 16th of December 2022. Please enable GitHub code scanning, which uses the same CodeQL engine ⚙️ that powers LGTM.com. For more information, please check out our post on the GitHub blog. |
| from tests.common.dualtor.dual_tor_utils import upper_tor_host,lower_tor_host,dualtor_ports | ||
| from tests.common.dualtor.mux_simulator_control import toggle_all_simulator_ports, get_mux_status, check_mux_status, validate_check_result | ||
| from tests.common.dualtor.constants import UPPER_TOR, LOWER_TOR | ||
| #from tests.common.dualtor.dual_tor_utils import upper_tor_host, lower_tor_host, dualtor_ports # noqa F401 |
There was a problem hiding this comment.
@congh-nvidia Can you elaborate why comment out this import line even when the fixtures imported here are used by this script?
There was a problem hiding this comment.
Hi @wangxin, I think it must be a typo when I was fixing the pre-commit issues. This line should not be comment out. I think it didn't break the test because the fixtures are also imported in the pytest plugin. Did you find it when converting the test to Python3, if so please remove the comment; if not, I'll fix this. Thanks!
There was a problem hiding this comment.
Hi @congh-nvidia, I noticed this when I was doing cherry-pick. Not in python3 migration. It would be great if you can submit a PR to fix this. Thanks!
There was a problem hiding this comment.
Sure, I'll fix it, thanks!
Description of PR
Summary:
Update the qos sai test and fdb mac expire test to use ptf_runner to run the ptf test, so that the ptf logs can be collected to sonic-mgmt docker and attached to allure report by the ptf_runner.
Also update the changed files to pass the pre-commit check.
Type of change
Back port request
Approach
What is the motivation for this PR?
This PR is to improve the debuggability.
Use ptf_runner to run the ptf test, so that the ptf logs can be collected to sonic-mgmt docker and attached to allure report by the ptf_runner.
How did you do it?
Replaced the ptfhost.shell() with ptf runner() in test_fdb_mac_expire.py and qos_sai_base.py, added a "custom_option" parameter in ptf_runner to accept the extra options like " --disable-ipv6" in qos sai test.
Made some minor changes to pass the pre-commit check.
How did you verify/test it?
Run regression on all Nvidia platforms, all test passed.
Any platform specific information?
Supported testbed topology if it's a new test case?
Documentation