fix(ttl): Treat 216 ports up as ready, and configure the 100G uplinks

wait_init.ttl: the comparison was strictly greater than WT_MIN, so a unit
reporting exactly 216 never passed and Script A sat in the poll loop
forever. 216 is not an arbitrary number -- TL_PAIRS holds 108 loopback
pairs, so 108 x 2 = 216 is every cabled port being up, i.e. precisely the
state being waited for. Comparison is now `< WT_MIN`, making the
threshold "at least 216".

Script A: bring the 100G uplinks into a known state before reading their
status -- Ethernet513 on asic0, Ethernet514 on asic1 -- and persist it
with `config save -y`. The stray `wait` after show_dmesg is dropped; the
one opening the new block consumes that prompt instead.

Version left at V1.0.5.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014RetWKFZFG1ZHcitQAyhwM
This commit is contained in:
2026-08-21 12:56:13 +08:00
co-authored by Claude Opus 5
parent 8714bbb773
commit cbef5865ec
2 changed files with 10 additions and 3 deletions
@@ -110,13 +110,20 @@ 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"
sendln "config save -y"
wait prompt_sonic_root wait prompt_sonic_root
sendln "show interfaces status Ethernet513,Ethernet514" sendln "show interfaces status Ethernet513,Ethernet514"
+2 -2
View File
@@ -61,7 +61,7 @@ if SWB_UNIT0 = 1 then
str2int wt_up0 groupmatchstr1 str2int wt_up0 groupmatchstr1
endif endif
wait prompt_sonic_root wait prompt_sonic_root
if wt_up0 <= WT_MIN then if wt_up0 < WT_MIN then
wt_ok = 0 wt_ok = 0
endif endif
endif endif
@@ -74,7 +74,7 @@ if SWB_UNIT1 = 1 then
str2int wt_up1 groupmatchstr1 str2int wt_up1 groupmatchstr1
endif endif
wait prompt_sonic_root wait prompt_sonic_root
if wt_up1 <= WT_MIN then if wt_up1 < WT_MIN then
wt_ok = 0 wt_ok = 0
endif endif
endif endif