lsanity.soc (7868B)
1 # 2 # This license is set out in https://raw.githubusercontent.com/Broadcom-Network-Switching-Software/OpenBCM/master/Legal/LICENSE file. 3 # 4 # Copyright 2007-2019 Broadcom Inc. All rights reserved. 5 # 6 # Script to run all available tests as quickly as possible. 7 # For testing basic sanity of new drivers, simulators, chips, etc. 8 9 echo "testsuite: started: sanity" 10 11 # We need to print out port status since any cabling effects results. 12 *:ps 13 14 # Avoid link messages while testing 15 linkscan off 16 17 # Use expected COS configuration for tests 18 config add bcm_num_cos=4 19 20 init 21 init misc 22 23 local done 'echo " Done"' 24 25 # Set run command script not to fail on errors reported by commands 26 # this allows the script to continue if a test fails 27 set rcerror=false 28 29 # Set up test mode: don't stop on errors, show progress on each test 30 tm -stoponerror +progress 31 # Unselect all 32 ts -* 33 34 # Tests Start Here 35 36 echo Running CPU benchmarks ... 37 tr 21 38 $done 39 40 echo Running PCI tests ... 41 tr 2 42 $done 43 44 echo Running register tests ... 45 tr 3 46 $done 47 48 echo Running S-Channel message buffer test ... 49 tr 4 50 $done 51 52 echo Running Switching Memory tests 53 # Note: Switching memory tests automatically put MMU in debug mode 54 55 echo " DEF_IP"; tr 50 m=DEF_IP; tr 51 m=DEF_IP 56 echo " DEF_IP_HIT"; tr 50 m=DEF_IP_HIT; tr 51 m=DEF_IP_HIT 57 echo " IP_REP_HI"; tr 50 m=IP_REP_HI; tr 51 m=IP_REP_HI 58 echo " IP_REP_LO"; tr 50 m=IP_REP_LO; tr 51 m=IP_REP_LO 59 echo " EGRESS_MASK"; tr 50 m=EGRESS_MASK; tr 51 m=EGRESS_MASK 60 echo " XFFPCOUNTERS 0-1"; tr 50 m=XFFPCOUNTERST0; tr 51 m=XFFPCOUNTERST0 61 tr 50 m=XFFPCOUNTERST1; tr 51 m=XFFPCOUNTERST1 62 echo " XFFPIPPACKETCOUNTERS 0-1" 63 tr 50 m=XFFPIPPACKETCOUNTERST0 64 tr 51 m=XFFPIPPACKETCOUNTERST0 65 tr 50 m=XFFPIPPACKETCOUNTERST1 66 tr 51 m=XFFPIPPACKETCOUNTERST1 67 echo " XFFPOPPACKETCOUNTERS 0-1" 68 tr 50 m=XFFPOPPACKETCOUNTERST0 69 tr 51 m=XFFPOPPACKETCOUNTERST0 70 tr 50 m=XFFPOPPACKETCOUNTERST1 71 tr 51 m=XFFPOPPACKETCOUNTERST1 72 echo " XFFPIPBYTECOUNTERS 0-1" 73 tr 50 m=XFFPIPBYTECOUNTERST0 74 tr 51 m=XFFPIPBYTECOUNTERST0 75 tr 50 m=XFFPIPBYTECOUNTERST1 76 tr 51 m=XFFPIPBYTECOUNTERST1 77 echo " XFFPOPBYTECOUNTERS 0-1" 78 tr 50 m=XFFPOPBYTECOUNTERST0 79 tr 51 m=XFFPOPBYTECOUNTERST0 80 tr 50 m=XFFPOPBYTECOUNTERST1 81 tr 51 m=XFFPOPBYTECOUNTERST1 82 echo " GIMASK"; tr 50 m=GIMASK; tr 51 m=GIMASK 83 echo " GIRULE 0-3"; tr 50 m=GIRULET0; tr 51 m=GIRULET0 84 tr 50 m=GIRULET1; tr 51 m=GIRULET1 85 tr 50 m=GIRULET2; tr 51 m=GIRULET2 86 tr 50 m=GIRULET3; tr 51 m=GIRULET3 87 echo " XMETERING 0-3"; tr 50 m=XMETERINGT0; tr 51 m=XMETERINGT0 88 tr 50 m=XMETERINGT1; tr 51 m=XMETERINGT1 89 tr 50 m=XMETERINGT2; tr 51 m=XMETERINGT2 90 tr 50 m=XMETERINGT3; tr 51 m=XMETERINGT3 91 echo " L2_TABLE"; tr 50 m=L2_TABLE; tr 51 m=L2_TABLE 92 echo " L2_HIT_BITS"; tr 50 m=L2_HIT_BITS; tr 51 m=L2_HIT_BITS 93 echo " L2MC_TABLE"; tr 50 m=L2MC_TABLE; tr 51 m=L2MC_TABLE 94 echo " L2_STATIC_BITS"; tr 50 m=L2_STATIC_BITS; tr 51 m=L2_STATIC_BITS 95 echo " L2_VALID_BITS"; tr 50 m=L2_VALID_BITS; tr 51 m=L2_VALID_BITS 96 echo " L3_TABLE"; tr 50 m=L3_TABLE; tr 51 m=L3_TABLE 97 echo " L3_HIT_BITS"; tr 50 m=L3_HIT_BITS; tr 51 m=L3_HIT_BITS 98 echo " L3_VALID_BITS"; tr 50 m=L3_VALID_BITS; tr 51 m=L3_VALID_BITS 99 echo " L3INTF"; tr 50 m=L3INTF; tr 51 m=L3INTF 100 echo " L3_IPMC"; tr 50 m=L3_IPMC; tr 51 m=L3_IPMC 101 echo " PORT_MAC_BLOCK"; tr 50 m=PORT_MAC_BLOCK; tr 51 m=PORT_MAC_BLOCK 102 echo " PORT"; tr 50 m=PORT 103 echo " PRTABLE"; tr 50 m=PRTABLE; tr 51 m=PRTABLE 104 echo " VLAN_STG"; tr 50 m=VLAN_STG; tr 51 m=VLAN_STG 105 echo " DMUXTRUNKDIST"; tr 50 m=DMUXTRUNKDIST; tr 51 m=DMUXTRUNKDIST 106 echo " TRUNK_BITMAP"; tr 50 m=TRUNK_BITMAP; tr 51 m=TRUNK_BITMAP 107 echo " PORT_TRUNK_EGRESS"; tr 50 m=PORT_TRUNK_EGRESS 108 tr 51 m=PORT_TRUNK_EGRESS 109 echo " TRUNK_GROUP"; tr 50 m=TRUNK_GROUP; tr 51 m=TRUNK_GROUP 110 echo " VLAN"; tr 50 m=VLAN; tr 51 m=VLAN 111 echo " CBPDATA 0-3"; tr 50 m=CBPDATA0; tr 51 m=CBPDATA0 112 tr 50 m=CBPDATA1; tr 51 m=CBPDATA1 113 tr 50 m=CBPDATA2; tr 51 m=CBPDATA2 114 tr 50 m=CBPDATA3; tr 51 m=CBPDATA3 115 echo " CBPHEADER"; tr 50 m=CBPHEADER; tr 51 m=CBPHEADER 116 echo " CCP"; tr 50 m=CCP; tr 51 m=CCP 117 echo " CFAP"; tr 50 m=CFAP; tr 51 m=CFAP 118 echo " XQ 0-2" 119 for xq=0,2 'tr 50 m=XQ$xq; tr 51 m=XQ$xq' 120 $done 121 122 echo Running Table DMA Tests 123 # Specify a zero count for each test to indicate entire memory. 124 # Otherwise the count from the previous invocation is used. 125 echo " DEF_IP"; tr 71 m=DEF_IP c=0 126 echo " DEF_IP_HIT"; tr 71 m=DEF_IP_HIT c=0 127 echo " IP_REP_HI"; tr 71 m=IP_REP_HI c=0 128 echo " IP_REP_LO"; tr 71 m=IP_REP_LO c=0 129 echo " EGRESS_MASK"; tr 71 m=EGRESS_MASK c=0 130 echo " XFFPCOUNTERS"; tr 71 m=XFFPCOUNTERS c=0 131 echo " XFFPIPPACKETCOUNTERS"; tr 71 m=XFFPOPPACKETCOUNTERS c=0 132 echo " XFFPIPPACKETCOUNTERS"; tr 71 m=XFFPOPPACKETCOUNTERS c=0 133 echo " XFFPIPBYTECOUNTERS"; tr 71 m=XFFPOPBYTECOUNTERS c=0 134 echo " XFFPIPBYTECOUNTERS"; tr 71 m=XFFPOPBYTECOUNTERS c=0 135 echo " XMETERING"; tr 71 m=XMETERINGT0 c=0 136 tr 71 m=XMETERINGT1 c=0 137 tr 71 m=XMETERINGT2 c=0 138 tr 71 m=XMETERINGT3 c=0 139 echo " L2_TABLE"; tr 71 m=L2_TABLE c=0 140 echo " L2_HIT_BITS"; tr 71 m=L2_HIT_BITS c=0 141 echo " L2MC_TABLE"; tr 71 m=L2MC_TABLE c=0 142 echo " L2_STATIC_BITS"; tr 71 m=L2_STATIC_BITS c=0 143 echo " L2_VALID_BITS"; tr 71 m=L2_VALID_BITS c=0 144 echo " L3_TABLE"; tr 71 m=L3_TABLE c=0 145 echo " L3_HIT_BITS"; tr 71 m=L3_HIT_BITS c=0 146 echo " L3_VALID_BITS"; tr 71 m=L3_VALID_BITS c=0 147 echo " L3INTF"; tr 71 m=L3INTF c=0 148 echo " L3_IPMC"; tr 71 m=L3_IPMC c=0 149 echo " PORT_MAC_BLOCK"; tr 71 m=PORT_MAC_BLOCK c=0 150 echo " PORT"; tr 71 m=PORT c=0 151 echo " PRTABLE"; tr 71 m=PRTABLE c=0 152 echo " VLAN_STG"; tr 71 m=VLAN_STG c=0 153 echo " DMUXTRUNKDIST"; tr 71 m=DMUXTRUNKDIST c=0 154 echo " TRUNK_BITMAP"; tr 71 m=TRUNK_BITMAP c=0 155 echo " PORT_TRUNK_EGRESS"; tr 71 m=PORT_TRUNK_EGRESS c=0 156 echo " TRUNK_GROUP"; tr 71 m=TRUNK_GROUP c=0 157 echo " VLAN"; tr 71 m=VLAN c=0 158 $done 159 160 # Re-initialize to clean up of various read/writes to MMU memories 161 rcload rc.soc 162 linkscan off 163 164 echo Running counter width verification test ... 165 tr 30 166 $done 167 168 echo Running counter read/write test ... 169 tr 31 170 $done 171 172 echo Running L2 insert/delete/lookup test ... 173 tr 32 174 $done 175 176 echo Running L2 overflow insert test ... 177 tr 33 178 $done 179 180 echo Running L2 hash test ... 181 tr 34 182 $done 183 184 echo Running L2 delete by port test ... 185 tr 35 186 $done 187 188 echo Running L2 delete by vlan test ... 189 tr 36 190 $done 191 192 echo Running L3 overflow insert test ... 193 tr 37 194 $done 195 196 echo Running L3 hash test ... 197 tr 38 198 $done 199 200 # Loopback Tests 201 # Each test loads rc.soc in case a previous test failed 202 203 echo Testing CPU DMA loopback ... 204 tr 17 c=5 205 $done 206 207 echo Testing CPU DMA, Scatter/Gather Reload ... 208 tr 22 209 $done 210 211 echo Testing CPU DMA, Scatter/Gather Simple ... 212 tr 23 213 $done 214 215 echo Testing CPU DMA, Scatter/Gather Random ... 216 tr 24 217 $done 218 219 #--------- MAC Loopback --------- 220 221 echo Testing MAC Loopback - 10000 Mb/s all XE/HG ports 222 tr 18 pbm=xe,hg speed=10G 223 224 $done 225 226 #--------- PHY Loopback --------- 227 228 echo Testing PHY Loopback - 10000 MB/s all XE/HG ports 229 tr 19 pbm=xe,hg speed=10G 230 $done 231 232 #--------- INT snake Loopback --------- 233 234 echo "Running internal snake on all ports, MAC loopback ..." 235 tr 39 pbm=xe,hg loopbackmode=mac snakepath=two c=4 236 237 echo "Running internal snake on all ports, PHY loopback ..." 238 tr 39 pbm=xe,hg loopbackmode=phy snakepath=two c=4 239 240 echo "Running MAC loopback V2 on all ports ..." 241 tr 48 smi=103 dmi=42 vlan=5 pi=0x11335577 sendm=single 242 243 echo "Running PHY loopback V2 on all ports ..." 244 tr 49 smi=52 dmi=83 vlan=23 pi=0x01204007 sendm=array 245 246 echo "Testing Filters" 247 rcload rc.soc 248 tr 70 249 250 # Show status 251 tl 252 local returnCode $? 253 254 echo Tests Complete. Reinitializing ... 255 rcload rc.soc 256 # We want to show the return code from the tl command which 257 # lists the results. The automated test infrastructure keys off of this 258 # value 259 echo "testsuite: finished: sanity: $returnCode"