From cbef5865eccb681a72ad795eb7a7709059a03947 Mon Sep 17 00:00:00 2001 From: ETWen Date: Fri, 21 Aug 2026 12:56:13 +0800 Subject: [PATCH] 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) Claude-Session: https://claude.ai/code/session_014RetWKFZFG1ZHcitQAyhwM --- src/Script_ABC_Blanton/1_Blanton_Script_A.ttl | 9 ++++++++- src/Script_ABC_Blanton/utils/wait_init.ttl | 4 ++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/Script_ABC_Blanton/1_Blanton_Script_A.ttl b/src/Script_ABC_Blanton/1_Blanton_Script_A.ttl index 2f48e8c..8aec742 100644 --- a/src/Script_ABC_Blanton/1_Blanton_Script_A.ttl +++ b/src/Script_ABC_Blanton/1_Blanton_Script_A.ttl @@ -110,13 +110,20 @@ endif ; ========== TAKE DATA ========== include "utils/setup_pmon.ttl" include "utils/show_dmesg.ttl" -wait prompt_sonic_root ;include "utils/xxx.ttl" ;wait prompt_sonic_root ;flushrecv ; ========== 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 sendln "show interfaces status Ethernet513,Ethernet514" diff --git a/src/Script_ABC_Blanton/utils/wait_init.ttl b/src/Script_ABC_Blanton/utils/wait_init.ttl index 87202bb..30215e0 100644 --- a/src/Script_ABC_Blanton/utils/wait_init.ttl +++ b/src/Script_ABC_Blanton/utils/wait_init.ttl @@ -61,7 +61,7 @@ if SWB_UNIT0 = 1 then str2int wt_up0 groupmatchstr1 endif wait prompt_sonic_root - if wt_up0 <= WT_MIN then + if wt_up0 < WT_MIN then wt_ok = 0 endif endif @@ -74,7 +74,7 @@ if SWB_UNIT1 = 1 then str2int wt_up1 groupmatchstr1 endif wait prompt_sonic_root - if wt_up1 <= WT_MIN then + if wt_up1 < WT_MIN then wt_ok = 0 endif endif