apsanity.soc (5682B)
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 # Apache Sanity 7 # 8 # Script to run all available tests. 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 local done 'echo "Test Completed"' 35 36 #Display some useful information 37 date 38 ver 39 soc 40 config show 41 show portmap 42 show params 43 phy info 44 45 dump pcic 46 dump pcim 47 48 #Start Test 49 echo "Running PCI Compliance Test ..." 50 tr 2 51 $done 52 53 echo "Running PCI S-Channel Buffer Test ..." 54 tr 4 55 $done 56 57 echo "Running Register Reset Defaults Test..." 58 tr 1 59 $done 60 61 echo "Running Register Read/Write Test..." 62 tr 3 mask64 63 $done 64 65 rcload rc.soc 66 counter off 67 l2mode off 68 linkscan off 69 memscan off 70 71 echo "Running CPU Benchmarks Test..." 72 tr 21 73 $done 74 75 echo "Running XGS L2 Delete by Port Test..." 76 tr 35 Reset=False 77 78 echo "Running XGS L2 Delete by VLAN Test..." 79 tr 36 Reset=False Count=50 80 81 echo "Running BCM Packet Send Test..." 82 tr 40 83 84 echo "Running BCM Packet Receive Test..." 85 tr 41 86 87 set rct=false 88 echo "Running Memory Tests..." 89 rcload trall_bcm56560_a0.soc 90 $done 91 92 # Re-initialize to clean up of various read/writes to MMU memories 93 set rct=true 94 counter off 95 l2mode off 96 linkscan off 97 memscan off 98 99 echo "Running Counter Width Verification Test..." 100 tr 30 101 $done 102 103 echo "Running Counter Read/Write Test..." 104 tr 31 105 $done 106 107 set rct=false 108 echo "Running Memory Hashing Tests..." 109 tr 55 Mem=L2_ENTRY 110 tr 55 Mem=L3_ENTRY_IPV4_UNICAST 111 tr 55 Mem=L3_ENTRY_IPV6_UNICAST 112 tr 55 Mem=L3_ENTRY_IPV4_MULTICAST 113 tr 55 Mem=L3_ENTRY_IPV6_MULTICAST 114 tr 55 Mem=VLAN_XLATE 115 tr 55 Mem=EGR_VLAN_XLATE 116 tr 55 Mem=MPLS_ENTRY 117 tr 55 Mem=ING_VP_VLAN_MEMBERSHIP 118 tr 55 Mem=EGR_VP_VLAN_MEMBERSHIP 119 tr 55 Mem=ING_DNAT_ADDRESS_TYPE 120 tr 55 Mem=L2_ENDPOINT_ID 121 tr 55 Mem=ENDPOINT_QUEUE_MAP 122 $done 123 124 #L2Xm and L3_ENTRY_xxm need init soc only. 125 echo "init soc" 126 init soc 127 128 echo "Running Memory Hashing Overflow Insert Test..." 129 #tr 56 Mem=L2_ENTRY 130 #tr 56 Mem=L3_ENTRY_IPV4_UNICAST 131 #tr 56 Mem=L3_ENTRY_IPV6_UNICAST 132 #tr 56 Mem=L3_ENTRY_IPV4_MULTICAST 133 #tr 56 Mem=L3_ENTRY_IPV6_MULTICAST 134 135 tr 56 Mem=VLAN_XLATE 136 tr 56 Mem=EGR_VLAN_XLATE 137 tr 56 Mem=MPLS_ENTRY 138 tr 56 Mem=ING_VP_VLAN_MEMBERSHIP 139 tr 56 Mem=EGR_VP_VLAN_MEMBERSHIP 140 tr 56 Mem=ING_DNAT_ADDRESS_TYPE 141 tr 56 Mem=L2_ENDPOINT_ID 142 tr 56 Mem=ENDPOINT_QUEUE_MAP 143 $done 144 set rct=true 145 146 echo "Running MDIO Linkscan Test..." 147 tr 60 148 $done 149 150 echo "Running CPU DMA Loopback Test..." 151 tr 17 152 $done 153 154 echo "Running CPU DMA, Scatter/Gather Reload Test..." 155 tr 22 156 $done 157 158 echo "Running CPU DMA, Scatter/Gather Simple Test..." 159 tr 23 PacketsPerChainEnd=1 160 $done 161 162 echo "Running CPU DMA, Scatter/Gather Random Test..." 163 tr 24 PacketsPerChainEnd=1 164 $done 165 166 #MAC Loopback 167 echo "Running MAC Loopback Test - all E ports..." 168 tr 18 PortBitMap=e Speed=max 169 $done 170 171 #PHY Loopback 172 echo "Running PHY Loopback Test - all E ports..." 173 tr 19 PortBitMap=e Speed=max 174 $done 175 176 echo "Running MAC Loopback V2 Test - all E ports..." 177 tr 48 PortBitMap=e 178 $done 179 180 echo "Running PHY Loopback V2 Test - all E ports..." 181 tr 49 PortBitMap=e 182 $done 183 184 #Internal snake Loopback 185 echo "Running Internal Snake Test - all E ports, MAC Loopback..." 186 tr 39 LoopbackMode=MAC snakepath=TWOways PortBitMap=e Count=1 187 $done 188 189 echo "Running Internal Snake Test - all E ports, PHY Loopback..." 190 tr 39 LoopbackMode=PHY snakepath=TWOways PortBitMap=e Count=1 191 $done 192 193 #Traffic Test 194 echo "Running Traffic Test in MAC mode on E ports..." 195 tr 72 RunMode=MAC PortBitMap=e TimeInSeconds=3 196 $done 197 198 echo "Running Traffic Test in PHY mode on E ports..." 199 tr 72 RunMode=PHY PortBitMap=e TimeInSeconds=3 200 $done 201 202 echo "Running TX Reload Test..." 203 tr 90 204 $done 205 206 echo "Running RX Reload Test..." 207 tr 91 208 $done 209 210 set rct=false 211 init soc 212 init misc 213 214 echo "Running VLAN Xlate Overflow Insert Test..." 215 tr 100 216 $done 217 218 echo "Running VLAN Xlate Hashing Test..." 219 tr 101 DualEnable=1 DualHash=0 Count=1024 220 tr 101 DualEnable=1 DualHash=1 Count=1024 221 tr 101 DualEnable=1 DualHash=2 Count=1024 222 tr 101 DualEnable=1 DualHash=3 Count=1024 223 tr 101 DualEnable=1 DualHash=4 Count=1024 224 tr 101 DualEnable=1 DualHash=5 Count=1024 225 $done 226 227 echo "Running Egress VLAN Xlate Overfloew Insert Test..." 228 tr 102 229 $done 230 231 echo "Running Egress VLAN Xlate Hashing Test..." 232 tr 103 DualEnable=1 DualHash=0 Count=1024 233 tr 103 DualEnable=1 DualHash=1 Count=1024 234 tr 103 DualEnable=1 DualHash=2 Count=1024 235 tr 103 DualEnable=1 DualHash=3 Count=1024 236 tr 103 DualEnable=1 DualHash=4 Count=1024 237 tr 103 DualEnable=1 DualHash=5 Count=1024 238 $done 239 240 echo "Running MPLS Overflow Insert Test..." 241 tr 104 242 $done 243 244 echo "Running MPLS Hashing Test..." 245 tr 105 DualEnable=1 DualHash=0 Count=1024 246 tr 105 DualEnable=1 DualHash=1 Count=1024 247 tr 105 DualEnable=1 DualHash=2 Count=1024 248 tr 105 DualEnable=1 DualHash=3 Count=1024 249 tr 105 DualEnable=1 DualHash=4 Count=1024 250 tr 105 DualEnable=1 DualHash=5 Count=1024 251 $done 252 253 echo "Running Software Error Recovery Test ..." 254 linkscan off 255 tr 144 256 $done 257 258 # Show status 259 date 260 tl 261 local returnCode $? 262 263 echo "Tests Complete. Reinitializing ..." 264 config refresh 265 rcload rc.soc 266 counter off 267 l2mode off 268 269 # We want to show the return code from the tl command which 270 # lists the results. The automated test infrastructure keys off of this 271 # value 272 echo "testsuite: finished: sanity: $returnCode"