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.soc (8705B)


      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
      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 
     45 echo "tr 1: Running Register reset defaults ..."
     46 tr 1
     47 $done
     48 date
     49 
     50 echo "tr 2: Running PCI Compliance ..."
     51 tr 2
     52 $done
     53 date
     54 
     55 # tr 3 needs init-soc/misc to be run, hence it start below with the rest.
     56 
     57 echo "tr 4: Running PCI S-Channel Buf ..."
     58 tr 4
     59 $done
     60 date
     61 
     62 init soc
     63 cancun load cmh
     64 cancun load cch
     65 init misc
     66 echo "tr 3: Running Register read/write ..."
     67 tr 3 mask64
     68 $done
     69 date
     70 
     71 # TR 50/51/52/71 are being run upfront so as to catch any basic access/traffic issues
     72 counter off
     73 l2mode off
     74 linkscan off
     75 init soc
     76 cancun load cmh
     77 cancun load cch
     78 init misc
     79 set rct=false
     80 echo "Running memory tests ..."
     81 if !"expr $1+0 == 50" || !"expr $2+0 == 50" || !"expr $3+0 == 50" || !"expr $4+0 == 50" \
     82     'init soc;cancun load cmh;cancun load cch;init misc;memscan off; sramscan off;' \
     83     'rcload tr50_bcm56770_a0.soc'
     84 if !"expr $1+0 == 51" || !"expr $2+0 == 51" || !"expr $3+0 == 51" || !"expr $4+0 == 51" \
     85     'init soc;cancun load cmh;cancun load cch;init misc;memscan off; sramscan off;' \
     86     'rcload tr51_bcm56770_a0.soc'
     87 if !"expr $1+0 == 52" || !"expr $2+0 == 52" || !"expr $3+0 == 52" || !"expr $4+0 == 52" \
     88     'init soc;cancun load cmh;cancun load cch;init misc;memscan off; sramscan off;' \
     89     'rcload tr52_bcm56770_a0.soc'
     90 if !"expr $1+0 == 71" || !"expr $2+0 == 71" || !"expr $3+0 == 71" || !"expr $4+0 == 71" \
     91     'init soc;cancun load cmh;cancun load cch;init misc;memscan off; sramscan off;' \
     92     'rcload tr71_bcm56770_a0.soc'
     93 if !"expr $1+0 == 0" && !"expr $2+0 == 0" && !"expr $3+0 == 0" && !"expr $4+0 == 0" \
     94     'init soc;cancun load cmh;cancun load cch;init misc;memscan off; sramscan off;' \
     95     'rcload tr50_bcm56770_a0.soc' \
     96      'init soc;cancun load cmh;cancun load cch;init misc;memscan off; sramscan off;' \
     97     'rcload tr51_bcm56770_a0.soc' \
     98     'init soc;cancun load cmh;cancun load cch;init misc;memscan off; sramscan off;' \
     99     'rcload tr52_bcm56770_a0.soc' \
    100     'init soc;cancun load cmh;cancun load cch;init misc;memscan off; sramscan off;' \
    101     'rcload tr71_bcm56770_a0.soc'
    102 $done
    103 
    104 # Re-initialize to clean up of various read/writes to MMU memories
    105 set rct=true
    106 rcload rc.soc
    107 counter off
    108 l2mode off
    109 linkscan off
    110 memscan off
    111 date
    112 
    113 echo "tr 17: Testing CPU DMA loopback ..."
    114 tr 17
    115 $done
    116 date
    117 
    118 #MAC Loopback
    119 echo "tr 18: Testing MAC Loopback - 10 Gb/s all XE ports"
    120 tr 18 PortBitMap=xe Speed=10G
    121 $done
    122 date
    123 
    124 echo "Testing MAC Loopback - 100 Gb/s all CE ports"
    125 tr 18 PortBitMap=ce Speed=100G
    126 $done
    127 
    128 echo "Testing MAC Loopback - 106 Gb/s all HG ports"
    129 tr 18 PortBitMap=hg Speed=106G
    130 $done
    131 
    132 #PHY Loopback
    133 echo "tr 19: Testing PHY Loopback - 100 Gb/s all CE ports"
    134 tr 19 PortBitMap=ce Speed=100G
    135 $done
    136 date
    137 
    138 echo "Testing PHY Loopback - 100 Gb/s all CE ports"
    139 tr 19 PortBitMap=ce Speed=100G
    140 $done
    141 
    142 echo "Testing PHY Loopback - 106 Gb/s all HG ports"
    143 tr 19 PortBitMap=hg Speed=106G
    144 $done
    145 
    146 rcload rc.soc
    147 counter off
    148 l2mode off
    149 linkscan off
    150 memscan off
    151 
    152 echo "tr 21: Running CPU Benchmarks ..."
    153 tr 21
    154 $done
    155 date
    156 
    157 #echo "tr 22: Testing CPU DMA, Scatter/Gather Reload ..."
    158 #tr 22 (Replaced by 500 series of tests)
    159 #$done
    160 date
    161 
    162 #echo "tr 23: Testing CPU DMA, Scatter/Gather Simple ..."
    163 #tr 23 (Replaced by 500 series of tests)
    164 #$done
    165 date
    166 
    167 #echo "tr 24: Testing CPU DMA, Scatter/Gather Random ..."
    168 #tr 24 (Replaced by 500 series of tests)
    169 #$done
    170 date
    171 
    172 echo "tr 30: Running counter width verification test ..."
    173 tr 30
    174 $done
    175 date
    176 
    177 echo "tr 31: Running Counter/MIB test ..."
    178 tr 31
    179 $done
    180 date
    181 
    182 echo "tr 32: Running XGS L2 Ins/Lookup/Del test ..."
    183 tr 32
    184 $done
    185 date
    186 
    187 echo "tr 33: Running XGS L2 Overflow Ins test ..."
    188 tr 33
    189 $done
    190 date
    191 
    192 echo "tr 34: Running XGS L2 Hashing test ..."
    193 tr 34
    194 $done
    195 date
    196 
    197 echo "tr 35: Running XGS L2 Delete by Port test ..."
    198 tr 35
    199 $done
    200 date
    201 
    202 echo "tr 36: Running XGS L2 Delete by VLAN test ..."
    203 tr 36
    204 $done
    205 date
    206 
    207 
    208 #Internal snake Loopback
    209 echo "tr 39: Running internal snake on all XE ports, MAC loopback ..."
    210 tr 39 LoopbackMode=MAC snakepath=TWOways PortBitMap=xe Count=1
    211 $done
    212 date
    213 
    214 echo "tr 39: Running internal snake on all CE ports, PHY loopback ..."
    215 tr 39 LoopbackMode=PHY snakepath=TWOways PortBitMap=ce Count=1
    216 $done
    217 date
    218 
    219 echo "Running internal snake on all CE ports, MAC loopback ..."
    220 tr 39 LoopbackMode=MAC snakepath=TWOways PortBitMap=ce
    221 $done
    222 
    223 echo "Running internal snake on all CE ports, PHY loopback ..."
    224 tr 39 LoopbackMode=PHY snakepath=TWOways PortBitMap=ce
    225 $done
    226 
    227 echo "tr 40: Running BCM Packet Send test ..."
    228 tr 40
    229 $done
    230 date
    231 
    232 echo "tr 41: Running BCM Packet Receive test ..."
    233 tr 41
    234 $done
    235 date
    236 
    237 echo "tr 48: Running MAC loopback V2 on all ports ..."
    238 tr 48 PortBitMap=ce,xe
    239 tr 48 PortBitMap=xe
    240 #$done
    241 
    242 echo "Running PHY loopback V2 on all ports ..."
    243 tr 49 PortBitMap=ce,xe
    244 tr 49 PortBitMap=xe
    245 $done
    246 
    247 echo "tr 60: Running MDIO Linkscan test ..."
    248 tr 60
    249 $done
    250 date
    251 
    252 #Traffic Test
    253 echo "tr 72: Running Traffic Test in MAC mode on XE ports..."
    254 tr 72 RunMode=MAC PortBitMap=xe tis=5
    255 $done
    256 date
    257 
    258 #echo "tr 72: Running Traffic Test in EXTERNAL mode on CE ports with AutoNeg disabled..."
    259 #tr 72 RunMode=EXTERNAL AutoNeg=False PortBitMap=ce tis=5
    260 #$done
    261 #date
    262 
    263 echo "tr 72: Running Traffic Test in PHY mode on CE ports..."
    264 tr 72 RunMode=PHY PortBitMap=ce tis=5
    265 $done
    266 date
    267 
    268 echo "tr 72: Running Traffic Test in MAC mode on CE ports..."
    269 tr 72 RunMode=MAC PortBitMap=ce tis=5
    270 $done
    271 date
    272 
    273 echo "Running Traffic Test in PHY mode on XE ports..."
    274 tr 72 RunMode=PHY PortBitMap=xe
    275 
    276 echo "tr 73: Running SNMP MIB Object Test test ..."
    277 tr 73
    278 $done
    279 date
    280 
    281 echo "tr 85: Running L3 IPV6 Overflow Ins test ..."
    282 tr 85
    283 $done
    284 date
    285 
    286 echo "tr 86: Running L3 IPV6 Hashing test ..."
    287 tr 86
    288 $done
    289 date
    290 
    291 echo "tr 87: L3 IPV4 Overflow Ins test ..."
    292 tr 87
    293 $done
    294 date
    295 
    296 echo "tr 88: L3 IPV4 Hashing test ..."
    297 tr 88
    298 $done
    299 date
    300 
    301 echo "tr 90: TX Reload Test ..."
    302 #tr 90
    303 #$done
    304 #date
    305 
    306 #echo "tr 91: RX Reload Test ..."
    307 #tr 91
    308 #$done
    309 #date
    310 
    311 #echo "tr 100: VLAN xlate Overflow Ins Test ..."
    312 #tr 100
    313 #$done
    314 #date
    315 
    316 echo "tr 101: VLAN xlate Hashing Test ..."
    317 tr 101
    318 $done
    319 date
    320 
    321 #echo "tr 102: Egr VLAN xlate Ovrflw Ins Test ..."
    322 #tr 102
    323 #$done
    324 #date
    325 
    326 echo "tr 103: Egr VLAN xlate Hashing Test ..."
    327 tr 103
    328 $done
    329 date
    330 
    331 #echo "tr 104: MPLS Overflow Ins Test ..."
    332 #tr 104
    333 #$done
    334 #date
    335 
    336 echo "tr 105: MPLS Hashing Test ..."
    337 tr 105
    338 $done
    339 date
    340 
    341 #echo "tr 201: Simple CMICx Sim Test Test ..."
    342 #tr 201
    343 #$done
    344 #date
    345 
    346 #echo "tr 501: Streaming test ..."
    347 #tr 501
    348 #$done
    349 #date
    350 
    351 #echo "tr 500: Running Traffic Test in PHY mode on XE ports test ..."
    352 #tr 500
    353 #$done
    354 #date
    355 #
    356 #echo "tr 502: Running SBUS DMA Performance test ..."
    357 #tr 502
    358 #$done
    359 #date
    360 #
    361 #echo "tr 503: Running CCM DMA functionality test ..."
    362 #tr 503
    363 #$done
    364 #date
    365 #
    366 #echo "tr 504: Running FIFO DMA functionality test ..."
    367 #tr 504
    368 #$done
    369 #date
    370 #
    371 #echo "tr 505: Running SCHAN DMA functionality test ..."
    372 #tr 505
    373 #$done
    374 #date
    375 #
    376 #echo "tr 506: SBUS DMA stress test ..."
    377 #tr 506
    378 #$done
    379 #date
    380 
    381 #echo "tr 507: Latency test ..."
    382 #tr 507
    383 #$done
    384 #date
    385 
    386 #echo "tr 510: L2UC test ..."
    387 #tr 510
    388 #$done
    389 #date
    390 
    391 #echo "tr 511: L2MC test ..."
    392 #tr 511
    393 #$done
    394 #date
    395 
    396 #echo "tr 512: L3UC test ..."
    397 #tr 512
    398 #$done
    399 #date
    400 
    401 #echo "tr 513: IPMC test ..."
    402 #tr 513
    403 #$done
    404 #date
    405 
    406 #echo "tr 514: Flexport test ..."
    407 #tr 514
    408 #$done
    409 #date
    410 
    411 # Not supported on Maverick2 
    412 #echo "tr 515: MBIST test ..."
    413 #tr 515
    414 #$done
    415 #date
    416 
    417 echo "tr 516: CAMBIST test ..."
    418 tr 516
    419 $done
    420 date
    421 
    422 #echo "tr 517: TD3 Power test ..."
    423 #tr 517
    424 #$done
    425 #date
    426 
    427 #echo "tr 901: SER In-House Test ..."
    428 #tr 901
    429 #$done
    430 #date
    431 
    432 #echo "tr 903: ECC Parity test ..."
    433 #tr 903
    434 #$done
    435 #date
    436 
    437 link off
    438 config add parity_enable=1
    439 tr 144
    440 
    441 # Show status
    442 date
    443 tl
    444 local returnCode $?
    445 
    446 echo Tests Complete.  Reinitializing ...
    447 config refresh
    448 rcload rc.soc
    449 counter off
    450 l2mode off
    451 
    452 # We want to show the return code from the tl command which
    453 # lists the results. The automated test infrastructure keys off of this
    454 # value
    455 echo "testsuite: finished: sanity: $returnCode"