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

mv2_sanity_screen.soc (8308B)


      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 # Maverick2 Sanity Screen 
      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 1: Running Register reset defaults ..."
     45 tr 1
     46 $done
     47 date
     48 echo "tr 2: Running PCI Compliance ..."
     49 tr 2
     50 $done
     51 date
     52 echo "tr 4: Running PCI S-Channel Buf ..."
     53 tr 4
     54 $done
     55 date
     56 
     57 init soc
     58 cancun load cmh
     59 cancun load cch
     60 init misc
     61 echo "tr 3: Running Register read/write ..."
     62 tr 3 mask64
     63 $done
     64 date
     65 
     66 rcload rc.soc
     67 counter off
     68 l2mode off
     69 linkscan off
     70 memscan off
     71 
     72 echo "tr 21: Running CPU Benchmarks ..."
     73 tr 21
     74 $done
     75 date
     76 
     77 counter off
     78 l2mode off
     79 linkscan off
     80 init soc
     81 cancun load cmh
     82 cancun load cch
     83 init misc
     84 
     85 set rct=false
     86 # Usage: BCM.0>td3_sanity_screen w x y z
     87 # (w,x,y,z can be 50,51,52,71) and in any combination
     88 # By default ie. if no arguments provided, only TR 50, 52,71 are run
     89 echo "Running memory tests ..."
     90 if !"expr $1+0 == 50" || !"expr $2+0 == 50" || !"expr $3+0 == 50" || !"expr $4+0 == 50" \
     91     'init soc;cancun load cmh;cancun load cch;init misc;memscan off;sramscan off;' \
     92     'rcload tr50_bcm56770_a0.soc'
     93 if !"expr $1+0 == 51" || !"expr $2+0 == 51" || !"expr $3+0 == 51" || !"expr $4+0 == 51" \
     94     'init soc;cancun load cmh;cancun load cch;init misc;memscan off;sramscan off;' \
     95     'rcload tr51_bcm56770_a0.soc'
     96 if !"expr $1+0 == 52" || !"expr $2+0 == 52" || !"expr $3+0 == 52" || !"expr $4+0 == 52" \
     97     'init soc;cancun load cmh;cancun load cch;init misc;memscan off;sramscan off;' \
     98     'rcload tr52_bcm56770_a0.soc'
     99 if !"expr $1+0 == 71" || !"expr $2+0 == 71" || !"expr $3+0 == 71" || !"expr $4+0 == 71" \
    100     'init soc;cancun load cmh;cancun load cch;init misc;memscan off;sramscan off;' \
    101     'rcload tr71_bcm56770_a0.soc'
    102 if !"expr $1+0 == 0" && !"expr $2+0 == 0" && !"expr $3+0 == 0" && !"expr $4+0 == 0" \
    103     'init soc;cancun load cmh;cancun load cch;init misc;memscan off;sramscan off;' \
    104     'rcload tr50_bcm56770_a0.soc' \
    105     'init soc;cancun load cmh;cancun load cch;init misc;memscan off;sramscan off;' \
    106     'rcload tr52_bcm56770_a0.soc' \
    107     'init soc;cancun load cmh;cancun load cch;init misc;memscan off;sramscan off;' \
    108     'rcload tr71_bcm56770_a0.soc'
    109 $done
    110 
    111 # Re-initialize to clean up of various read/writes to MMU memories
    112 set rct=true
    113 rcload rc.soc
    114 counter off
    115 l2mode off
    116 linkscan off
    117 memscan off
    118 date
    119 
    120 echo "tr 17: Testing CPU DMA loopback ..."
    121 tr 17
    122 $done
    123 date
    124 
    125 #MAC Loopback
    126 echo "tr 18: Testing MAC Loopback - 10 Gb/s all XE ports"
    127 tr 18 PortBitMap=xe Speed=10G
    128 $done
    129 date
    130 
    131 echo "Testing MAC Loopback - 100 Gb/s all CE ports"
    132 tr 18 PortBitMap=ce Speed=100G
    133 $done
    134 
    135 echo "Testing MAC Loopback - 106 Gb/s all HG ports"
    136 tr 18 PortBitMap=hg Speed=106G
    137 $done
    138 
    139 #PHY Loopback
    140 echo "tr 19: Testing PHY Loopback - 100 Gb/s all CE ports"
    141 tr 19 PortBitMap=ce Speed=100G
    142 $done
    143 date
    144 
    145 echo "Testing PHY Loopback - 100 Gb/s all CE ports"
    146 tr 19 PortBitMap=ce Speed=100G
    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 "tr 22: Testing CPU DMA, Scatter/Gather Reload ..."
    154 #tr 22 (Replaced by 500 series of tests)
    155 #$done
    156 date
    157 
    158 #echo "tr 23: Testing CPU DMA, Scatter/Gather Simple ..."
    159 #tr 23 (Replaced by 500 series of tests)
    160 #$done
    161 date
    162 
    163 #echo "tr 24: Testing CPU DMA, Scatter/Gather Random ..."
    164 #tr 24 (Replaced by 500 series of tests)
    165 #$done
    166 #date
    167 
    168 echo "tr 30: Running counter width verification test ..."
    169 tr 30
    170 $done
    171 date
    172 
    173 echo "tr 31: Running Counter/MIB test ..."
    174 tr 31
    175 $done
    176 date
    177 
    178 echo "tr 32: Running XGS L2 Ins/Lookup/Del test ..."
    179 tr 32
    180 $done
    181 date
    182 
    183 echo "tr 33: Running XGS L2 Overflow Ins test ..."
    184 tr 33
    185 $done
    186 date
    187 
    188 echo "tr 34: Running XGS L2 Hashing test ..."
    189 tr 34
    190 $done
    191 date
    192 
    193 echo "tr 35: Running XGS L2 Delete by Port test ..."
    194 tr 35
    195 $done
    196 date
    197 
    198 echo "tr 36: Running XGS L2 Delete by VLAN test ..."
    199 tr 36
    200 $done
    201 date
    202 
    203 
    204 #Internal snake Loopback
    205 echo "tr 39: Running internal snake on all XE ports, MAC loopback ..."
    206 tr 39 LoopbackMode=MAC snakepath=TWOways PortBitMap=xe Count=1
    207 $done
    208 date
    209 
    210 echo "tr 39: Running internal snake on all CE ports, PHY loopback ..."
    211 tr 39 LoopbackMode=PHY snakepath=TWOways PortBitMap=ce Count=1
    212 $done
    213 date
    214 
    215 echo "Running internal snake on all CE ports, MAC loopback ..."
    216 tr 39 LoopbackMode=MAC snakepath=TWOways PortBitMap=ce
    217 $done
    218 
    219 echo "Running internal snake on all CE ports, PHY loopback ..."
    220 tr 39 LoopbackMode=PHY snakepath=TWOways PortBitMap=ce
    221 $done
    222 
    223 echo "tr 40: Running BCM Packet Send test ..."
    224 tr 40
    225 $done
    226 date
    227 
    228 echo "tr 41: Running BCM Packet Receive test ..."
    229 tr 41
    230 $done
    231 date
    232 
    233 echo "tr 48: Running MAC loopback  - Mark 2 test ..."
    234 tr 48
    235 $done
    236 date
    237 
    238 
    239 echo "Running MAC loopback V2 on all ports ..."
    240 tr 48 PortBitMap=ce,xe
    241 tr 48 PortBitMap=xe
    242 #$done
    243 
    244 #echo "Running PHY loopback V2 on all ports ..."
    245 #tr 49 PortBitMap=ce,xe
    246 #tr 49 PortBitMap=xe
    247 #$done
    248 
    249 ##Hashing tests
    250 #tr 55
    251 
    252 echo "tr 60: Running MDIO Linkscan test ..."
    253 tr 60
    254 $done
    255 date
    256 
    257 #Traffic Test
    258 echo "tr 72: Running Traffic Test in MAC mode on XE ports..."
    259 tr 72 RunMode=MAC PortBitMap=xe tis=5
    260 $done
    261 date
    262 
    263 #echo "tr 72: Running Traffic Test in EXTERNAL mode on CE ports with AutoNeg disabled..."
    264 #tr 72 RunMode=EXTERNAL AutoNeg=False PortBitMap=ce tis=5
    265 #$done
    266 #date
    267 
    268 echo "tr 72: Running Traffic Test in PHY mode on CE ports..."
    269 tr 72 RunMode=PHY PortBitMap=ce tis=5
    270 $done
    271 date
    272 
    273 echo "tr 72: Running Traffic Test in MAC mode on CE ports..."
    274 tr 72 RunMode=MAC PortBitMap=ce tis=5
    275 $done
    276 date
    277 
    278 echo "Running Traffic Test in PHY mode on XE ports..."
    279 tr 72 RunMode=PHY PortBitMap=xe
    280 
    281 echo "tr 500: Running Traffic Test in PHY mode on XE ports test ..."
    282 tr 500
    283 $done
    284 date
    285 
    286 echo "tr 502: Running SBUS DMA Performance test ..."
    287 tr 502
    288 $done
    289 date
    290 
    291 echo "tr 503: Running CCM DMA functionality test ..."
    292 tr 503
    293 $done
    294 date
    295 
    296 echo "tr 504: Running FIFO DMA functionality test ..."
    297 tr 504
    298 $done
    299 date
    300 
    301 echo "tr 505: Running SCHAN DMA functionality test ..."
    302 tr 505
    303 $done
    304 date
    305 
    306 echo "tr 516 : Running CAMBIST test ..."
    307 tr 516
    308 $done
    309 date
    310 # if you have cable with following paring
    311 #    xe0-xe4, xe1-xe5, xe2-xe6, xe3-xe7
    312 #    xe8-xe12, xe9-xe13, xe10-xe14, xe11-xe15
    313 #    ...
    314 #    xe56-xe60, xe57-xe61, xe58-xe62, xe59-xe63
    315 #
    316 # tr 72 rm=external pbm=xe0,xe4 an=f sp=10g
    317 # tr 72 rm=external pbm=xe1,xe5 an=f sp=10g
    318 # tr 72 rm=external pbm=xe2,xe6 an=f sp=10g
    319 # tr 72 rm=external pbm=xe3,xe7 an=f sp=10g
    320 # tr 72 rm=external pbm=xe8,xe12 an=f sp=10g
    321 # tr 72 rm=external pbm=xe9,xe13 an=f sp=10g
    322 # tr 72 rm=external pbm=xe10,xe14 an=f sp=10g
    323 # tr 72 rm=external pbm=xe11,xe15 an=f sp=10g
    324 # ...
    325 # tr 72 rm=external pbm=xe56,xe60 an=f sp=10g
    326 # tr 72 rm=external pbm=xe57,xe61 an=f sp=10g
    327 # tr 72 rm=external pbm=xe58,xe62 an=f sp=10g
    328 # tr 72 rm=external pbm=xe59,xe63 an=f sp=10g
    329 
    330 # if you have cable with following paring
    331 #    xe0-xe4, xe1-xe5, xem-xe6, xe3-xe7
    332 #    xe8-xe12, xe9-xe13, xe10-xe14, xe11-xe15
    333 #    ...
    334 #    xe56-xe60, xe57-xe61, xe58-xe62, xe59-xe63
    335 # echo "Running external loopback ..."
    336 # tr 20 tpbm=xe0-xe3 di=4 an=f s=10g
    337 # tr 20 tpbm=xe8-xe11 di=4 an=f s=10g
    338 # tr 20 tpbm=xe16-xe19 di=4 an=f s=10g
    339 # tr 20 tpbm=xe24-xe27 di=4 an=f s=10g
    340 # tr 20 tpbm=xe32-xe35 di=4 an=f s=10g
    341 # tr 20 tpbm=xe40-xe43 di=4 an=f s=10g
    342 # tr 20 tpbm=xe48-xe51 di=4 an=f s=10g
    343 # tr 20 tpbm=xe56-xe59 di=4 an=f s=10g
    344 # $done
    345 
    346 # Show status
    347 date
    348 tl
    349 local returnCode $?
    350 
    351 echo Tests Complete.  Reinitializing ...
    352 config refresh
    353 rcload rc.soc
    354 counter off
    355 l2mode off
    356 
    357 # We want to show the return code from the tl command which
    358 # lists the results. The automated test infrastructure keys off of this
    359 # value
    360 echo "testsuite: finished: sanity: $returnCode"