openbcm

Git mirror of https://github.com/Broadcom-Network-Switching-Software/OpenBCM
git clone git://git.finwo.net/mirror/broadcom/openbcm
Log | Files | Refs | README

metrolitesanity.soc (6423B)


      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.
      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 local beagle 0;
     30 if $?BCM53460_A0 || $?BCM53461_A0 \
     31 'local beagle 1;'
     32 
     33 # Avoid link messages while testing
     34 linkscan off
     35 
     36 init soc
     37 local done 'echo "Test Completed"'
     38 
     39 #Display some useful information
     40 date
     41 ver
     42 soc
     43 config show
     44 show portmap
     45 show params
     46 phy info
     47 
     48 
     49 #Start Test
     50 date
     51 echo "Running PCI Compliance Test ..."
     52 tr 2
     53 $done
     54 
     55 date
     56 echo "Running PCI S-Channel Buffer Test ..."
     57 tr 4
     58 $done
     59 
     60 date
     61 echo "Running Register Reset Defaults Test..."
     62 tr 1
     63 $done
     64 
     65 date
     66 echo "Running Register Read/Write Test..."
     67 tr 3 mask64
     68 $done
     69 date
     70 
     71 rcload rc.soc
     72 counter off
     73 l2mode off
     74 linkscan off
     75 memscan off
     76 
     77 date
     78 echo "Running CPU Benchmarks Test..."
     79 tr 21
     80 $done
     81 
     82 if !$beagle \
     83 'date ;\
     84 echo "Running XGS L2 Delete by Port Test..." ;\
     85 tr 35 Reset=False;'
     86 
     87 if !$beagle \
     88 'date;\
     89 echo "Running XGS L2 Delete by VLAN Test...";\
     90 tr 36 Reset=False Count=50;'
     91 
     92 date
     93 echo "Running BCM Packet Send Test..."
     94 tr 40
     95 
     96 date
     97 echo "Running BCM Packet Receive Test..."
     98 tr 41
     99 
    100 date
    101 echo "Running Memory Tests..."
    102 rcload trall_bcm56270_a0.soc
    103 $done
    104 date
    105 
    106 # Re-initialize to clean up of various read/writes to MMU memories
    107 set rct=true
    108 counter off
    109 l2mode off
    110 linkscan off
    111 memscan off
    112 
    113 date
    114 echo "Running Counter Width Verification Test..."
    115 tr 30
    116 $done
    117 
    118 date
    119 echo "Running Counter Read/Write Test..."
    120 tr 31
    121 $done
    122 
    123 date
    124 echo "Running XGS L2 Ins/Lookup/Del Test..."
    125 tr 32
    126 $done
    127 
    128 if !$beagle \
    129 'date; \
    130 echo "Running XGS L2 Overflow Ins Test...";\
    131 tr 33;\
    132 $done;'
    133 
    134 if !$beagle \
    135 'date;\
    136 echo "Running XGS L2 Hashing Test...";\
    137 tr 34;\
    138 $done ;'
    139 
    140 date
    141 set rct=true
    142 
    143 echo "Running MDIO Linkscan Test..."
    144 tr 60
    145 $done
    146 
    147 date
    148 echo "Running CPU DMA Loopback Test..."
    149 tr 17
    150 $done
    151 
    152 date
    153 echo "Running CPU DMA, Scatter/Gather Reload Test..."
    154 tr 22
    155 $done
    156 
    157 date
    158 echo "Running CPU DMA, Scatter/Gather Simple Test..."
    159 tr 23 PacketsPerChainEnd=1
    160 $done
    161 
    162 date
    163 echo "Running CPU DMA, Scatter/Gather Random Test..."
    164 tr 24 PacketsPerChainEnd=1
    165 $done
    166 
    167 #MAC Loopback
    168 date
    169 echo "Running MAC Loopback Test - all ports..."
    170 tr 18 PortBitMap=ge,xe Speed=max
    171 $done
    172 
    173 #PHY Loopback
    174 date
    175 echo "Running PHY Loopback Test - all ports..."
    176 tr 19 PortBitMap=ge,xe Speed=max
    177 $done
    178 
    179 
    180 echo "Running MAC Loopback V2 Test - all ports..."
    181 tr 48 PortBitMap=ge,xe
    182 $done
    183 
    184 echo "Running PHY Loopback V2 Test - all ports..."
    185 tr 49 PortBitMap=ge,xe
    186 $done
    187 
    188 #Internal snake Loopback
    189 date
    190 echo "Running Internal Snake Test - all ports, MAC Loopback..."
    191 tr 39 LoopbackMode=MAC snakepath=TWOways PortBitMap=ge,xe Count=1
    192 $done
    193 
    194 echo "Running Internal Snake Test - all ports, PHY Loopback..."
    195 tr 39 LoopbackMode=PHY snakepath=TWOways PortBitMap=ge,xe Count=1
    196 $done
    197 
    198 
    199 #Traffic Test
    200 date
    201 echo "Running Traffic Test in MAC mode on ports..."
    202 tr 72 RunMode=MAC PortBitMap=ge,xe TimeInSeconds=3
    203 $done
    204 
    205 echo "Running Traffic Test in PHY mode on ports..."
    206 tr 72 RunMode=PHY PortBitMap=ge,xe TimeInSeconds=3
    207 $done
    208 
    209 #enable when external connections are present
    210 #echo "Running Traffic Test in EXTERNAL mode on XE ports with AutoNeg disabled..."
    211 #tr 72 RunMode=EXTERNAL AutoNeg=False PortBitMap=xe
    212 #$done
    213 
    214 # if you have cable with following paring
    215 #    xe0-xe4, xe1-xe5, xe2-xe6, xe3-xe7
    216 # For BCM56272 following pairing should be present
    217 #    ge0-ge4, ge1-ge5, ge2-ge6, ge3-ge7
    218 #if $?BCM56272_A0 \
    219 #    'tr 72 rm=external pbm=ge0,ge4 an=f sp=1000; \
    220 #     tr 72 rm=external pbm=ge1,ge5 an=f sp=1000; \
    221 #     tr 72 rm=external pbm=ge2,ge6 an=f sp=1000; \
    222 #     tr 72 rm=external pbm=ge3,ge7 an=f sp=1000;' \
    223 #else \
    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 
    229 
    230 # if you have cable with following paring
    231 #    xe0-xe4, xe1-xe5, xe2-xe6, xe3-xe7
    232 # For BCM56272 following pairing should be present
    233 #    ge0-ge4, ge1-ge5, ge2-ge6, ge3-ge7
    234 #echo "Running external loopback ..."
    235 #if $?BCM56272_A0 \
    236 #'tr 20 tpbm=ge0-ge3 di=4 an=f s=1000' \
    237 #else \
    238 #'tr 20 tpbm=xe0-xe3 di=4 an=f s=10g'
    239 #$done
    240 
    241 
    242 date
    243 echo "Running SNMP MIB Object Test..."
    244 tr 73
    245 $done
    246 
    247 date
    248 echo "Running TX Reload Test..."
    249 tr 90
    250 $done
    251 
    252 date
    253 echo "Running RX Reload Test..."
    254 tr 91
    255 $done
    256 date
    257 
    258 set rct=false
    259 init soc
    260 init misc
    261 
    262 if !$beagle \
    263 'date; \
    264 echo "Running VLAN Xlate Overflow Insert Test...";\
    265 tr 100;\
    266 $done;'
    267 
    268 if !$beagle \
    269 'date;\
    270 echo "Running VLAN Xlate Hashing Test...";\
    271 tr 101 DualHash=0 Count=1024;\
    272 tr 101 DualHash=1 Count=1024;\
    273 tr 101 DualHash=2 Count=1024;\
    274 tr 101 DualHash=3 Count=1024;\
    275 tr 101 DualHash=4 Count=1024;\
    276 tr 101 DualHash=5 Count=1024;\
    277 $done;'
    278 
    279 if !$beagle \
    280 'date;\
    281 echo "Running Egress VLAN Xlate Overfloew Insert Test...";\
    282 tr 102;\
    283 $done;'
    284 
    285 if !$beagle \
    286 'date;\
    287 echo "Running Egress VLAN Xlate Hashing Test...";\
    288 tr 103 DualEnable=1 DualHash=0 Count=1024;\
    289 tr 103 DualEnable=1 DualHash=1 Count=1024;\
    290 tr 103 DualEnable=1 DualHash=2 Count=1024;\
    291 tr 103 DualEnable=1 DualHash=3 Count=1024;\
    292 tr 103 DualEnable=1 DualHash=4 Count=1024;\
    293 tr 103 DualEnable=1 DualHash=5 Count=1024;\
    294 $done;'
    295 
    296 if !$beagle \
    297 'date;\
    298 echo "Running MPLS Overflow Insert Test...";\
    299 tr 104;\
    300 $done ;'
    301 
    302 if !$beagle \
    303 'date;\
    304 echo "Running MPLS Hashing Test...";\
    305 tr 105 DualEnable=1 DualHash=0 Count=1024;\
    306 tr 105 DualEnable=1 DualHash=1 Count=1024;\
    307 tr 105 DualEnable=1 DualHash=2 Count=1024;\
    308 tr 105 DualEnable=1 DualHash=3 Count=1024;\
    309 tr 105 DualEnable=1 DualHash=4 Count=1024;\
    310 tr 105 DualEnable=1 DualHash=5 Count=1024;\
    311 $done;'
    312 
    313 # Show status
    314 date
    315 tl
    316 local returnCode $?
    317 
    318 echo "Tests Complete.  Reinitializing ..."
    319 config refresh
    320 rcload rc.soc
    321 counter off
    322 l2mode off
    323 
    324 # We want to show the return code from the tl command which
    325 # lists the results. The automated test infrastructure keys off of this
    326 # value
    327 echo "testsuite: finished: sanity: $returnCode"