Skip to content

Converted a few T1 topology testcases for T2 topology to run on multi-dut, and new dut selection mechanism#2813

Merged
yxieca merged 6 commits intosonic-net:masterfrom
oxygen980:t2-tests
Jan 28, 2021
Merged

Converted a few T1 topology testcases for T2 topology to run on multi-dut, and new dut selection mechanism#2813
yxieca merged 6 commits intosonic-net:masterfrom
oxygen980:t2-tests

Conversation

@oxygen980
Copy link
Contributor

@oxygen980 oxygen980 commented Jan 14, 2021

Description of PR

Summary:
Fixes # (issue)

Type of change

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

Approach

What is the motivation for this PR?

Need the capability to run T1 applicable tests against a T2 chassis

How did you do it?

A sonic T2 chassis is a chassis with multiple linecards and a supervisor card. This chassis is represented as a testbed with multiple DUTs (for each linecard and a supervisor card). Thus, we used the multi-dut approach to modify tests to execute against a T2 chassis.

There was also capability to run tests against a single randomly selected DUT from the multi-duts in a testbed using 'rand_one_dut_hostname' fixture. This assumes that all DUTs in the testbed have the same hwsku. However, in a T2 chassis, we could have linecards with different hwsku's. So, we need to run the tests against a single randomly selected DUT per hwsku for a T2 chassis.

We used the 'enum_rand_one_per_hwsku_frontend_hostname' dut selection fixture defined in pytest_generate_tests. For consistency of the random selected DUT list across a module, we made 'enum_rand_one_per_hwsku_frontend_hostname' fixture return the same set of random duts per hwsku for a pytest module.

Following test cases were modified to run against one random frontend linecard per hwsku in a T2 chassis

  • test_interfaces.py
  • test_nbr_health.py
  • iface_namingmode/test_iface_namingmode.py
  • arp/conftest.py
  • arp/test_arpall.py
  • arp/test_neighbor_mac_noptf.py
  • route/test_default_route.py
  • route/test_route_perf.py
  • monit/test_monit_status.py
  • portstat/test_portstat.py
  • read_mac/test_read_mac_metadata.py
  • syslog/test_syslog.py

The changes were:

  • use enum_dut_frontend_hostname instead of enum_dut_hostname to execute against all frontend linecard
  • use enum_rand_one_per_hwsku_frontend_hostname instead of rand_one_dut_hostname to execute against one random frontend linecard per hwsku.
  • Included 't2' topology in topology checks
  • Incorporated changes required to support 'Inband' interfaces on the linecards.

How did you verify/test it?

Ran modified tests against a T2 chassis with topology defined in ansible/vars/topo-t2.yml.

Any platform specific information?

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

Documentation

@ghost
Copy link

ghost commented Jan 14, 2021

CLA assistant check
All CLA requirements met.

@oxygen980 oxygen980 changed the title [T2] T1 Test case changes for running against T2 Chassis [T2] T1 Test cases conversion to multi-dut for T2 topology Jan 16, 2021
@oxygen980 oxygen980 changed the title [T2] T1 Test cases conversion to multi-dut for T2 topology Convert test_nbr_health, test_interfaces, test_iface_namingmode to multi-dut for T2 topology, and new dut selection mechanism Jan 18, 2021
@sanmalho-git
Copy link
Contributor

retest vsimage please

@shubav
Copy link
Contributor

shubav commented Jan 19, 2021

@yxieca @wangxin could you please review these changes? This includes the new dut selection mechanism too. If this looks fine, we will push another PR which converts a couple more tests. Thanks.

falodiya added 4 commits January 22, 2021 13:16
enum_rand_one_per_hwsku_frontend_hostname fixture will return the same set of random duts per hwsku for a pytest module.

Following test cases were modified to run against one random frontend linecard per hwsku in a T2 chassis
- test_interfaces.py
- test_nbr_health.py
- iface_namingmode/test_iface_namingmode.py

The changes were:
- use enum_dut_frontend_hostname instead of enum_dut_hostname to execute against all frontend linecard
- use enum_rand_one_per_hwsku_frontend_hostname instead of rand_one_dut_hostname to execute against one random frontend linecard per hwsku.
- Included 't2' topology in topology checks
@oxygen980 oxygen980 changed the title Convert test_nbr_health, test_interfaces, test_iface_namingmode to multi-dut for T2 topology, and new dut selection mechanism Converted a few T1 topology testcases for T2 topology to run on multi-dut, and new dut selection mechanism Jan 22, 2021
@oxygen980
Copy link
Contributor Author

oxygen980 commented Jan 25, 2021

retest vsimage please

1 similar comment
@oxygen980
Copy link
Contributor Author

retest vsimage please

@yxieca yxieca merged commit c6f1768 into sonic-net:master Jan 28, 2021
@oxygen980 oxygen980 deleted the t2-tests branch February 17, 2021 17:12
kazinator-arista pushed a commit to kazinator-arista/sonic-mgmt that referenced this pull request Mar 4, 2026
…atically (sonic-net#14848)

src/sonic-utilities

* 6c400c48 - (HEAD -> 202205, origin/202205) [GCU] protect loopback0 from deletion (sonic-net#2638) (sonic-net#2813) (35 hours ago) [jingwenxie]
* 506dd7a2 - [GCU] Add PFC_WD RDMA validator (sonic-net#2810) (6 days ago) [isabelmsft]
* 47f84994 - [202205][DBMigrator] Update db_migrator to support EdgeZoneAggregator Buffer Config for T0s (sonic-net#2769) (7 days a
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