Skip to content

[qos] support t0-120 qos sai test#10200

Merged
bingwang-ms merged 2 commits intosonic-net:masterfrom
XuChen-MSFT:xuchen3/master/t0-120-qos-support
Oct 6, 2023
Merged

[qos] support t0-120 qos sai test#10200
bingwang-ms merged 2 commits intosonic-net:masterfrom
XuChen-MSFT:xuchen3/master/t0-120-qos-support

Conversation

@XuChen-MSFT
Copy link
Contributor

Description of PR

Summary:
Fixes # (issue)

Type of change

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

Back port request

  • 201911
  • 202012
  • 202205
  • 202305

Approach

What is the motivation for this PR?

[Nvidia] Fix qos sai test for supporting LAG port #9587 #10121
break the qos sai test for mlnx device when topo is t0-120

RCA:
complain keyError when accessing testPortIds.

    def __buildTestPorts(self, request, testPortIds, testPortIps, src_port_ids, dst_port_ids, get_src_dst_asic_and_duts):                                                        """                                                                                                                                                              
            Build map of test ports index and IPs                                                                                                                                                                                                                                                                                                 
            Args:                                                                                                                                                        
                request (Fixture): pytest request object                                                                                                                 
                testPortIds (list): List of QoS SAI test port IDs                                                                                                        
                testPortIps (list): List of QoS SAI test port IPs                                                                                                        
                                                                                                                                                                         
            Returns:                                                                                                                                                     
                testPorts (dict): Map of test ports index and IPs                                                                                                        
        """                                                                                                                                                              
        dstPorts = request.config.getoption("--qos_dst_ports")                                                                                                           
        srcPorts = request.config.getoption("--qos_src_ports")                                                                                                           
                                                                                                                                                                         
>       src_dut_port_ids = testPortIds[get_src_dst_asic_and_duts['src_dut_index']]                                                                                       
E       KeyError: 0                   

checed on PDB, "t0-120" topo is not in the self.SUPPORTED_T0_TOPOS:

(Pdb) p get_src_dst_asic_and_duts['src_dut_index']
0
(Pdb) p testPortIds
{}
(Pdb) p tbinfo["topo"]["name"]
't0-120'
(Pdb) p self.SUPPORTED_T0_TOPOS
['t0', 't0-56-po2vlan', 't0-64', 't0-116', 't0-35', 'dualtor-56', 'dualtor-120', 'dualtor', 't0-80', 't0-backend']
(Pdb) p self.SUPPORTED_PTF_TOPOS
['ptf32', 'ptf64']

How did you do it?

add "t0-120" to self.SUPPORTED_T0_TOPOS

How did you verify/test it?

pass local test, not encounter keyError again.

Any platform specific information?

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

Documentation

@bingwang-ms bingwang-ms merged commit b953880 into sonic-net:master Oct 6, 2023
@bingwang-ms
Copy link
Collaborator

MS ADO: 25354034
@wangxin @StormLiangMS Can you please help cherry-pick this change to 202205 and 202305 branch? Thanks!

@mssonicbld
Copy link
Collaborator

Cherry-pick PR to 202205: #10367

mssonicbld pushed a commit to mssonicbld/sonic-mgmt that referenced this pull request Oct 18, 2023
@mssonicbld
Copy link
Collaborator

Cherry-pick PR to 202305: #10368

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants