Skip to content

Update test_pg_headroom_update.py to use new function from gu_utils.py#13722

Merged
wangxin merged 3 commits intosonic-net:masterfrom
yutongzhang-microsoft:yutongzhang/skip_pg_headroom_update
Jul 23, 2024
Merged

Update test_pg_headroom_update.py to use new function from gu_utils.py#13722
wangxin merged 3 commits intosonic-net:masterfrom
yutongzhang-microsoft:yutongzhang/skip_pg_headroom_update

Conversation

@yutongzhang-microsoft
Copy link
Contributor

@yutongzhang-microsoft yutongzhang-microsoft commented Jul 19, 2024

Description of 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.

Summary:
Fixes # (issue)

Type of change

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

Back port request

  • 202012
  • 202205
  • 202305
  • 202311
  • 202405

Approach

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

How did you verify/test it?

Any platform specific information?

Supported testbed topology if it's a new test case?

Documentation

@yutongzhang-microsoft yutongzhang-microsoft changed the title Move pg headroom update test to skip list. Update test_pg_headroom_update.py to use new function get_asic_name from gu_utils.py Jul 23, 2024
@yutongzhang-microsoft yutongzhang-microsoft changed the title Update test_pg_headroom_update.py to use new function get_asic_name from gu_utils.py Update test_pg_headroom_update.py to use new function from gu_utils.py 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
Copy link
Contributor

@xwjiang-ms xwjiang-ms Jul 23, 2024

Choose a reason for hiding this comment

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

need to sync with latest master, these dualtor scripts were moved in to t0 job

Copy link
Contributor Author

Choose a reason for hiding this comment

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

need to sync with latest master, these dualtor scripts were put in to t0 job

Sure

@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)
Copy link
Contributor

Choose a reason for hiding this comment

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

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?

Copy link
Contributor

@opcoder0 opcoder0 left a comment

Choose a reason for hiding this comment

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

LGTM

@wangxin wangxin merged commit a7f8c75 into sonic-net:master Jul 23, 2024
@yutongzhang-microsoft yutongzhang-microsoft deleted the yutongzhang/skip_pg_headroom_update branch July 23, 2024 07:32
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
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.

4 participants