th2_sanity.soc (5323B)
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 # Tomahawk2 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 # Port config assumes few 10G XE ports (including mgmt), 11 # few 100G CE ports and few HG[106] ports. 12 # By default use config: $SDK/rc/tomahawk2/config_th2_48x100G_8xhg100_8xhg106.bcm 13 14 # Set run command script not to fail on errors reported by commands 15 # this allows the script to continue if a test fails 16 set rcerror=false 17 18 # Set up test mode: don't stop on errors, show progress on each test 19 tm -stoponerror +progress 20 # Unselect all 21 ts -* 22 23 echo "testsuite: started: sanity" 24 time 'rcload rc.soc' 25 counter off 26 l2mode off 27 28 # We need to print out port status since any cabling effects results. 29 *:ps 30 31 if $?1 'local full_test 1' 32 33 # Avoid link messages while testing 34 linkscan off 35 36 init soc 37 local done 'echo " Done"' 38 39 #Display some useful information 40 date 41 ver 42 soc 43 44 #Start Test 45 echo "Running PCI Compliance ..." 46 tr 2 47 $done 48 49 echo "Running PCI S-Channel Buf ..." 50 tr 4 51 $done 52 53 54 echo "Running Register reset defaults ..." 55 tr 1 56 $done 57 58 init soc 59 init misc 60 echo "Running Register read/write ..." 61 tr 3 mask64 62 $done 63 64 rcload rc.soc 65 counter off 66 l2mode off 67 linkscan off 68 memscan off 69 70 echo "Running CPU Benchmarks ..." 71 tr 21 72 $done 73 74 set rct=false 75 echo "Running memory tests ..." 76 rcload trall_bcm56970_a0.soc 77 78 $done 79 80 # Re-initialize to clean up of various read/wrires to MMU memories 81 set rct=true 82 rcload rc.soc 83 counter off 84 l2mode off 85 linkscan off 86 memscan off 87 88 echo "Running counter width verification test ..." 89 tr 30 90 $done 91 92 echo "Running counter read/write test ..." 93 tr 31 94 $done 95 96 #Hashing tests - TBD 97 #tr 55 98 99 echo "Running MDIO Linkscan test" 100 tr 60 101 $done 102 103 echo "Testing CPU DMA loopback ..." 104 tr 17 105 $done 106 107 echo "Testing CPU DMA, Scatter/Gather Reload ..." 108 #tr 22 109 $done 110 111 echo "Testing CPU DMA, Scatter/Gather Simple ..." 112 #tr 23 113 $done 114 115 echo "Testing CPU DMA, Scatter/Gather Random ..." 116 #tr 24 117 $done 118 119 #MAC Loopback 120 echo "Testing MAC Loopback - 10 Gb/s all XE ports" 121 tr 18 PortBitMap=xe Speed=10G 122 $done 123 124 echo "Testing MAC Loopback - 100 Gb/s all CE ports" 125 tr 18 PortBitMap=ce Speed=100G 126 $done 127 128 echo "Testing MAC Loopback - 106 Gb/s all HG ports" 129 tr 18 PortBitMap=hg Speed=106G 130 $done 131 132 #PHY Loopback 133 echo "Testing PHY Loopback - 10 Gb/s all XE ports" 134 tr 19 PortBitMap=xe Speed=10G 135 $done 136 137 echo "Testing PHY Loopback - 100 Gb/s all CE ports" 138 tr 19 PortBitMap=ce Speed=100G 139 $done 140 141 echo "Testing PHY Loopback - 106 Gb/s all HG ports" 142 tr 19 PortBitMap=hg Speed=106G 143 $done 144 145 echo "Running MAC loopback V2 on all ports ..." 146 tr 48 PortBitMap=ce,xe 147 $done 148 149 echo "Running PHY loopback V2 on all ports ..." 150 tr 49 PortBitMap=ce,xe 151 $done 152 153 #Internal snake Loopback 154 echo "Running internal snake on all XE ports, MAC loopback ..." 155 tr 39 LoopbackMode=MAC snakepath=TWOways PortBitMap=xe 156 $done 157 158 echo "Running internal snake on all XE ports, PHY loopback ..." 159 tr 39 LoopbackMode=PHY snakepath=TWOways PortBitMap=xe 160 $done 161 162 echo "Running internal snake on all CE ports, MAC loopback ..." 163 tr 39 LoopbackMode=MAC snakepath=TWOways PortBitMap=ce 164 $done 165 166 echo "Running internal snake on all CE ports, PHY loopback ..." 167 tr 39 LoopbackMode=PHY snakepath=TWOways PortBitMap=ce 168 $done 169 170 #Traffic Test 171 echo "Running Traffic Test in MAC mode on CE ports..." 172 tr 72 RunMode=MAC PortBitMap=ce 173 $done 174 175 echo "Running Traffic Test in PHY mode on CE ports..." 176 tr 72 RunMode=PHY PortBitMap=ce 177 $done 178 179 echo "Running Software BUS BUFFER Error Recovery Test ..." 180 linkscan off 181 tr 143 182 183 echo "Running Software Error Recovery Test ..." 184 linkscan off 185 tr 144 186 187 # if you have cable with following paring 188 # xe0-xe4, xe1-xe5, xe2-xe6, xe3-xe7 189 # xe8-xe12, xe9-xe13, xe10-xe14, xe11-xe15 190 # ... 191 # xe56-xe60, xe57-xe61, xe58-xe62, xe59-xe63 192 # 193 # tr 72 rm=external pbm=xe0,xe4 an=f sp=10g 194 # tr 72 rm=external pbm=xe1,xe5 an=f sp=10g 195 # tr 72 rm=external pbm=xe2,xe6 an=f sp=10g 196 # tr 72 rm=external pbm=xe3,xe7 an=f sp=10g 197 # tr 72 rm=external pbm=xe8,xe12 an=f sp=10g 198 # tr 72 rm=external pbm=xe9,xe13 an=f sp=10g 199 # tr 72 rm=external pbm=xe10,xe14 an=f sp=10g 200 # tr 72 rm=external pbm=xe11,xe15 an=f sp=10g 201 # ... 202 # tr 72 rm=external pbm=xe56,xe60 an=f sp=10g 203 # tr 72 rm=external pbm=xe57,xe61 an=f sp=10g 204 # tr 72 rm=external pbm=xe58,xe62 an=f sp=10g 205 # tr 72 rm=external pbm=xe59,xe63 an=f sp=10g 206 207 # if you have cable with following paring 208 # xe0-xe4, xe1-xe5, xem-xe6, xe3-xe7 209 # xe8-xe12, xe9-xe13, xe10-xe14, xe11-xe15 210 # ... 211 # xe56-xe60, xe57-xe61, xe58-xe62, xe59-xe63 212 # echo "Running external loopback ..." 213 # tr 20 tpbm=xe0-xe3 di=4 an=f s=10g 214 # tr 20 tpbm=xe8-xe11 di=4 an=f s=10g 215 # tr 20 tpbm=xe16-xe19 di=4 an=f s=10g 216 # tr 20 tpbm=xe24-xe27 di=4 an=f s=10g 217 # tr 20 tpbm=xe32-xe35 di=4 an=f s=10g 218 # tr 20 tpbm=xe40-xe43 di=4 an=f s=10g 219 # tr 20 tpbm=xe48-xe51 di=4 an=f s=10g 220 # tr 20 tpbm=xe56-xe59 di=4 an=f s=10g 221 # $done 222 223 # Show status 224 date 225 tl 226 local returnCode $? 227 228 echo Tests Complete. Reinitializing ... 229 config refresh 230 rcload rc.soc 231 counter off 232 l2mode off 233 234 # We want to show the return code from the tl command which 235 # lists the results. The automated test infrastructure keys off of this 236 # value 237 echo "testsuite: finished: sanity: $returnCode" 238