Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9a11c1d5bb | ||
|
|
cbef5865ec | ||
|
|
8714bbb773 | ||
|
|
d8bf1f7a41 | ||
|
|
da39122c43 | ||
|
|
b66ae47a58 | ||
|
|
d065db7d71 |
@@ -1,6 +1,6 @@
|
|||||||
; =============================================================================
|
; =============================================================================
|
||||||
; Script A for Blanton
|
; Script A for Blanton
|
||||||
; Version : V1.0.3
|
; Version : V1.0.5
|
||||||
; Date : 2026-08-21
|
; Date : 2026-08-21
|
||||||
; Author : ETWen
|
; Author : ETWen
|
||||||
; =============================================================================
|
; =============================================================================
|
||||||
@@ -16,6 +16,15 @@
|
|||||||
; ScriptB/C Add Traffic Test
|
; ScriptB/C Add Traffic Test
|
||||||
; V1.0.3 2026-08-21 utils/wait_init.ttl Created
|
; V1.0.3 2026-08-21 utils/wait_init.ttl Created
|
||||||
; ScriptA Add Wait DUT Ready
|
; ScriptA Add Wait DUT Ready
|
||||||
|
; V1.0.4 2026-08-21 utils/wait_init.ttl Wait on bcmcmd port-up, count (both units > 216)
|
||||||
|
; utils/wait_init.ttl Add WT_UNIT0/WT_UNIT1, skip absent units
|
||||||
|
; ScriptA Add EEPROM info (hpe-eeprom-tlv --bus 4 --addr 0x50)
|
||||||
|
; ScriptA Remove empty Check History block
|
||||||
|
; ScriptA/B Disable lldp + config save before traffic (silent MAC)
|
||||||
|
; ScriptB Add sfputil lpmode off Ethernet513/514
|
||||||
|
; V1.0.5 2026-08-21 config.ttl Add SWB_UNIT0/SWB_UNIT1
|
||||||
|
; utils/wait_init.ttl Follow config.ttl SWB_UNIT0/SWB_UNIT1
|
||||||
|
; ScriptA/B/C Traffic follows SWB_UNIT: -u 0 / -u 1 / skip
|
||||||
; =============================================================================
|
; =============================================================================
|
||||||
include "config.ttl"
|
include "config.ttl"
|
||||||
|
|
||||||
@@ -54,6 +63,10 @@ sendln cmd
|
|||||||
wait prompt_sonic_root
|
wait prompt_sonic_root
|
||||||
sendln "show boot"
|
sendln "show boot"
|
||||||
|
|
||||||
|
; ========== EEPROM Info ==========
|
||||||
|
wait prompt_sonic_root
|
||||||
|
sendln "hpe-eeprom-tlv show --bus 4 --addr 0x50"
|
||||||
|
|
||||||
; ========== Wait DUT Init ==========
|
; ========== Wait DUT Init ==========
|
||||||
wait prompt_sonic_root
|
wait prompt_sonic_root
|
||||||
include "utils/wait_init.ttl"
|
include "utils/wait_init.ttl"
|
||||||
@@ -89,10 +102,6 @@ include "utils/show_pcie_error_reg_SSD.ttl"
|
|||||||
; ========== Check PCIE tree + PCIE link status + GET PCIE bandwidth Test ==========
|
; ========== Check PCIE tree + PCIE link status + GET PCIE bandwidth Test ==========
|
||||||
include "utils/pcie_bus.ttl"
|
include "utils/pcie_bus.ttl"
|
||||||
|
|
||||||
; ========== Check History ==========
|
|
||||||
;wait prompt_sonic_root
|
|
||||||
;sendln "command"
|
|
||||||
|
|
||||||
; ========== Check Margin ==========
|
; ========== Check Margin ==========
|
||||||
if EN_Margin = 1 then
|
if EN_Margin = 1 then
|
||||||
include "utils/show_margin_status.ttl"
|
include "utils/show_margin_status.ttl"
|
||||||
@@ -101,33 +110,85 @@ endif
|
|||||||
; ========== TAKE DATA ==========
|
; ========== TAKE DATA ==========
|
||||||
include "utils/setup_pmon.ttl"
|
include "utils/setup_pmon.ttl"
|
||||||
include "utils/show_dmesg.ttl"
|
include "utils/show_dmesg.ttl"
|
||||||
wait prompt_sonic_root
|
|
||||||
|
|
||||||
;include "utils/xxx.ttl"
|
;include "utils/xxx.ttl"
|
||||||
;wait prompt_sonic_root
|
;wait prompt_sonic_root
|
||||||
;flushrecv
|
;flushrecv
|
||||||
|
|
||||||
; ========== 100G Port Status ==========
|
; ========== 100G Port Status ==========
|
||||||
|
wait prompt_sonic_root
|
||||||
|
sendln "config interface -n asic0 startup Ethernet513"
|
||||||
|
wait prompt_sonic_root
|
||||||
|
sendln "config interface -n asic0 shutdown Ethernet513"
|
||||||
|
wait prompt_sonic_root
|
||||||
|
sendln "config interface -n asic1 startup Ethernet514"
|
||||||
|
wait prompt_sonic_root
|
||||||
|
sendln "config save -y"
|
||||||
|
|
||||||
wait prompt_sonic_root
|
wait prompt_sonic_root
|
||||||
sendln "show interfaces status Ethernet513,Ethernet514"
|
sendln "show interfaces status Ethernet513,Ethernet514"
|
||||||
|
|
||||||
; ========== First Traffic Test ==========
|
; ========== First Traffic Test ==========
|
||||||
|
; Silent MAC
|
||||||
wait prompt_sonic_root
|
wait prompt_sonic_root
|
||||||
sendln "blanton_traffic_linespeed ps"
|
sendln "config feature state lldp disabled"
|
||||||
wait prompt_sonic_root
|
wait prompt_sonic_root
|
||||||
sendln "blanton_traffic_linespeed init"
|
sendln "config save -y"
|
||||||
wait prompt_sonic_root
|
|
||||||
sendln "blanton_traffic_linespeed clear"
|
if SWB_UNIT0 = 1 && SWB_UNIT1 = 1 then
|
||||||
wait prompt_sonic_root
|
wait prompt_sonic_root
|
||||||
pause 15
|
sendln "blanton_traffic_linespeed ps"
|
||||||
sendln "blanton_traffic_linespeed show"
|
wait prompt_sonic_root
|
||||||
wait prompt_sonic_root
|
sendln "blanton_traffic_linespeed init"
|
||||||
sendln "blanton_traffic_linespeed start"
|
wait prompt_sonic_root
|
||||||
wait prompt_sonic_root
|
sendln "blanton_traffic_linespeed clear"
|
||||||
pause 15
|
wait prompt_sonic_root
|
||||||
sendln "blanton_traffic_linespeed stop"
|
pause 15
|
||||||
wait prompt_sonic_root
|
sendln "blanton_traffic_linespeed show"
|
||||||
sendln "blanton_traffic_linespeed report"
|
wait prompt_sonic_root
|
||||||
|
sendln "blanton_traffic_linespeed start"
|
||||||
|
wait prompt_sonic_root
|
||||||
|
pause 15
|
||||||
|
sendln "blanton_traffic_linespeed stop"
|
||||||
|
wait prompt_sonic_root
|
||||||
|
sendln "blanton_traffic_linespeed report"
|
||||||
|
elseif SWB_UNIT0 = 1 && SWB_UNIT1 = 0 then
|
||||||
|
wait prompt_sonic_root
|
||||||
|
sendln "blanton_traffic_linespeed ps -u 0"
|
||||||
|
wait prompt_sonic_root
|
||||||
|
sendln "blanton_traffic_linespeed init -u 0"
|
||||||
|
wait prompt_sonic_root
|
||||||
|
sendln "blanton_traffic_linespeed clear -u 0"
|
||||||
|
wait prompt_sonic_root
|
||||||
|
pause 15
|
||||||
|
sendln "blanton_traffic_linespeed show -u 0"
|
||||||
|
wait prompt_sonic_root
|
||||||
|
sendln "blanton_traffic_linespeed start -u 0"
|
||||||
|
wait prompt_sonic_root
|
||||||
|
pause 15
|
||||||
|
sendln "blanton_traffic_linespeed stop -u 0"
|
||||||
|
wait prompt_sonic_root
|
||||||
|
sendln "blanton_traffic_linespeed report -u 0"
|
||||||
|
elseif SWB_UNIT0 = 0 && SWB_UNIT1 = 1 then
|
||||||
|
wait prompt_sonic_root
|
||||||
|
sendln "blanton_traffic_linespeed ps -u 1"
|
||||||
|
wait prompt_sonic_root
|
||||||
|
sendln "blanton_traffic_linespeed init -u 1"
|
||||||
|
wait prompt_sonic_root
|
||||||
|
sendln "blanton_traffic_linespeed clear -u 1"
|
||||||
|
wait prompt_sonic_root
|
||||||
|
pause 15
|
||||||
|
sendln "blanton_traffic_linespeed show -u 1"
|
||||||
|
wait prompt_sonic_root
|
||||||
|
sendln "blanton_traffic_linespeed start -u 1"
|
||||||
|
wait prompt_sonic_root
|
||||||
|
pause 15
|
||||||
|
sendln "blanton_traffic_linespeed stop -u 1"
|
||||||
|
wait prompt_sonic_root
|
||||||
|
sendln "blanton_traffic_linespeed report -u 1"
|
||||||
|
else
|
||||||
|
|
||||||
|
endif
|
||||||
|
|
||||||
; ========== Show Power on uptime ==========
|
; ========== Show Power on uptime ==========
|
||||||
wait prompt_sonic_root
|
wait prompt_sonic_root
|
||||||
|
|||||||
@@ -52,23 +52,63 @@ wait prompt_sonic_root
|
|||||||
sendln "jobs"
|
sendln "jobs"
|
||||||
|
|
||||||
|
|
||||||
; ========== 100G Port Status ==========
|
; ========== 100G Port ==========
|
||||||
|
; Lpmode Disable
|
||||||
|
wait prompt_sonic_root
|
||||||
|
sendln "sudo sfputil lpmode off Ethernet513"
|
||||||
|
wait prompt_sonic_root
|
||||||
|
sendln "sudo sfputil lpmode off Ethernet514"
|
||||||
|
|
||||||
wait prompt_sonic_root
|
wait prompt_sonic_root
|
||||||
sendln "show interfaces status Ethernet513,Ethernet514"
|
sendln "show interfaces status Ethernet513,Ethernet514"
|
||||||
|
|
||||||
|
|
||||||
; ========== Traffic START ==========
|
; ========== Traffic START ==========
|
||||||
|
; Silent MAC
|
||||||
wait prompt_sonic_root
|
wait prompt_sonic_root
|
||||||
sendln "blanton_traffic_linespeed ps"
|
sendln "config feature state lldp disabled"
|
||||||
wait prompt_sonic_root
|
wait prompt_sonic_root
|
||||||
sendln "blanton_traffic_linespeed init"
|
sendln "config save -y"
|
||||||
wait prompt_sonic_root
|
|
||||||
sendln "blanton_traffic_linespeed clear"
|
if SWB_UNIT0 = 1 && SWB_UNIT1 = 1 then
|
||||||
wait prompt_sonic_root
|
wait prompt_sonic_root
|
||||||
pause 15
|
sendln "blanton_traffic_linespeed ps"
|
||||||
sendln "blanton_traffic_linespeed show"
|
wait prompt_sonic_root
|
||||||
wait prompt_sonic_root
|
sendln "blanton_traffic_linespeed init"
|
||||||
sendln "blanton_traffic_linespeed start"
|
wait prompt_sonic_root
|
||||||
|
sendln "blanton_traffic_linespeed clear"
|
||||||
|
wait prompt_sonic_root
|
||||||
|
pause 15
|
||||||
|
sendln "blanton_traffic_linespeed show"
|
||||||
|
wait prompt_sonic_root
|
||||||
|
sendln "blanton_traffic_linespeed start"
|
||||||
|
elseif SWB_UNIT0 = 1 && SWB_UNIT1 = 0 then
|
||||||
|
wait prompt_sonic_root
|
||||||
|
sendln "blanton_traffic_linespeed ps -u 0"
|
||||||
|
wait prompt_sonic_root
|
||||||
|
sendln "blanton_traffic_linespeed init -u 0"
|
||||||
|
wait prompt_sonic_root
|
||||||
|
sendln "blanton_traffic_linespeed clear -u 0"
|
||||||
|
wait prompt_sonic_root
|
||||||
|
pause 15
|
||||||
|
sendln "blanton_traffic_linespeed show -u 0"
|
||||||
|
wait prompt_sonic_root
|
||||||
|
sendln "blanton_traffic_linespeed start -u 0"
|
||||||
|
elseif SWB_UNIT0 = 0 && SWB_UNIT1 = 1 then
|
||||||
|
wait prompt_sonic_root
|
||||||
|
sendln "blanton_traffic_linespeed ps -u 1"
|
||||||
|
wait prompt_sonic_root
|
||||||
|
sendln "blanton_traffic_linespeed init -u 1"
|
||||||
|
wait prompt_sonic_root
|
||||||
|
sendln "blanton_traffic_linespeed clear -u 1"
|
||||||
|
wait prompt_sonic_root
|
||||||
|
pause 15
|
||||||
|
sendln "blanton_traffic_linespeed show -u 1"
|
||||||
|
wait prompt_sonic_root
|
||||||
|
sendln "blanton_traffic_linespeed start -u 1"
|
||||||
|
else
|
||||||
|
|
||||||
|
endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -43,10 +43,24 @@ wait prompt_sonic_root
|
|||||||
sendln "cat ~/hammer/tools/log.stress_ssd"
|
sendln "cat ~/hammer/tools/log.stress_ssd"
|
||||||
|
|
||||||
; ========== CHECK Traffic counters ==========
|
; ========== CHECK Traffic counters ==========
|
||||||
wait prompt_sonic_root
|
if SWB_UNIT0 = 1 && SWB_UNIT1 = 1 then
|
||||||
sendln "blanton_traffic_linespeed stop"
|
wait prompt_sonic_root
|
||||||
wait prompt_sonic_root
|
sendln "blanton_traffic_linespeed stop"
|
||||||
sendln "blanton_traffic_linespeed report"
|
wait prompt_sonic_root
|
||||||
|
sendln "blanton_traffic_linespeed report"
|
||||||
|
elseif SWB_UNIT0 = 1 && SWB_UNIT1 = 0 then
|
||||||
|
wait prompt_sonic_root
|
||||||
|
sendln "blanton_traffic_linespeed stop -u 0"
|
||||||
|
wait prompt_sonic_root
|
||||||
|
sendln "blanton_traffic_linespeed report -u 0"
|
||||||
|
elseif SWB_UNIT0 = 0 && SWB_UNIT1 = 1 then
|
||||||
|
wait prompt_sonic_root
|
||||||
|
sendln "blanton_traffic_linespeed stop -u 1"
|
||||||
|
wait prompt_sonic_root
|
||||||
|
sendln "blanton_traffic_linespeed report -u 1"
|
||||||
|
else
|
||||||
|
|
||||||
|
endif
|
||||||
|
|
||||||
wait prompt_sonic_root
|
wait prompt_sonic_root
|
||||||
sendln "show reboot-cause"
|
sendln "show reboot-cause"
|
||||||
|
|||||||
@@ -5,8 +5,14 @@ project_name = "Blanton"
|
|||||||
strTestcase="ENV" ;ENV,EMC,Margin...etc
|
strTestcase="ENV" ;ENV,EMC,Margin...etc
|
||||||
|
|
||||||
EN_Margin = 0 ; 1: Enable Margin Test, 0: Disable Margin Test
|
EN_Margin = 0 ; 1: Enable Margin Test, 0: Disable Margin Test
|
||||||
|
|
||||||
EN_log = 1 ; 1: Enable log, 0: Disable log
|
EN_log = 1 ; 1: Enable log, 0: Disable log
|
||||||
|
|
||||||
|
;================================================================
|
||||||
|
; Switch Unit Population
|
||||||
|
;================================================================
|
||||||
|
SWB_UNIT0 = 1 ; 1 = this DUT has switch unit 0, wait for it ; 0 = skip
|
||||||
|
SWB_UNIT1 = 1 ; 1 = this DUT has switch unit 1, wait for it ; 0 = skip
|
||||||
|
|
||||||
;================================================================
|
;================================================================
|
||||||
; Prompt Definitions
|
; Prompt Definitions
|
||||||
;================================================================
|
;================================================================
|
||||||
|
|||||||
@@ -1,30 +1,100 @@
|
|||||||
; =============================================================================
|
; =============================================================================
|
||||||
; File : utils/wait_init.ttl
|
; File : utils/wait_init.ttl
|
||||||
; Version : V1.0.0
|
; Version : V3.0.0
|
||||||
; Date : 2026-08-21
|
; Date : 2026-08-21
|
||||||
; Author : ETWen
|
; Author : ETWen
|
||||||
; =============================================================================
|
; =============================================================================
|
||||||
; Wait until "show platform temperature" is not "Thermal Not detected".
|
; Wait until every switch unit ENABLED below reports more than WT_MIN ports up:
|
||||||
|
; bcmcmd -n <u> -c ps | grep -w up | wc -l
|
||||||
|
;
|
||||||
|
; The DUT is not always fully populated. Which units exist is declared ONCE in
|
||||||
|
; config.ttl, so the traffic blocks in Script A/B/C and this wait agree:
|
||||||
|
; both units -> SWB_UNIT0 = 1 , SWB_UNIT1 = 1
|
||||||
|
; unit 0 only -> SWB_UNIT0 = 1 , SWB_UNIT1 = 0
|
||||||
|
; unit 1 only -> SWB_UNIT0 = 0 , SWB_UNIT1 = 1
|
||||||
|
; no unit -> SWB_UNIT0 = 0 , SWB_UNIT1 = 0 (bypass, returns immediately)
|
||||||
|
;
|
||||||
; Enter : prompt of the previous command is NOT consumed.
|
; Enter : prompt of the previous command is NOT consumed.
|
||||||
; Exit : "show platform temperature" is sent, prompt NOT consumed.
|
; Exit : a command has been sent, prompt NOT consumed (caller does the wait).
|
||||||
|
;
|
||||||
|
; Why the "PORTS0=" marker: TTL can only test for a string, so reading a count
|
||||||
|
; means capturing it. Wrapping the number in an echo gives waitregex a unique
|
||||||
|
; anchor, and the ECHO of the command cannot false-match -- it reads
|
||||||
|
; "PORTS0=$(bcmcmd ..." and the pattern requires a digit right after the "=".
|
||||||
;
|
;
|
||||||
; Version History:
|
; Version History:
|
||||||
; V1.0.0 2026-08-21 Initial Version
|
; V1.0.0 2026-08-21 Initial Version (waited on "show platform temperature"
|
||||||
|
; until it stopped reporting "Thermal Not detected")
|
||||||
|
; V2.0.0 2026-08-21 Wait on the bcmcmd port-up count of BOTH switch units
|
||||||
|
; instead of the thermal sensors; proceed only when both
|
||||||
|
; are greater than WT_MIN (216).
|
||||||
|
; V3.0.0 2026-08-21 Add WT_UNIT0 / WT_UNIT1 so a partly populated DUT can
|
||||||
|
; be declared: wait on the enabled units only, and bypass
|
||||||
|
; entirely when neither is set.
|
||||||
|
; V3.1.0 2026-08-21 Take the population from SWB_UNIT0 / SWB_UNIT1 in
|
||||||
|
; config.ttl instead of local copies, so this wait and the
|
||||||
|
; traffic blocks cannot drift apart.
|
||||||
; =============================================================================
|
; =============================================================================
|
||||||
wt_interval = 10
|
; ---- which units to wait for: SWB_UNIT0 / SWB_UNIT1, set in config.ttl ------
|
||||||
timeout = 30
|
WT_MIN = 216 ; an enabled unit must report MORE than this many ports up
|
||||||
|
WT_INTERVAL = 10 ; seconds between polls
|
||||||
|
; -----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
timeout = 60 ; per-wait cap; bcmcmd ps is not instant
|
||||||
wait prompt_sonic_root
|
wait prompt_sonic_root
|
||||||
|
|
||||||
:WAIT_THERMAL
|
; nothing declared -> bypass
|
||||||
sendln "show platform temperature"
|
if SWB_UNIT0 = 0 then
|
||||||
wait "Thermal Not detected" prompt_sonic_root
|
if SWB_UNIT1 = 0 then
|
||||||
if result = 2 then
|
goto NO_UNITS
|
||||||
goto THERMAL_OK
|
endif
|
||||||
endif
|
endif
|
||||||
wait prompt_sonic_root
|
|
||||||
pause wt_interval
|
|
||||||
goto WAIT_THERMAL
|
|
||||||
|
|
||||||
:THERMAL_OK
|
:WAIT_PORTS
|
||||||
|
wt_ok = 1
|
||||||
|
|
||||||
|
if SWB_UNIT0 = 1 then
|
||||||
|
wt_up0 = 0
|
||||||
|
sendln "echo PORTS0=$(bcmcmd -n 0 -c ps | grep -w up | wc -l)"
|
||||||
|
waitregex "PORTS0=[ ]*([0-9]+)"
|
||||||
|
if result = 1 then
|
||||||
|
str2int wt_up0 groupmatchstr1
|
||||||
|
endif
|
||||||
|
wait prompt_sonic_root
|
||||||
|
if wt_up0 < WT_MIN then
|
||||||
|
wt_ok = 0
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
if SWB_UNIT1 = 1 then
|
||||||
|
wt_up1 = 0
|
||||||
|
sendln "echo PORTS1=$(bcmcmd -n 1 -c ps | grep -w up | wc -l)"
|
||||||
|
waitregex "PORTS1=[ ]*([0-9]+)"
|
||||||
|
if result = 1 then
|
||||||
|
str2int wt_up1 groupmatchstr1
|
||||||
|
endif
|
||||||
|
wait prompt_sonic_root
|
||||||
|
if wt_up1 < WT_MIN then
|
||||||
|
wt_ok = 0
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
if wt_ok = 1 then
|
||||||
|
goto PORTS_OK
|
||||||
|
endif
|
||||||
|
|
||||||
|
pause WT_INTERVAL
|
||||||
|
goto WAIT_PORTS
|
||||||
|
|
||||||
|
; ---- exits ------------------------------------------------------------------
|
||||||
|
; Both leave exactly one prompt unconsumed, so the caller's next
|
||||||
|
; "wait prompt_sonic_root" has something to match.
|
||||||
|
:NO_UNITS
|
||||||
|
sendln "echo wait_init:no-switch-unit-declared,bypassing-port-wait"
|
||||||
|
goto DONE
|
||||||
|
|
||||||
|
:PORTS_OK
|
||||||
|
sendln ""
|
||||||
|
|
||||||
|
:DONE
|
||||||
timeout = 0
|
timeout = 0
|
||||||
sendln "show platform temperature"
|
|
||||||
|
|||||||
Reference in New Issue
Block a user