Update test_pg_headroom_update.py to use new function from gu_utils.py#13722
Merged
wangxin merged 3 commits intosonic-net:masterfrom Jul 23, 2024
Merged
Conversation
test_pg_headroom_update.py to use new function get_asic_name from gu_utils.py
test_pg_headroom_update.py to use new function get_asic_name from gu_utils.pytest_pg_headroom_update.py to use new function from gu_utils.py
xwjiang-ms
reviewed
Jul 23, 2024
| - dualtor/test_orchagent_active_tor_downstream.py | ||
| - dualtor/test_orchagent_mac_move.py | ||
| - dualtor/test_orchagent_standby_tor_downstream.py | ||
| - dualtor/test_standby_tor_upstream_mux_toggle.py |
Contributor
There was a problem hiding this comment.
need to sync with latest master, these dualtor scripts were moved in to t0 job
Contributor
Author
There was a problem hiding this comment.
need to sync with latest master, these dualtor scripts were put in to t0 job
Sure
opcoder0
reviewed
Jul 23, 2024
| @pytest.mark.parametrize("operation", ["replace"]) | ||
| def test_pg_headroom_update(duthost, ensure_dut_readiness, operation, skip_when_buffer_is_dynamic_model): | ||
| asic_type = duthost.get_asic_name() | ||
| asic_type = get_asic_name(duthost) |
Contributor
There was a problem hiding this comment.
sonic-cfggen -d -v DEVICE_METADATA.localhost.hwsku on vs seems to be recognized as Force10-S6000 which leads to td2. May be we can add a comment?
wangxin
approved these changes
Jul 23, 2024
8 tasks
wangxin
pushed a commit
that referenced
this pull request
Jul 25, 2024
Mock dualtor test are already added in t0 test job, but it was wrongly added to onboarding t0 job by PR #13722
arista-hpandya
pushed a commit
to arista-hpandya/sonic-mgmt
that referenced
this pull request
Oct 2, 2024
…s.py` (sonic-net#13722) What is the motivation for this PR? Previously, we use function duthost.get_asic_name in test case test_pg_headroom_update to get the asic name of testbed. In this function, somehow, it considers the asic name of kvm testbed 'unknown'. But in the next step, in function is_valid_platform_and_version, it uses the function get_asic_name from file generic_config_updater/gu_utils.py, and considers the asic name of kvm testbed 'td2'.The difference will cause the misjudgment of the result expect_op_success and expect_op_failure. To keep consistent, we will use function get_asic_name from generic_config_updater/gu_utils.py. How did you do it? Use the function get_asic_name from generic_config_updater/gu_utils.py to instead the function duthost.get_asic_name
arista-hpandya
pushed a commit
to arista-hpandya/sonic-mgmt
that referenced
this pull request
Oct 2, 2024
Mock dualtor test are already added in t0 test job, but it was wrongly added to onboarding t0 job by PR sonic-net#13722
vikshaw-Nokia
pushed a commit
to vikshaw-Nokia/sonic-mgmt
that referenced
this pull request
Oct 23, 2024
…s.py` (sonic-net#13722) What is the motivation for this PR? Previously, we use function duthost.get_asic_name in test case test_pg_headroom_update to get the asic name of testbed. In this function, somehow, it considers the asic name of kvm testbed 'unknown'. But in the next step, in function is_valid_platform_and_version, it uses the function get_asic_name from file generic_config_updater/gu_utils.py, and considers the asic name of kvm testbed 'td2'.The difference will cause the misjudgment of the result expect_op_success and expect_op_failure. To keep consistent, we will use function get_asic_name from generic_config_updater/gu_utils.py. How did you do it? Use the function get_asic_name from generic_config_updater/gu_utils.py to instead the function duthost.get_asic_name
vikshaw-Nokia
pushed a commit
to vikshaw-Nokia/sonic-mgmt
that referenced
this pull request
Oct 23, 2024
Mock dualtor test are already added in t0 test job, but it was wrongly added to onboarding t0 job by PR sonic-net#13722
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of PR
Previously, we use function
duthost.get_asic_namein test casetest_pg_headroom_updateto get the asic name of testbed. In this function, somehow, it considers the asic name of kvm testbed 'unknown'. But in the next step, in functionis_valid_platform_and_version, it uses the functionget_asic_namefrom filegeneric_config_updater/gu_utils.py, and considers the asic name of kvm testbed 'td2'.The difference will cause the misjudgment of the resultexpect_op_successandexpect_op_failure. To keep consistent, we will use functionget_asic_namefromgeneric_config_updater/gu_utils.py.Summary:
Fixes # (issue)
Type of change
Back port request
Approach
What is the motivation for this PR?
Previously, we use function
duthost.get_asic_namein test casetest_pg_headroom_updateto get the asic name of testbed. In this function, somehow, it considers the asic name of kvm testbed 'unknown'. But in the next step, in functionis_valid_platform_and_version, it uses the functionget_asic_namefrom filegeneric_config_updater/gu_utils.py, and considers the asic name of kvm testbed 'td2'.The difference will cause the misjudgment of the resultexpect_op_successandexpect_op_failure. To keep consistent, we will use functionget_asic_namefromgeneric_config_updater/gu_utils.py.How did you do it?
Use the function
get_asic_namefromgeneric_config_updater/gu_utils.pyto instead the functionduthost.get_asic_nameHow did you verify/test it?
Any platform specific information?
Supported testbed topology if it's a new test case?
Documentation