apsanity_screen.soc (4324B)
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 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 local done 'echo " Done";date' 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 $done 48 49 #Start Test 50 echo "Running PCI Compliance ..." 51 tr 2 52 $done 53 54 echo "Running PCI S-Channel Buf ..." 55 tr 4 56 $done 57 58 echo "Running Register reset defaults ..." 59 tr 1 60 $done 61 62 init soc 63 init misc 64 echo "Running Register read/write ..." 65 tr 3 mask64 66 $done 67 68 rcload rc.soc 69 counter off 70 l2mode off 71 linkscan off 72 memscan off 73 74 echo "Running CPU Benchmarks ..." 75 tr 21 76 $done 77 78 set rct=false 79 # Usage: BCM.0>apsanity_screen w x y z 80 # (w,x,y,z can be 50,51,52,71) and in any combination 81 # By default ie. if no arguments provided, only TR 52,71 are run 82 echo "Running memory tests ..." 83 if !"expr $1+0 == 50" || !"expr $2+0 == 50" || !"expr $3+0 == 50" || !"expr $4+0 == 50" \ 84 'rcload tr50_bcm56560_a0.soc' 85 if !"expr $1+0 == 51" || !"expr $2+0 == 51" || !"expr $3+0 == 51" || !"expr $4+0 == 51" \ 86 'rcload tr51_bcm56560_a0.soc' 87 if !"expr $1+0 == 52" || !"expr $2+0 == 52" || !"expr $3+0 == 52" || !"expr $4+0 == 52" \ 88 'rcload tr52_bcm56560_a0.soc' 89 if !"expr $1+0 == 71" || !"expr $2+0 == 71" || !"expr $3+0 == 71" || !"expr $4+0 == 71" \ 90 'rcload tr71_bcm56560_a0.soc' 91 if !"expr $1+0 == 0" && !"expr $2+0 == 0" && !"expr $3+0 == 0" && !"expr $4+0 == 0" \ 92 'rcload tr52_bcm56560_a0.soc' \ 93 'rcload tr71_bcm56560_a0.soc' 94 $done 95 96 # Re-initialize to clean up of various read/writes to MMU memories 97 set rct=true 98 rcload rc.soc 99 counter off 100 l2mode off 101 linkscan off 102 memscan off 103 104 echo "Running counter width verification test ..." 105 tr 30 106 $done 107 108 echo "Running counter read/write test ..." 109 tr 31 110 $done 111 112 #Hashing tests 113 #tr 55 114 115 echo "Running MDIO Linkscan test" 116 tr 60 117 $done 118 119 echo "Testing CPU DMA loopback ..." 120 tr 17 121 $done 122 123 #echo "Testing CPU DMA, Scatter/Gather Reload ..." 124 #tr 22 125 #$done 126 127 #echo "Testing CPU DMA, Scatter/Gather Simple ..." 128 #tr 23 129 #$done 130 131 #echo "Testing CPU DMA, Scatter/Gather Random ..." 132 #tr 24 133 #$done 134 135 #MAC Loopback 136 echo "Testing MAC Loopback - all E ports" 137 tr 18 PortBitMap=e Speed=max 138 $done 139 140 #echo "Testing MAC Loopback - 106 Gb/s all HG ports" 141 #tr 18 PortBitMap=hg Speed=106G 142 #$done 143 144 #PHY Loopback 145 echo "Testing PHY Loopback - all E ports" 146 tr 19 PortBitMap=e Speed=max 147 $done 148 149 #echo "Testing PHY Loopback - 106 Gb/s all HG ports" 150 #tr 19 PortBitMap=hg Speed=106G 151 #$done 152 153 #echo "Running MAC loopback V2 on all ports ..." 154 #tr 48 PortBitMap=ce,xe 155 #tr 48 PortBitMap=xe 156 #$done 157 158 #echo "Running PHY loopback V2 on all ports ..." 159 #tr 49 PortBitMap=ce,xe 160 #tr 49 PortBitMap=xe 161 #$done 162 163 #Internal snake Loopback 164 echo "Running internal snake on all E ports, MAC loopback ..." 165 tr 39 LoopbackMode=MAC snakepath=TWOways PortBitMap=e Count=1 166 $done 167 168 echo "Running internal snake on all E ports, PHY loopback ..." 169 tr 39 LoopbackMode=PHY snakepath=TWOways PortBitMap=e Count=1 170 $done 171 172 #Traffic Test 173 echo "Running Traffic Test in MAC mode on E ports..." 174 tr 72 RunMode=MAC PortBitMap=e tis=5 175 $done 176 177 echo "Running Traffic Test in EXTERNAL mode on E ports with AutoNeg disabled..." 178 tr 72 RunMode=EXTERNAL AutoNeg=False PortBitMap=e tis=5 179 $done 180 181 echo "Running Traffic Test in PHY mode on E ports..." 182 tr 72 RunMode=PHY PortBitMap=e tis=5 183 $done 184 185 # Show status 186 date 187 tl 188 local returnCode $? 189 190 echo Tests Complete. Reinitializing ... 191 config refresh 192 rcload rc.soc 193 counter off 194 l2mode off 195 196 # We want to show the return code from the tl command which 197 # lists the results. The automated test infrastructure keys off of this 198 # value 199 echo "testsuite: finished: sanity: $returnCode"