td3_sanity_screen.soc (6567B)
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 86 set rct=false 87 # Usage: BCM.0>td3_sanity_screen w x y z 88 # (w,x,y,z can be 50,51,52,71) and in any combination 89 # By default ie. if no arguments provided, only TR 50, 52,71 are run 90 echo "Running memory tests ..." 91 if !"expr $1+0 == 50" || !"expr $2+0 == 50" || !"expr $3+0 == 50" || !"expr $4+0 == 50" \ 92 'init soc;cancun load cmh;cancun load cch;init misc;memscan off;sramscan off;' \ 93 'rcload tr50_bcm56870_a0.soc' 94 if !"expr $1+0 == 51" || !"expr $2+0 == 51" || !"expr $3+0 == 51" || !"expr $4+0 == 51" \ 95 'init soc;cancun load cmh;cancun load cch;init misc;memscan off;sramscan off;' \ 96 'rcload tr51_bcm56870_a0.soc' 97 if !"expr $1+0 == 52" || !"expr $2+0 == 52" || !"expr $3+0 == 52" || !"expr $4+0 == 52" \ 98 'init soc;cancun load cmh;cancun load cch;init misc;memscan off;sramscan off;' \ 99 'rcload tr52_bcm56870_a0.soc' 100 if !"expr $1+0 == 71" || !"expr $2+0 == 71" || !"expr $3+0 == 71" || !"expr $4+0 == 71" \ 101 'init soc;cancun load cmh;cancun load cch;init misc;memscan off;sramscan off;' \ 102 'rcload tr71_bcm56870_a0.soc' 103 if !"expr $1+0 == 0" && !"expr $2+0 == 0" && !"expr $3+0 == 0" && !"expr $4+0 == 0" \ 104 'init soc;cancun load cmh;cancun load cch;init misc;memscan off;sramscan off;' \ 105 'rcload tr50_bcm56870_a0.soc' \ 106 'init soc;cancun load cmh;cancun load cch;init misc;memscan off;sramscan off;' \ 107 'rcload tr52_bcm56870_a0.soc' \ 108 'init soc;cancun load cmh;cancun load cch;init misc;memscan off;sramscan off;' \ 109 'rcload tr71_bcm56870_a0.soc' 110 $done 111 112 # Re-initialize to clean up of various read/writes to MMU memories 113 set rct=true 114 rcload rc.soc 115 counter off 116 l2mode off 117 linkscan off 118 memscan off 119 date 120 121 echo "tr 30: Running counter width verification test ..." 122 tr 30 123 $done 124 date 125 126 echo "tr 31: Running counter read/write test ..." 127 tr 31 128 $done 129 date 130 131 #Hashing tests 132 #tr 55 133 134 135 echo "tr 60: Running MDIO Linkscan test ... (requires Linkscan, skipped)" 136 #tr 60 137 #$done 138 #date 139 140 echo "tr 17: Testing CPU DMA loopback ... (requires CANCUN 4.28.1.4, skipped)" 141 #tr 17 142 #$done 143 #date 144 145 #echo "tr 22: Testing CPU DMA, Scatter/Gather Reload ..." 146 #tr 22 147 #$done 148 date 149 150 #echo "tr 23: Testing CPU DMA, Scatter/Gather Simple ..." 151 #tr 23 152 #$done 153 date 154 155 #echo "tr 24: Testing CPU DMA, Scatter/Gather Random ..." 156 #tr 24 157 #$done 158 date 159 160 #MAC Loopback 161 162 echo "tr 18: Testing MAC Loopback - 100 Gb/s all CE ports" 163 tr 18 PortBitMap=ce Speed=100G 164 $done 165 date 166 167 echo "tr 18: Testing MAC Loopback - all Management ports" 168 tr 18 PortBitMap=xe Speed=10G 169 $done 170 date 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 "tr 48: Running MAC loopback V2 on all ports ..." 179 tr 48 PortBitMap=ce 180 #$done 181 date 182 183 echo "tr 49: Running PHY loopback V2 on all ports ..." 184 tr 49 PortBitMap=ce 185 $done 186 date 187 188 #Internal snake Loopback 189 echo "tr 39: Running internal snake on all CE ports, MAC loopback ..." 190 tr 39 LoopbackMode=MAC snakepath=TWOways PortBitMap=ce 191 $done 192 193 echo "tr 39: 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 echo "tr 72: Running Traffic Test in MAC mode on CE ports..." 199 tr 72 RunMode=MAC PortBitMap=ce tis=5 200 $done 201 date 202 203 echo "tr 72: Running Traffic Test in EXTERNAL mode on CE ports with AutoNeg disabled..." 204 if !"expr $5+0 != 10086"\ 205 'tr 72 RunMode=EXTERNAL AutoNeg=False PortBitMap=ce tis=5' 206 $done 207 date 208 209 echo "tr 72: Running Traffic Test in PHY mode on CE ports..." 210 tr 72 RunMode=PHY PortBitMap=ce tis=5 211 $done 212 date 213 214 tr 516 215 $done 216 date 217 218 # if you have cable with following paring 219 # xe0-xe4, xe1-xe5, xe2-xe6, xe3-xe7 220 # xe8-xe12, xe9-xe13, xe10-xe14, xe11-xe15 221 # ... 222 # xe56-xe60, xe57-xe61, xe58-xe62, xe59-xe63 223 # 224 # tr 72 rm=external pbm=xe0,xe4 an=f sp=10g 225 # tr 72 rm=external pbm=xe1,xe5 an=f sp=10g 226 # tr 72 rm=external pbm=xe2,xe6 an=f sp=10g 227 # tr 72 rm=external pbm=xe3,xe7 an=f sp=10g 228 # tr 72 rm=external pbm=xe8,xe12 an=f sp=10g 229 # tr 72 rm=external pbm=xe9,xe13 an=f sp=10g 230 # tr 72 rm=external pbm=xe10,xe14 an=f sp=10g 231 # tr 72 rm=external pbm=xe11,xe15 an=f sp=10g 232 # ... 233 # tr 72 rm=external pbm=xe56,xe60 an=f sp=10g 234 # tr 72 rm=external pbm=xe57,xe61 an=f sp=10g 235 # tr 72 rm=external pbm=xe58,xe62 an=f sp=10g 236 # tr 72 rm=external pbm=xe59,xe63 an=f sp=10g 237 238 # if you have cable with following paring 239 # xe0-xe4, xe1-xe5, xem-xe6, xe3-xe7 240 # xe8-xe12, xe9-xe13, xe10-xe14, xe11-xe15 241 # ... 242 # xe56-xe60, xe57-xe61, xe58-xe62, xe59-xe63 243 # echo "Running external loopback ..." 244 # tr 20 tpbm=xe0-xe3 di=4 an=f s=10g 245 # tr 20 tpbm=xe8-xe11 di=4 an=f s=10g 246 # tr 20 tpbm=xe16-xe19 di=4 an=f s=10g 247 # tr 20 tpbm=xe24-xe27 di=4 an=f s=10g 248 # tr 20 tpbm=xe32-xe35 di=4 an=f s=10g 249 # tr 20 tpbm=xe40-xe43 di=4 an=f s=10g 250 # tr 20 tpbm=xe48-xe51 di=4 an=f s=10g 251 # tr 20 tpbm=xe56-xe59 di=4 an=f s=10g 252 # $done 253 254 # Show status 255 date 256 tl 257 local returnCode $? 258 259 echo Tests Complete. Reinitializing ... 260 config refresh 261 rcload rc.soc 262 counter off 263 l2mode off 264 265 # We want to show the return code from the tl command which 266 # lists the results. The automated test infrastructure keys off of this 267 # value 268 echo "testsuite: finished: sanity: $returnCode"