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

th2_sanity_screen.soc (6364B)


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