metrolitesanity_screen.soc (6110B)
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 # Metrolite 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 23 counter off 24 l2mode off 25 26 # We need to print out port status since any cabling effects results. 27 *:ps 28 29 if $?1 'local full_test 1' 30 31 # Avoid link messages while testing 32 linkscan off 33 34 init soc 35 local done 'echo " Done";date' 36 37 #Display some useful information 38 date 39 ver 40 soc 41 config show 42 show portmap 43 show params 44 phy info 45 46 $done 47 48 #Start Test 49 date 50 echo "Running PCI Compliance ..." 51 tr 2 52 $done 53 54 date 55 echo "Running PCI S-Channel Buf ..." 56 tr 4 57 $done 58 59 date 60 echo "Running Register reset defaults ..." 61 tr 1 62 $done 63 64 init soc 65 init misc 66 date 67 echo "Running Register read/write ..." 68 tr 3 mask64 69 $done 70 date 71 72 rcload rc.soc 73 counter off 74 l2mode off 75 linkscan off 76 memscan off 77 78 date 79 echo "Running CPU Benchmarks ..." 80 tr 21 81 $done 82 83 date 84 set rct=false 85 # Usage: BCM.0>metrolitesanity_screen w x y z 86 # (w,x,y,z can be 50,51,52,71) and in any combination 87 # By default ie. if no arguments provided, only TR 52,71 are run 88 echo "Running memory tests ..." 89 if !"expr $1+0 == 50" || !"expr $2+0 == 50" || !"expr $3+0 == 50" || !"expr $4+0 == 50" \ 90 'rcload tr50_bcm56270_a0.soc' 91 if !"expr $1+0 == 51" || !"expr $2+0 == 51" || !"expr $3+0 == 51" || !"expr $4+0 == 51" \ 92 'rcload tr51_bcm56270_a0.soc' 93 if !"expr $1+0 == 52" || !"expr $2+0 == 52" || !"expr $3+0 == 52" || !"expr $4+0 == 52" \ 94 'rcload tr52_bcm56270_a0.soc' 95 if !"expr $1+0 == 71" || !"expr $2+0 == 71" || !"expr $3+0 == 71" || !"expr $4+0 == 71" \ 96 'rcload tr71_bcm56270_a0.soc' 97 if !"expr $1+0 == 0" && !"expr $2+0 == 0" && !"expr $3+0 == 0" && !"expr $4+0 == 0" \ 98 'rcload tr52_bcm56270_a0.soc' \ 99 'rcload tr71_bcm56270_a0.soc' 100 $done 101 date 102 103 # Re-initialize to clean up of various read/writes to MMU memories 104 set rct=true 105 rcload rc.soc 106 counter off 107 l2mode off 108 linkscan off 109 memscan off 110 111 date 112 echo "Running counter width verification test ..." 113 tr 30 114 $done 115 116 date 117 echo "Running counter read/write test ..." 118 tr 31 119 $done 120 121 122 #echo "Running MDIO Linkscan test" 123 #tr 60 124 #$done 125 126 #echo "Testing CPU DMA loopback ..." 127 #tr 17 128 #$done 129 130 #echo "Testing CPU DMA, Scatter/Gather Reload ..." 131 #tr 22 132 #$done 133 134 #echo "Testing CPU DMA, Scatter/Gather Simple ..." 135 #tr 23 136 #$done 137 138 #echo "Testing CPU DMA, Scatter/Gather Random ..." 139 #tr 24 140 #$done 141 142 #MAC Loopback 143 date 144 echo "Testing MAC Loopback - all XE/GE ports" 145 tr 18 PortBitMap=xe,ge Speed=max 146 $done 147 148 #echo "Testing MAC Loopback - 100 Gb/s all CE ports" 149 #tr 18 PortBitMap=ce Speed=100G 150 #$done 151 152 #echo "Testing MAC Loopback - 106 Gb/s all HG ports" 153 #tr 18 PortBitMap=hg Speed=106G 154 #$done 155 156 #PHY Loopback 157 #echo "Testing PHY Loopback - all XE/GE ports" 158 #tr 19 PortBitMap=xe,ge Speed=max 159 #$done 160 161 #echo "Testing PHY Loopback - 100 Gb/s all CE ports" 162 #tr 19 PortBitMap=ce Speed=100G 163 #$done 164 165 #echo "Testing PHY Loopback - 106 Gb/s all HG ports" 166 #tr 19 PortBitMap=hg Speed=106G 167 #$done 168 169 #echo "Running MAC loopback V2 on all ports ..." 170 #tr 48 PortBitMap=ce,xe 171 #tr 48 PortBitMap=xe 172 #$done 173 174 #echo "Running PHY loopback V2 on all ports ..." 175 #tr 49 PortBitMap=ce,xe 176 #tr 49 PortBitMap=xe 177 #$done 178 179 #Internal snake Loopback 180 date 181 echo "Running internal snake on all XE ports, MAC loopback ..." 182 tr 39 LoopbackMode=MAC snakepath=TWOways PortBitMap=xe 183 $done 184 185 #echo "Running internal snake on all XE ports, PHY loopback ..." 186 #tr 39 LoopbackMode=PHY snakepath=TWOways PortBitMap=xe 187 #$done 188 189 #echo "Running internal snake on all CE ports, MAC loopback ..." 190 #tr 39 LoopbackMode=MAC snakepath=TWOways PortBitMap=ce 191 #$done 192 193 #echo "Running internal snake on all CE ports, PHY loopback ..." 194 #tr 39 LoopbackMode=PHY snakepath=TWOways PortBitMap=ce 195 #$done 196 197 #Traffic Test 198 date 199 echo "Running Traffic Test in MAC mode on XE ports..." 200 tr 72 RunMode=MAC PortBitMap=xe tis=5 201 $done 202 203 #echo "Running Traffic Test in EXTERNAL mode on XE ports with AutoNeg disabled..." 204 #tr 72 RunMode=EXTERNAL AutoNeg=False PortBitMap=xe 205 #$done 206 207 #echo "Running Traffic Test in PHY mode on XE ports..." 208 #tr 72 RunMode=PHY PortBitMap=xe tis=5 209 #$done 210 211 # if you have cable with following paring 212 # xe0-xe4, xe1-xe5, xe2-xe6, xe3-xe7 213 # xe8-xe12, xe9-xe13, xe10-xe14, xe11-xe15 214 # ... 215 # xe56-xe60, xe57-xe61, xe58-xe62, xe59-xe63 216 # 217 # tr 72 rm=external pbm=xe0,xe4 an=f sp=10g 218 # tr 72 rm=external pbm=xe1,xe5 an=f sp=10g 219 # tr 72 rm=external pbm=xe2,xe6 an=f sp=10g 220 # tr 72 rm=external pbm=xe3,xe7 an=f sp=10g 221 # tr 72 rm=external pbm=xe8,xe12 an=f sp=10g 222 # tr 72 rm=external pbm=xe9,xe13 an=f sp=10g 223 # tr 72 rm=external pbm=xe10,xe14 an=f sp=10g 224 # tr 72 rm=external pbm=xe11,xe15 an=f sp=10g 225 # ... 226 # tr 72 rm=external pbm=xe56,xe60 an=f sp=10g 227 # tr 72 rm=external pbm=xe57,xe61 an=f sp=10g 228 # tr 72 rm=external pbm=xe58,xe62 an=f sp=10g 229 # tr 72 rm=external pbm=xe59,xe63 an=f sp=10g 230 231 # if you have cable with following paring 232 # xe0-xe4, xe1-xe5, xem-xe6, xe3-xe7 233 # xe8-xe12, xe9-xe13, xe10-xe14, xe11-xe15 234 # ... 235 # xe56-xe60, xe57-xe61, xe58-xe62, xe59-xe63 236 # echo "Running external loopback ..." 237 # tr 20 tpbm=xe0-xe3 di=4 an=f s=10g 238 # tr 20 tpbm=xe8-xe11 di=4 an=f s=10g 239 # tr 20 tpbm=xe16-xe19 di=4 an=f s=10g 240 # tr 20 tpbm=xe24-xe27 di=4 an=f s=10g 241 # tr 20 tpbm=xe32-xe35 di=4 an=f s=10g 242 # tr 20 tpbm=xe40-xe43 di=4 an=f s=10g 243 # tr 20 tpbm=xe48-xe51 di=4 an=f s=10g 244 # tr 20 tpbm=xe56-xe59 di=4 an=f s=10g 245 # $done 246 247 # Show status 248 date 249 tl 250 local returnCode $? 251 252 echo Tests Complete. Reinitializing ... 253 config refresh 254 rcload rc.soc 255 counter off 256 l2mode off 257 258 # We want to show the return code from the tl command which 259 # lists the results. The automated test infrastructure keys off of this 260 # value 261 echo "testsuite: finished: sanity: $returnCode"