td3_sanity.soc (7387B)
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 # Trident3 Sanity 7 # 8 # Script to run all available tests as quickly as possible. 9 # For testing basic sanity of new drivers, simulators, chips, etc. 10 11 # Set run command script not to fail on errors reported by commands 12 # this allows the script to continue if a test fails 13 set rcerror=false 14 15 # Set up test mode: don't stop on errors, show progress on each test 16 tm -stoponerror +progress 17 # Unselect all 18 ts -* 19 20 echo "testsuite: started: sanity" 21 time 'rcload rc.soc' 22 counter off 23 l2mode off 24 25 # We need to print out port status since any cabling effects results. 26 *:ps 27 28 if $?1 'local full_test 1' 29 30 # Avoid link messages while testing 31 linkscan off 32 33 init soc 34 local done 'echo " Done"' 35 36 #Display some useful information 37 date 38 ver 39 soc 40 41 #bb voltage core 0.92 42 43 #Start Test 44 echo "tr 2: Running PCI Compliance ..." 45 tr 2 46 $done 47 date 48 echo "tr 4: Running PCI S-Channel Buf ..." 49 tr 4 50 $done 51 date 52 53 echo "tr 1: Running Register reset defaults ..." 54 tr 1 55 $done 56 date 57 58 init soc 59 cancun load cmh 60 cancun load cch 61 init misc 62 echo "tr 3: Running Register read/write ..." 63 tr 3 mask64 64 $done 65 date 66 67 rcload rc.soc 68 counter off 69 l2mode off 70 linkscan off 71 memscan off 72 73 echo "tr 21: Running CPU Benchmarks ..." 74 tr 21 75 $done 76 date 77 78 counter off 79 l2mode off 80 linkscan off 81 init soc 82 cancun load cmh 83 cancun load cch 84 init misc 85 set rct=false 86 # Usage: BCM.0>td3_sanity_screen w x y z 87 # (w,x,y,z can be 50,51,52,71) and in any combination 88 # By default ie. if no arguments provided, only TR 50, 52,71 are run 89 echo "Running memory tests ..." 90 if !"expr $1+0 == 50" || !"expr $2+0 == 50" || !"expr $3+0 == 50" || !"expr $4+0 == 50" \ 91 'init soc;cancun load cmh;cancun load cch;init misc;memscan off; sramscan off;' \ 92 'rcload tr50_bcm56870_a0.soc' 93 if !"expr $1+0 == 51" || !"expr $2+0 == 51" || !"expr $3+0 == 51" || !"expr $4+0 == 51" \ 94 'init soc;cancun load cmh;cancun load cch;init misc;memscan off; sramscan off;' \ 95 'rcload tr51_bcm56870_a0.soc' 96 if !"expr $1+0 == 52" || !"expr $2+0 == 52" || !"expr $3+0 == 52" || !"expr $4+0 == 52" \ 97 'init soc;cancun load cmh;cancun load cch;init misc;memscan off; sramscan off;' \ 98 'rcload tr52_bcm56870_a0.soc' 99 if !"expr $1+0 == 71" || !"expr $2+0 == 71" || !"expr $3+0 == 71" || !"expr $4+0 == 71" \ 100 'init soc;cancun load cmh;cancun load cch;init misc;memscan off; sramscan off;' \ 101 'rcload tr71_bcm56870_a0.soc' 102 if !"expr $1+0 == 0" && !"expr $2+0 == 0" && !"expr $3+0 == 0" && !"expr $4+0 == 0" \ 103 'init soc;cancun load cmh;cancun load cch;init misc;memscan off; sramscan off;' \ 104 'rcload tr50_bcm56870_a0.soc' \ 105 'init soc;cancun load cmh;cancun load cch;init misc;memscan off; sramscan off;' \ 106 'rcload tr52_bcm56870_a0.soc' \ 107 'init soc;cancun load cmh;cancun load cch;init misc;memscan off; sramscan off;' \ 108 'rcload tr71_bcm56870_a0.soc' 109 $done 110 111 # Re-initialize to clean up of various read/writes to MMU memories 112 set rct=true 113 rcload rc.soc 114 counter off 115 l2mode off 116 linkscan off 117 memscan off 118 date 119 120 echo "tr 30: Running counter width verification test ..." 121 tr 30 122 $done 123 date 124 125 echo "tr 31: Running counter read/write test ..." 126 tr 31 127 $done 128 date 129 130 #Hashing tests 131 #tr 55 132 133 echo "tr 60: Running MDIO Linkscan test ..." 134 tr 60 135 $done 136 date 137 138 echo "tr 17: Testing CPU DMA loopback ..." 139 tr 17 140 $done 141 date 142 143 #echo "tr 22: Testing CPU DMA, Scatter/Gather Reload ..." 144 #tr 22 145 #$done 146 date 147 148 #echo "tr 23: Testing CPU DMA, Scatter/Gather Simple ..." 149 #tr 23 150 #$done 151 date 152 153 #echo "tr 24: Testing CPU DMA, Scatter/Gather Random ..." 154 #tr 24 155 #$done 156 date 157 158 #MAC Loopback 159 echo "tr 18: Testing MAC Loopback - 10 Gb/s all XE ports" 160 tr 18 PortBitMap=xe Speed=10G 161 $done 162 date 163 164 echo "Testing MAC Loopback - 100 Gb/s all CE ports" 165 tr 18 PortBitMap=ce Speed=100G 166 $done 167 168 echo "Testing MAC Loopback - 106 Gb/s all HG ports" 169 tr 18 PortBitMap=hg Speed=106G 170 $done 171 172 #PHY Loopback 173 echo "tr 19: Testing PHY Loopback - 100 Gb/s all CE ports" 174 tr 19 PortBitMap=ce Speed=100G 175 $done 176 date 177 178 echo "Testing PHY Loopback - 100 Gb/s all CE ports" 179 tr 19 PortBitMap=ce Speed=100G 180 $done 181 182 echo "Testing PHY Loopback - 106 Gb/s all HG ports" 183 tr 19 PortBitMap=hg Speed=106G 184 $done 185 186 echo "Running MAC loopback V2 on all ports ..." 187 tr 48 PortBitMap=ce,xe 188 tr 48 PortBitMap=xe 189 #$done 190 191 echo "Running PHY loopback V2 on all ports ..." 192 tr 49 PortBitMap=ce,xe 193 tr 49 PortBitMap=xe 194 $done 195 196 #Internal snake Loopback 197 echo "tr 39: Running internal snake on all XE ports, MAC loopback ..." 198 tr 39 LoopbackMode=MAC snakepath=TWOways PortBitMap=xe Count=1 199 $done 200 date 201 202 echo "tr 39: Running internal snake on all CE ports, PHY loopback ..." 203 tr 39 LoopbackMode=PHY snakepath=TWOways PortBitMap=ce Count=1 204 $done 205 date 206 207 echo "Running internal snake on all CE ports, MAC loopback ..." 208 tr 39 LoopbackMode=MAC snakepath=TWOways PortBitMap=ce 209 $done 210 211 echo "Running internal snake on all CE ports, PHY loopback ..." 212 tr 39 LoopbackMode=PHY snakepath=TWOways PortBitMap=ce 213 $done 214 215 #Traffic Test 216 echo "tr 72: Running Traffic Test in MAC mode on XE ports..." 217 tr 72 RunMode=MAC PortBitMap=xe tis=5 218 $done 219 date 220 221 #echo "tr 72: Running Traffic Test in EXTERNAL mode on CE ports with AutoNeg disabled..." 222 #tr 72 RunMode=EXTERNAL AutoNeg=False PortBitMap=ce tis=5 223 #$done 224 #date 225 226 echo "tr 72: Running Traffic Test in PHY mode on CE ports..." 227 tr 72 RunMode=PHY PortBitMap=ce tis=5 228 $done 229 date 230 231 echo "tr 72: Running Traffic Test in MAC mode on CE ports..." 232 tr 72 RunMode=MAC PortBitMap=ce tis=5 233 $done 234 date 235 236 echo "Running Traffic Test in PHY mode on XE ports..." 237 tr 72 RunMode=PHY PortBitMap=xe 238 239 tr 516 240 $done 241 date 242 243 echo "Running Software BUS BUFFER Error Recovery Test ..." 244 linkscan off 245 tr 143 246 $done 247 248 echo "Running Software Error Recovery Test ..." 249 linkscan off 250 tr 144 251 $done 252 253 # if you have cable with following paring 254 # xe0-xe4, xe1-xe5, xe2-xe6, xe3-xe7 255 # xe8-xe12, xe9-xe13, xe10-xe14, xe11-xe15 256 # ... 257 # xe56-xe60, xe57-xe61, xe58-xe62, xe59-xe63 258 # 259 # tr 72 rm=external pbm=xe0,xe4 an=f sp=10g 260 # tr 72 rm=external pbm=xe1,xe5 an=f sp=10g 261 # tr 72 rm=external pbm=xe2,xe6 an=f sp=10g 262 # tr 72 rm=external pbm=xe3,xe7 an=f sp=10g 263 # tr 72 rm=external pbm=xe8,xe12 an=f sp=10g 264 # tr 72 rm=external pbm=xe9,xe13 an=f sp=10g 265 # tr 72 rm=external pbm=xe10,xe14 an=f sp=10g 266 # tr 72 rm=external pbm=xe11,xe15 an=f sp=10g 267 # ... 268 # tr 72 rm=external pbm=xe56,xe60 an=f sp=10g 269 # tr 72 rm=external pbm=xe57,xe61 an=f sp=10g 270 # tr 72 rm=external pbm=xe58,xe62 an=f sp=10g 271 # tr 72 rm=external pbm=xe59,xe63 an=f sp=10g 272 273 # if you have cable with following paring 274 # xe0-xe4, xe1-xe5, xem-xe6, xe3-xe7 275 # xe8-xe12, xe9-xe13, xe10-xe14, xe11-xe15 276 # ... 277 # xe56-xe60, xe57-xe61, xe58-xe62, xe59-xe63 278 # echo "Running external loopback ..." 279 # tr 20 tpbm=xe0-xe3 di=4 an=f s=10g 280 # tr 20 tpbm=xe8-xe11 di=4 an=f s=10g 281 # tr 20 tpbm=xe16-xe19 di=4 an=f s=10g 282 # tr 20 tpbm=xe24-xe27 di=4 an=f s=10g 283 # tr 20 tpbm=xe32-xe35 di=4 an=f s=10g 284 # tr 20 tpbm=xe40-xe43 di=4 an=f s=10g 285 # tr 20 tpbm=xe48-xe51 di=4 an=f s=10g 286 # tr 20 tpbm=xe56-xe59 di=4 an=f s=10g 287 # $done 288 289 # Show status 290 date 291 tl 292 local returnCode $? 293 294 echo Tests Complete. Reinitializing ... 295 config refresh 296 rcload rc.soc 297 counter off 298 l2mode off 299 300 # We want to show the return code from the tl command which 301 # lists the results. The automated test infrastructure keys off of this 302 # value 303 echo "testsuite: finished: sanity: $returnCode"