Compare commits
3
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1a06367ade | ||
|
|
1fbdcc23d6 | ||
|
|
0d2faef565 |
@@ -28,3 +28,6 @@ publish/*
|
||||
# 客戶板 schematic 原始檔(機密,勿入 repo)
|
||||
*.DSN
|
||||
*.dsn
|
||||
|
||||
# 尚未上機驗證的腳本暫存區(不入 repo,測過再搬進 src/)
|
||||
tmp/
|
||||
|
||||
+29
-9
@@ -112,7 +112,7 @@ Blanton_TTL_Script/
|
||||
│
|
||||
├── CLAUDE.md # 專案記憶 & 給 Claude 的指令
|
||||
├── ARCHITECTURE.md # 本架構文件
|
||||
├── .gitignore # secret/ + For_AI/ + logs + publish 產出
|
||||
├── .gitignore # secret/ + For_AI/ + tmp/ + logs + publish 產出
|
||||
├── .gitattributes # 換行符政策:.sh/.conf 釘 LF、.ttl 保持 CRLF
|
||||
│
|
||||
├── docs/ # 規格與狀態文件(客戶提供 / 專案產出)
|
||||
@@ -153,10 +153,14 @@ Blanton_TTL_Script/
|
||||
│ ├── publish.sh # ✅ committed — 打包工具(版號讀 Script A 檔頭)
|
||||
│ └── Script_ABC_Blanton_<Ver>/ # 🚫 產出,gitignored(-z 另出同名 .zip)
|
||||
│
|
||||
├── tmp/ # 🚫 gitignored — 尚未上機驗證的腳本暫存區
|
||||
│ └── blanton_reboottest.sh # 5_..._Reboot_Cycle.ttl 的 bash 版,測過再搬進 Blanton_Script/
|
||||
│
|
||||
└── src/
|
||||
└── Script_ABC_Blanton/ # ← Tera Term 的工作目錄(整包給測試員)
|
||||
│
|
||||
├── 4_Blanton_Script_thermal_safety.ttl # 熱 / 安規:獨立跑,不接 A→B→C
|
||||
├── 5_Blanton_Script_Reboot_Cycle.ttl # 重開機循環:獨立跑,while 1 無止境(未上機驗證)
|
||||
├── config.ttl # 全域設定:testcase 名、EN_Margin / EN_log、三個 prompt 字串
|
||||
├── 1_Blanton_Script_A.ttl # Pre-test:登入 → 對時 → source 工具 → 清 AER → 抓基線
|
||||
├── 2_Blanton_Script_B.ttl # Stress:開壓力程序 → while 1 每輪抓 fan/temp/margin
|
||||
@@ -363,10 +367,11 @@ PROFILE_CHANNELS=( "0:high:8" "1:low:8" ... ) # "channel:operation:change_perc
|
||||
|
||||
| 模組 | 進入點 | 功能 |
|
||||
|------|--------|------|
|
||||
| **Script A(Pre-test)** | `1_Blanton_Script_A.ttl` V1.1.6 | root 登入 → `date -s` 對時 → 清 job log → **收掉前一輪殘留**(`hw-test-session finish` → `bgctl reset --yes` → `bgctl stop --all` → `bgctl list` 確認清空)→ `hw-test-session start` → **設定風扇轉速** → **等資料面就緒**(`wait_init.ttl`)→ DUT 清單(boot/version/fwutil/syseeprom/ssdhealth/TPM/NVMe)→ BMC enroll + version/status → source bash 工具 → 清/讀 7 組 PCIe AER + `ras-mc-ctl --summary` → `lspci` → margin → PMON → dmesg → **10G/1G 管理網路 ping** → **NFC 基線**(start → 30s → stop → report)→ 100G uplink 設定與狀態 → **一輪流量基線** → `show uptime` |
|
||||
| **Script B(Stress)** | `2_Blanton_Script_B.ttl` | `mlucas-avx2 -cpu 0:15` + `bgctl run` 的 `memtester` / SSD / USB 壓力(v1.1.5 起 SSD/USB `--runtime 86400`、BMC memtester 不帶次數 = 跑到被停) + BMC DDR(`bmc-manager run memtester`)→ BMC USB net test(探測 cdc_ncm 介面,`systemd-run` 掛 4 小時 ping)→ 啟動 mgmt ping 監控 → **啟動 NFC 輪詢** → `jobs` / `bgctl list` → traffic(依 `SWB_UNIT`)→ `while 1` 每輪 PMON + `bgctl list`/`jobs` + `pause 60`(**V1.1.4 起 margin 不在迴圈內**)|
|
||||
| **Script A(Pre-test)** | `1_Blanton_Script_A.ttl` V1.1.7 | root 登入 → `date -s` 對時 → 清 job log → **收掉前一輪殘留**(`hw-test-session finish` → `bgctl reset --yes` → `bgctl stop --all` → `bgctl list` 確認清空)→ `hw-test-session start` → **設定風扇轉速** → **等資料面就緒**(`wait_init.ttl`)→ DUT 清單(boot/version/fwutil/syseeprom/ssdhealth/TPM/NVMe)→ BMC enroll + version/status → source bash 工具 → 清/讀 7 組 PCIe AER + `ras-mc-ctl --summary` → `lspci` → margin → PMON → dmesg → **10G/1G 管理網路 ping** → **NFC 基線**(start → 30s → stop → report)→ 100G uplink 設定與狀態 → **一輪流量基線** → `show uptime` |
|
||||
| **Script B(Stress)** | `2_Blanton_Script_B.ttl` | `mlucas-avx2 -cpu 0:15` + `bgctl run` 的 `memtester` / SSD / USB 壓力(v1.1.7 起 SSD/USB 的 `--runtime`/`--passes` 讀 `config.ttl` 的 `SSD_RUNTIME`/`SSD_COUNT`、`USB_RUNTIME`/`USB_COUNT`;BMC memtester 不帶次數 = 跑到被停) + BMC DDR(`bmc-manager run memtester`)→ BMC USB net test(探測 cdc_ncm 介面,`systemd-run` 掛 4 小時 ping)→ 啟動 mgmt ping 監控 → **啟動 NFC 輪詢** → `jobs` / `bgctl list` → traffic(依 `SWB_UNIT`)→ `while 1` 每輪 PMON + `bgctl list`/`jobs` + `pause 60`(**V1.1.4 起 margin 不在迴圈內**)|
|
||||
| **Script C(Post-test)** | `3_Blanton_Script_C.ttl` | `kill $(jobs -p)` + `bgctl stop --all` / `reset` + 停 BMC USB unit、mgmt ping 與 **NFC 輪詢** → PMON + dmesg → 7 組 AER + `ras-mc-ctl` → BMC USB `journalctl` **寫進 `log/bmc_usb_net.log`**(不再印在 console) → `ip -s link show eth0/eth1` → `cat` mlucas log → **NFC `report`** → traffic `stop` + `report` → **BER 掃描**(依 `SWB_UNIT`)→ NVMe 健康 → `show reboot-cause` → **margin 掃描**(`EN_Margin`,V1.1.4 由 Script B 移來)→ `uptime` → **job log 複製到 USB(帶時戳)** → `exit` + wait『Script done』→ `hw-test-session finish` |
|
||||
| **Script 4(Thermal / Safety)** | `4_Blanton_Script_thermal_safety.ttl` | **獨立腳本,不接 A→B→C。** Script A 式的環境建立(登入 / session / 風扇 / `wait_init` / DUT 清單 / BMC / PCIe 清除 / `pcie_bus` / PMON / dmesg)→ **滿載**(`mlucas-avx2 -cpu 0:15` 背景 + `blanton_tr518.sh start`)→ `while 1`:PMON + `TH6_SWB0/1_power_readback.sh` + `bgctl list` / `jobs`,`pause 60`。**沒有收尾段** —— 中斷後 DUT 仍在 `port cd lb=mac` / `l2 learn off` / `test mode nr=yes`,要手動 `blanton_tr518.sh stop` |
|
||||
| **Script 5(Reboot Cycle)** | `5_Blanton_Script_Reboot_Cycle.ttl` | **獨立腳本,不接 A→B→C。** `while 1`:登入 → `sudo -i` → 對時 → 風扇 → **Check Pt1~Pt13**(DUT/BMC info、mgmt ping、NFC、SSD、USB、BMC USB、port status + 15s traffic、BER、NVMe、platform data、dmesg i2c、PCIe error counters)→ `show uptime` → `reboot` → `wait "Booting in blind mode"`。`cnt_cycle` 每輪 +1 印在標頭。**沒有結束條件** —— 要停就關掉 Tera Term 的 macro。**尚未上機驗證** |
|
||||
| **SWB loopback 流量** | `blanton_traffic_linespeed <sub> [-u 0\|1\|all]` | `init`(VLAN 30..137,成對 `cdN`/`cdN+32`)→ `clear` → `start`(`tx 200 length=324 PatternRandom=yes`,v0.7.0 起)→ `stop` → `report`(per-pair TX/RX 交叉比對 PASS/FAIL);另有 `ps`(link/speed)與 `run`(一條龍)。**V0.6.0 起含 100G uplink `ce0`**(VLAN 138):它沒有 loopback 對象,靠 **ingress mirror 打回自己**維持循環,`report` 最後一列就是它,底下再接一份跨 unit summary |
|
||||
| **FPGA 暫存器存取** | `cb_fpga <fn> <addr> [data]`、`fpga_rescan` | pcimem 打 `resource0` + BAR 相對 offset,32-bit word;BDF 於 source 時自動偵測;`pmc/icb/swb0/swb1_fpga` 走 VSPI 窗口 |
|
||||
| **CB I2C / PMBus** | `cb_i2c_init/scan/read/write`、`cb_pmbus_read/write/linear16` | FPGA F3 OpenCores master,**讀用 Repeated START**(SMBus/PMBus 裝置必需) |
|
||||
@@ -516,8 +521,13 @@ pwr_data
|
||||
`Permission denied`、Script C 的 `cat` 撲空(BMC 段全空但不會報錯)。
|
||||
14. **TTL 的 `timeout` 是全域的,設了就要還原**:`timeout = N` 之後**每一個** `wait` 都被限制在 N 秒,
|
||||
逾時的 `wait` 會直接返回而沒吃到 prompt,於是下一個指令在前一個還沒跑完就送出,之後整輪錯開一拍。
|
||||
`wait_init.ttl` 設 60 後還原 0;Script B 的 cdc_ncm 探測設 15,在 `:skip_ping`(兩條路徑的匯流點)還原。
|
||||
加新的 `timeout` 時務必配一個 `timeout = 0`。
|
||||
`wait_init.ttl` 設 60 後還原 0;Script B 的 cdc_ncm 探測設 15,成功路徑在 `endif` 之後還原、
|
||||
跳過路徑在 `:skip_ping` 還原(兩處各一次)。
|
||||
Script 5 抄了同一段,但它的 ping 區塊要 `wait` 一個 `sleep 10` —— DUT 一忙就逼近 15 s 上限,
|
||||
所以**還原點提前到 `if` 之前**:分支之前還原,一行就涵蓋兩條路徑,`:skip_ping` 的那行留作備援。
|
||||
加新的 `timeout` 時務必配一個 `timeout = 0`;**抄有 `goto` 的段落時連 `:label` 一起抄** ——
|
||||
標籤沒定義 Tera Term 不會在載入時報錯,要真的跳進那條分支才會彈錯誤視窗停住整輪
|
||||
(Script 5 原本就漏了 `:skip_ping`,只有抓不到 NCM 介面時才會發作,已補)。
|
||||
15. **兩張管理網卡同網段時會 ARP flux**:`mgmt_ping_monitor.sh` 讓 eth0/eth1 同時 up,若兩者在同一個
|
||||
/24(本專案預設 `192.168.1.99` / `.101`),對端 ARP 可能由任一張卡回應,回包落在沒送封包的那張,
|
||||
量到的數字不能歸屬。`ARP_STRICT=1` 會設 `arp_ignore=1` / `arp_announce=2` 擋掉;
|
||||
@@ -758,7 +768,7 @@ margin status、全部 VRM 軌的 Vin/Vout/Iout/Temp、CB + ICB 溫感讀值,
|
||||
- [ ] `CHANGELOG.md`:延續三支腳本頂端的 Version History,集中成一份
|
||||
- [ ] 三支腳本的 header 版號與 `CHANGELOG.md` 對齊,`config.ttl` 加 `script_version` 並寫進 log 開頭
|
||||
- [ ] `docs/TTL_Script_Blanton_Status_*.xlsx` 更新為全 OK,或把剩餘項目移進 Future Extensions
|
||||
- [ ] 打 git tag `v1.1.0`,push `nas` + `gitea`
|
||||
- [x] 打 git tag,push `nas` + `gitea`(已至 `V1.1.7`;`publish/` 依 Script A 檔頭版號打包)
|
||||
|
||||
**驗收條件:** 從 zip 解壓到一台乾淨的測試 NB,照 README 操作,不看原始碼就能完成一輪 A→B→C
|
||||
並產出 summary;`publish/` 內容與 git tag 一致。
|
||||
@@ -800,6 +810,13 @@ margin status、全部 VRM 軌的 Vin/Vout/Iout/Temp、CB + ICB 溫感讀值,
|
||||
複製到 USB。要確認 `bgctl` 的產出結構,必要時改成 `rm -rf .../jobs/*`。
|
||||
- **100G PRBS 尚未接進 A/B/C**:`port_prbs_monitor.sh` 已隨包交付、可手動執行,但三支腳本裡的呼叫
|
||||
都還註解著(bring-up 中)。要啟用時記得 PRBS 期間 link 會顯示 down,`stop` 之後才會回來。
|
||||
- **Script 5(Reboot Cycle)尚未上機驗證**:`5_Blanton_Script_Reboot_Cycle.ttl` 隨 V1.1.7 交付,
|
||||
但還沒在真 DUT 上跑過一輪完整循環。兩個要現場確認的點:`wait "Booting in blind mode"` 是否
|
||||
真的在每一版開機訊息裡出現(沒出現就會永遠等下去,而且沒有 `timeout` 保護);以及每輪重跑
|
||||
`bmc-first-enroll` 是否安全。**沒有結束條件**,測夠了要自己關掉 macro。
|
||||
- **`tmp/blanton_reboottest.sh`(bash 版重開循環)也未上機驗證**:不用 Tera Term、由 systemd 在
|
||||
每次開機跑一輪並自動 `reboot`,登入下 `stop` 才停。整個 `tmp/` 是 gitignored,**不會進交付包** ——
|
||||
驗證過再搬進 `Blanton_Script/`。未驗證的腳本混進 `Blanton_Script/` 之後,測試員分不出哪支能信。
|
||||
- **Script C 的 USB 掛載走 `mount` 而非 `usb_target.sh -o mnt`**:目前是 `-o dev` 取節點再自己
|
||||
`mount <dev> /mnt/usb`,繞過了工具內建的 `mkdir -p`、exfat/ntfs `modprobe` 與可寫性驗證。
|
||||
掛載點不存在、檔案系統模組沒載、或媒體唯讀時只會失敗一行,job log 就沒帶出來。
|
||||
@@ -812,9 +829,12 @@ margin status、全部 VRM 軌的 Vin/Vout/Iout/Temp、CB + ICB 溫感讀值,
|
||||
**`sleep 120` 的方向還沒驗證** —— 若 `tr 518` 的流量是有時限的(參數含 `runtime=1`、
|
||||
`CheckDataTime=200`),等 120 秒可能量到已經降下來的值,要上機比對 0s / 30s / 120s 三次;
|
||||
TTL 尚未呼叫它。
|
||||
- **`--runtime 86400` 是 24 小時的上限,不是「永遠」**:超過一天的 soak,SSD 與 USB 壓力會在
|
||||
第 24 小時安靜結束,剩下的時間那兩項是閒置的。Script B 每輪都印 `bgctl list`,數量變少會看得到,
|
||||
但**沒有任何東西會主動報警**。真的要跑更久,得把數字改大或加一段重啟 job 的邏輯。
|
||||
- **`--runtime` 是整個 job 的總時限,不是每個 pass 的**:V1.1.7 起由 `config.ttl` 宣告
|
||||
(`SSD_RUNTIME`/`SSD_COUNT`、`USB_RUNTIME`/`USB_COUNT`,COUNT 直接對應 `--passes`)。
|
||||
`qfx5252-stress-*` 跑滿 RUNTIME 秒就結束,**`--passes` 不會把它延長**,所以
|
||||
`RUNTIME=600, COUNT=720` 是 10 分鐘的壓力而不是 120 小時。要跑滿一天就把 RUNTIME 填 `86400`。
|
||||
壓力提早結束時 Script B 每輪的 `bgctl list` 數量會變少,但**沒有任何東西會主動報警**;
|
||||
要比 24 小時更久則得加一段重啟 job 的邏輯。
|
||||
- **BMC USB 的 service log 只剩隨身碟一份**:Script C 把 `journalctl` 導進
|
||||
`log/bmc_usb_net.log` 再 `cp` 到 job 目錄,**不再印在 master console log**。
|
||||
那個 `cp` 沒有檢查回傳值(`nfc_polling.log` 檔名打錯那次就是這樣安靜失敗的),
|
||||
|
||||
@@ -9,7 +9,7 @@ DUT 端的取數能力由一組 **bash 工具庫** 提供(CB FPGA `pcimem` →
|
||||
|
||||
完整架構見 [ARCHITECTURE.md](ARCHITECTURE.md)。
|
||||
|
||||
**目前狀態(2026-09-02)**:Script A 為 **V1.1.6**(A 集中記錄所有 TTL 的變更)。涵蓋
|
||||
**目前狀態(2026-09-04)**:Script A 為 **V1.1.7**(A 集中記錄所有 TTL 的變更)。涵蓋
|
||||
PCIe AER / DDR EDAC / PMON+TPM / 電壓 margin(9 顆 LTC2980)/ SWB loopback 線速流量 /
|
||||
10G+1G 管理網路 ping / BMC DDR 與 USB / NVMe 健康,壓力層走平台的 `bgctl`。
|
||||
switch unit 數量由 `config.ttl` 的 `SWB_UNIT0` / `SWB_UNIT1` 宣告,風扇轉速由 `FAN_SPEED` 指定
|
||||
@@ -25,6 +25,9 @@ Script A 開頭會先收掉前一輪殘留(`hw-test-session finish` + `bgctl r
|
||||
NFC tag 讀取由 `nfc_polling.sh` 背景輪詢(A 做基線、B 起、C 停並 report)。
|
||||
另有 **`4_Blanton_Script_thermal_safety.ttl`**(熱 / 安規,**獨立跑不接 A→B→C**,滿載後每分鐘
|
||||
取 PMON + 兩片 SWB 的軌功耗;**沒有收尾段**,中斷後要手動 `blanton_tr518.sh stop`)。
|
||||
以及 **`5_Blanton_Script_Reboot_Cycle.ttl`**(重開機循環,**獨立跑不接 A→B→C**:登入 → 風扇 →
|
||||
Check Pt1~Pt13 → `reboot` → `wait "Booting in blind mode"`,`cnt_cycle` 每輪遞增,`while 1` 無止境,
|
||||
要停就關 Tera Term 的 macro)。**尚未上機驗證**。
|
||||
流程圖:`docs/Blanton_Test_Flow.drawio`。
|
||||
最後一次發布是 **V1.1.5**;SWB 的 I2C 通道與位址已於 2026-08-19 上機驗證。
|
||||
margin 的 `VNOM` 已於 2026-08-30 改為 Blanton 實測中位數(144 條軌中 86 條上調 0.8~2.5%)。
|
||||
@@ -248,8 +251,11 @@ Tera Term 連 COM port (115200-8-N-1)
|
||||
- ⚠️ **PMBus 的 PAGE 不是只有 VRM 通道在用**:ADPM12200 把每個量測放在不同 PAGE
|
||||
(Vin 9 / Iin 10 / Vout 2 / Iout 14 / Temp 18),沒寫 PAGE 就讀,回的是 `0xFFFF` 或
|
||||
`0x0000`。`blanton_pwr_data.sh` 的 PDB 表 page 是 `-`,這就是它整張表 NA 的原因
|
||||
- ⚠️ **`--runtime 86400` 是 24 小時上限**:超過一天的 soak,SSD / USB 壓力會安靜結束,
|
||||
剩下的時間那兩項閒置。`bgctl list` 的數量變少是唯一的線索,**不會報警**
|
||||
- ⚠️ **`--runtime` 是整個 job 的總時限,不是每個 pass 的**:V1.1.7 起由 `config.ttl` 的
|
||||
`SSD_RUNTIME`/`SSD_COUNT`、`USB_RUNTIME`/`USB_COUNT` 指定(COUNT 就是 `--passes`)。
|
||||
`qfx5252-stress-*` 跑滿 RUNTIME 秒就停,**`--passes` 不會把它延長** —— `RUNTIME=600` 就是
|
||||
10 分鐘,不是 600×COUNT。要 24 小時就填 `86400`。壓力提早結束時 `bgctl list` 數量變少是
|
||||
唯一線索,**不會報警**
|
||||
- ⚠️ **多相 VRM 與 LTC2980 是同一批軌的兩條路**:`blanton_multiphase_margin.sh`(原生 i2c)
|
||||
和 `margin.sh`(LTC2980 PMBus)都假設自己是唯一寫入者,**沒有互斥檢查**,只靠人記得
|
||||
- ⚠️ **traffic 的計數器基準在 v0.7.0 變了**:`tx 100 length=512` → `tx 200 length=324`,
|
||||
@@ -296,7 +302,12 @@ Tera Term 連 COM port (115200-8-N-1)
|
||||
(`--renormalize` 只在進 index 的路上轉換)。驗證要看 byte:`grep -rlU $'\r' <dir>`
|
||||
- ⚠️ **TTL 的 `timeout` 是全域的**:`timeout = N` 之後**每一個** `wait` 都被限制在 N 秒。逾時的 `wait`
|
||||
直接返回而沒吃到 prompt,下一個指令就在前一個還沒跑完時送出,之後整輪錯開一拍。**設了一定要
|
||||
配一個 `timeout = 0` 還原**(`wait_init.ttl` 60→0;Script B 的 cdc_ncm 探測 15→0 在 `:skip_ping`)
|
||||
配一個 `timeout = 0` 還原**(`wait_init.ttl` 60→0;Script B 的 cdc_ncm 探測 15→0 兩處各還原一次
|
||||
—— `endif` 之後走成功路徑、`:skip_ping` 走跳過路徑;Script 5 同一段**直接還原在 `if` 之前**,
|
||||
一行涵蓋兩條路徑,因為它的 ping 區塊要 `wait` 一個 `sleep 10`,DUT 一忙就逼近 15 s 上限)
|
||||
- ⚠️ **`goto` 的標籤沒定義,Tera Term 是執行到才報錯**:Script 5 從 Script B 抄 cdc_ncm 探測時
|
||||
只帶走 `goto skip_ping` 沒帶 `:skip_ping`,平常測不出來 —— 只有真的抓不到 NCM 介面走進那條分支
|
||||
才會跳錯誤視窗停住整個循環(已補)。抄段落過去時**連標籤一起抄**
|
||||
- ⚠️ **兩張管理網卡同網段會 ARP flux**:`mgmt_ping_monitor.sh` 讓 eth0/eth1 同時 up,同一個 /24 下
|
||||
對端 ARP 可能由任一張卡回應,回包落在沒送封包的那張。`ARP_STRICT=1` 擋掉;判讀時看 `RESULT` 行的
|
||||
`nic_tx`/`nic_rx`(該卡自己的 packet delta)—— **ping 成功但 `nic_tx` 接近 0 = 封包從另一張卡出去的**
|
||||
@@ -339,7 +350,10 @@ Tera Term 連 COM port (115200-8-N-1)
|
||||
- `tools/` — Host / 離線端:`bcm_mibpair_report_V1.1.0.py`(drivshell log → per-pair 報表)、
|
||||
`traffic_loopback_*.txt`(bcmcmd 原始指令表,`blanton_traffic_linespeed.sh` 是其 bash 版,
|
||||
**改 loopback 線路時兩邊要同步**)、`100G_PRBS.txt` / `TR518.txt` / `fan_ctrl.txt`
|
||||
(上機手貼用的原始指令;PRBS 已有 `.sh`,TR518 尚未腳本化)
|
||||
(上機手貼用的原始指令;PRBS / TR518 / 100G traffic / multiphase normal 都已有對應 `.sh`)
|
||||
- `publish/` — `publish.sh`(打包工具,**進 git**)+ `Script_ABC_Blanton_<Ver>/` 產出(**gitignored**)
|
||||
- `tmp/` — 🚫 gitignored:**還沒上機驗證**的腳本暫存區(目前 `blanton_reboottest.sh`)。
|
||||
上機測過才搬進 `src/Script_ABC_Blanton/Blanton_Script/` 並進 git —— 未驗證的東西不該混在
|
||||
交付包裡,publish 時測試員分不出哪支能信
|
||||
- `secret/` — 🚫 gitignored(除 `README.md` 與 `*.example`):DUT 帳密、per-unit BDF 覆寫、COM 設定
|
||||
- `For_AI/` — 🚫 gitignored:AI 協作素材(波形截圖、草稿筆記)
|
||||
|
||||
@@ -0,0 +1,73 @@
|
||||
# v1.1.7 — A way back from a margin, and a reboot cycle that runs itself
|
||||
|
||||
## ✨ New features
|
||||
|
||||
**`blanton_multiphase_margin.sh normal` — put the rails back without a power cycle**
|
||||
* `normal` returns all 38 multiphase rails to their nominal set point, with the same per-rail reporting as the margin profiles (`SWB0_0V9_ANLG0 - 0.930V Configure Done`). `-u 0|1|all` as usual.
|
||||
* Until now the only way out of a margin was to power-cycle the DUT. That mattered more than it sounds: `save` run while the board was still margined would have written the offsets into NVM, where a power cycle does not help either.
|
||||
* The commands it sends are in `tools/Multiphase_Normal.txt` for anyone driving the bench by hand.
|
||||
|
||||
> ⚠️ `TH6_CORE` is 0.8 V nominal but settles near **0.8591 V** once the load line is active. Reading back 0.859 after `normal` is the load line doing its job, not a failed write.
|
||||
|
||||
**`5_Blanton_Script_Reboot_Cycle.ttl` — an unattended reboot-cycle run**
|
||||
* A standalone macro, like Script 4: it does **not** chain to A → B → C and does not use `hw-test-session`. Every cycle is a fresh boot, so there is nothing to carry over and nothing to tear down.
|
||||
* Each round: login → `sudo -i` → `date -s` → fan speed → `wait_init` → **Check Pt1 … Pt13** → `show uptime` → `reboot` → wait for the next boot. The cycle number is printed in the banner of every round.
|
||||
|
||||
| | | | |
|
||||
|---|---|---|---|
|
||||
| **Pt1** DUT info | **Pt2** BMC info + tools | **Pt3** mgmt ping | **Pt4** NFC poll |
|
||||
| **Pt5** SSD stress | **Pt6** USB stress | **Pt7** BMC USB net | **Pt8** port status + 15 s traffic |
|
||||
| **Pt9** BER sweep | **Pt10** NVMe errors | **Pt11** platform data | **Pt12** dmesg i2c |
|
||||
| **Pt13** PCIe error counters | | | |
|
||||
|
||||
* The USB step takes its device node from `usb_target.sh`, not a hard-coded `/dev/sda1`.
|
||||
|
||||
**The SSD and USB stress durations are declared in `config.ttl`**
|
||||
* `SSD_RUNTIME` / `SSD_COUNT` and `USB_RUNTIME` / `USB_COUNT` replace the values that were hard-coded in Script B, so a site changes them in one place. `COUNT` is passed straight through as `--passes`.
|
||||
|
||||
## 🐛 Bug fixes
|
||||
|
||||
**Script B left the global `timeout` at 15 s for the rest of the cdc_ncm section**
|
||||
* The NCM probe sets `timeout = 15` and restored it only at `:skip_ping` — which the *success* path reaches several `wait`s later. Until then every `wait` gave up after 15 s instead of blocking, and a `wait` that returns without eating the prompt puts the whole macro a beat ahead of the DUT. It is now restored on the success path too.
|
||||
|
||||
**`goto skip_ping` in the reboot-cycle macro had no label to jump to**
|
||||
* The probe was copied out of Script B without its `:skip_ping` label. Tera Term does not check labels when it loads a macro — it raises the error only when it actually jumps, which here means only when the NCM interface is missing. The failure mode was an error dialog stopping the whole cycle, on the one run where something was already wrong. The label is there now, and the `timeout` is restored **before** the branch so one line covers both paths.
|
||||
|
||||
**Two check points both numbered 12**
|
||||
* `Dmesg_i2c` and `PCIE Error Counters` both announced themselves as `Check Pt12`. The second is now `Pt13`; Pt1 … Pt13 are unique.
|
||||
|
||||
## 📦 Downloads
|
||||
|
||||
| File | Contents |
|
||||
|---|---|
|
||||
| `Script_ABC_Blanton_V1.1.7.zip` | The full Tera Term working directory, including `Blanton_Script/` to copy onto the DUT |
|
||||
|
||||
**After copying to the DUT:**
|
||||
|
||||
```bash
|
||||
chmod +x ~/Blanton_Script/*.sh # see below
|
||||
grep -rlU $'\r' ~/Blanton_Script # expect no output
|
||||
```
|
||||
|
||||
`blanton_ber.sh`, `nfc_polling.sh`, `blanton_tr518.sh`, `blanton_multiphase_margin.sh`, `pwr_brick.sh` and the two `TH6_SWB*_power_readback.sh` are invoked through `./` or `~/`, so they need the execute bit along with `bmc_monitor.sh` and `usb_target.sh` — neither git nor a Windows/USB copy carries it reliably.
|
||||
|
||||
## ⚠️ Before you run
|
||||
|
||||
* **`--runtime` is the job's overall limit, not a per-pass one.** `qfx5252-stress-*` stops after `RUNTIME` seconds whatever `--passes` says, so `SSD_RUNTIME=600` is a **10 minute** stress, not 600 × `SSD_COUNT`. For a 24 hour soak set `RUNTIME` to `86400`. The shipped defaults are 600.
|
||||
* **Script 5 has not been run on hardware yet.** Two things to confirm on the bench: that `wait "Booting in blind mode"` really appears in this build's boot output — it has no `timeout` guard, so a changed string waits forever — and that re-running `bmc-first-enroll` every cycle is safe.
|
||||
* **Script 5 has no exit condition.** `while 1` with a `reboot` at the end of each round; stop it by closing the Tera Term macro.
|
||||
* **`blanton_multiphase_margin.sh save` is permanent**, and must not be mixed with `margin.sh` — same rails, two access paths, no interlock. Never run it while the board is margined.
|
||||
* **`READ_VIN` and `READ_IIN` are still not in the ADPM12200 coefficient table** — `pwr_brick.sh` decodes them with the voltage and current coefficients. Confirm before quoting brick Vin.
|
||||
* **The BMC USB service log only exists on the USB stick.**
|
||||
* **Script 4 (thermal/safety) has no teardown** — finish with `blanton_tr518.sh stop` and `kill $(jobs -p)`.
|
||||
* **These three cannot share the switch**: `blanton_ber.sh`, `blanton_tr518.sh`, `blanton_traffic_linespeed`.
|
||||
* **`FAN_SPEED` is 100.**
|
||||
* **Still unverified from v1.1.0**: the `ce0` ingress mirror, the 120 s settle in `blanton_tr518.sh`, and `test mode nr=no` on stop.
|
||||
|
||||
## 🔗 Links
|
||||
|
||||
* [ARCHITECTURE.md](https://etgit.et-wen.com/etwen/Blanton_TTL_Script/src/branch/main/ARCHITECTURE.md) — test flow, data models, constraints
|
||||
* [CLAUDE.md](https://etgit.et-wen.com/etwen/Blanton_TTL_Script/src/branch/main/CLAUDE.md) — commands and the bench gotchas
|
||||
* [Blanton_Test_Flow.drawio](https://etgit.et-wen.com/etwen/Blanton_TTL_Script/src/branch/main/docs/Blanton_Test_Flow.drawio) — the scripts side by side
|
||||
|
||||
**Full changelog:** [V1.1.6...V1.1.7](https://etgit.et-wen.com/etwen/Blanton_TTL_Script/compare/V1.1.6...V1.1.7)
|
||||
@@ -289,6 +289,58 @@
|
||||
; once the load line is active - reading back 0.859
|
||||
; after 'normal' is the load line, not a failed write
|
||||
; tools/Multiphase_Normal.txt Bench command reference for the above
|
||||
; 5_Blanton_Script_Reboot_Cycle.ttl Created Reboot-cycle run - a STANDALONE script, not
|
||||
; chained to A -> B -> C and not using hw-test-session:
|
||||
; every cycle is a fresh boot, so there is nothing to
|
||||
; carry over and nothing to tear down
|
||||
; while 1: login -> sudo -i -> date -s -> fans -> wait_init
|
||||
; -> Check Pt1..Pt13 -> show uptime -> reboot ->
|
||||
; wait 'Booting in blind mode'
|
||||
; cnt_cycle is printed in the banner of every round
|
||||
; Pt1 DUT info (boot/version/fwutil/syseeprom/ssdhealth/
|
||||
; TPM/NVMe) Pt2 BMC info + source the bash tools
|
||||
; Pt3 mgmt ping Pt4 NFC poll (20 s)
|
||||
; Pt5 SSD stress Pt6 USB stress (node from
|
||||
; usb_target.sh, not a fixed sda1)
|
||||
; Pt7 BMC USB net Pt8 100G port status + 15 s traffic
|
||||
; Pt9 BER sweep Pt10 NVMe error info
|
||||
; Pt11 platform data Pt12 dmesg i2c
|
||||
; Pt13 PCIe error counters + ras-mc-ctl
|
||||
; !! there is NO exit condition - the only way to stop it
|
||||
; is to close the Tera Term macro
|
||||
; !! NOT verified on hardware yet
|
||||
; The cdc_ncm probe sets timeout = 15 and restores it to 0
|
||||
; BEFORE the if, so both branches are covered in one line -
|
||||
; the ping block below it waits on a 'sleep 10', which is
|
||||
; already two thirds of the cap on a loaded DUT
|
||||
; The probe was copied from Script B without its :skip_ping
|
||||
; label, so 'goto skip_ping' had no target. Tera Term only
|
||||
; raises that when it actually jumps, i.e. only when the
|
||||
; NCM interface is missing - the label is now there
|
||||
; Renumbered the second 'Check Pt12' (PCIe error counters)
|
||||
; to Pt13; Pt1..Pt13 are now unique
|
||||
; ScriptB Restore timeout = 0 on the cdc_ncm success path too
|
||||
; It was only restored at :skip_ping, which the success
|
||||
; path reaches several waits later - until then every wait
|
||||
; was capped at 15 s instead of blocking
|
||||
; .gitignore Ignore tmp/ - scripts not yet verified on hardware
|
||||
; blanton_reboottest.sh (the bash port of the reboot cycle,
|
||||
; for running without Tera Term) lives there until it has
|
||||
; been run on a DUT. Unverified scripts must not reach the
|
||||
; publish bundle: the tester cannot tell which ones to
|
||||
; trust once they are side by side in Blanton_Script/
|
||||
; config.ttl Add SSD_RUNTIME / SSD_COUNT / USB_RUNTIME / USB_COUNT
|
||||
; The SSD and USB stress durations were hard-coded in
|
||||
; ScriptB (--runtime 86400 --passes 5 / 1); they are now
|
||||
; declared in one place per site
|
||||
; !! --runtime is the job's OVERALL limit, not per pass:
|
||||
; qfx5252-stress-* stops at RUNTIME seconds whatever
|
||||
; --passes says. RUNTIME 600 = a 10 minute stress,
|
||||
; not 600 x COUNT. For a 24 h soak set RUNTIME 86400
|
||||
; ScriptB Build the SSD / USB stress commands from those knobs
|
||||
; sprintf2 cmd_ssd ... SSD_RUNTIME SSD_COUNT, and the same
|
||||
; for USB; the old hard-coded lines are left commented out
|
||||
; next to them
|
||||
; =============================================================================
|
||||
include "config.ttl"
|
||||
|
||||
|
||||
@@ -40,8 +40,10 @@ wait prompt_sonic_root
|
||||
sendln "bgctl run /usr/sbin/memtester 1G" ; Continue Execture
|
||||
|
||||
; ========== SSD read/write ==========
|
||||
sprintf2 cmd_ssd "bgctl run qfx5252-stress-ssd 1G --runtime %d --passes %d --write --force --log /host/hw-eval/jobs/qfx5252-stress-ssd.log" SSD_RUNTIME SSD_COUNT
|
||||
wait prompt_sonic_root
|
||||
sendln "bgctl run qfx5252-stress-ssd 1G --runtime 86400 --passes 5 --write --force --log /host/hw-eval/jobs/qfx5252-stress-ssd.log"
|
||||
;sendln "bgctl run qfx5252-stress-ssd 1G --runtime 86400 --passes 5 --write --force --log /host/hw-eval/jobs/qfx5252-stress-ssd.log"
|
||||
sendln cmd_ssd
|
||||
|
||||
; ========== USB read/write ==========
|
||||
; ---- Get USB partition node -> usb_dev ----
|
||||
@@ -52,7 +54,8 @@ waitregex '<<DEV=([^>]*)>>'
|
||||
usb_dev = groupmatchstr1
|
||||
|
||||
wait prompt_sonic_root
|
||||
sprintf2 cmd "bgctl run qfx5252-stress-usb %s 256M --runtime 86400 --passes 1 --write --log /host/hw-eval/jobs/qfx5252-stress-usb.log" usb_dev
|
||||
;sprintf2 cmd "bgctl run qfx5252-stress-usb %s 256M --runtime 86400 --passes 1 --write --log /host/hw-eval/jobs/qfx5252-stress-usb.log" usb_dev
|
||||
sprintf2 cmd "bgctl run qfx5252-stress-usb %s 256M --runtime %d --passes %d --write --log /host/hw-eval/jobs/qfx5252-stress-usb.log" usb_dev USB_RUNTIME USB_COUNT
|
||||
sendln cmd
|
||||
|
||||
;wait prompt_sonic_root
|
||||
@@ -73,6 +76,7 @@ if result = 0 then
|
||||
messagebox 'cdc_ncm interface not found. Ping test skipped.' 'ERROR'
|
||||
goto skip_ping
|
||||
endif
|
||||
timeout = 0
|
||||
strlen matchstr
|
||||
cut_len = result - 6 ; 'NCMIF=' = 6 chars
|
||||
strcopy matchstr 7 cut_len ncm_if ; -> ncm_if = "eth2" / "eth3"
|
||||
|
||||
@@ -0,0 +1,419 @@
|
||||
include "config.ttl"
|
||||
|
||||
flushrecv
|
||||
;================================================================
|
||||
; Log File Creation
|
||||
;================================================================
|
||||
gettime str_starttime "%Y%m%d-%H%M%S"
|
||||
getdir mdir
|
||||
|
||||
if EN_log = 1 then
|
||||
sprintf2 filename '%s\Logs\%s_%s_%s.log' mdir project_name "Reboot_Cycle" str_starttime
|
||||
logopen filename 0 1 1 1
|
||||
endif
|
||||
|
||||
cnt_cycle = 0
|
||||
|
||||
while 1
|
||||
cnt_cycle = cnt_cycle + 1
|
||||
; ========== Root Login ==========
|
||||
wait prompt_login
|
||||
sendln "admin"
|
||||
wait "Password:"
|
||||
sendln "YourPaSsWoRd"
|
||||
wait prompt_sonic
|
||||
sendln "sudo -i"
|
||||
wait prompt_sonic_root
|
||||
sendln "sleep 10"
|
||||
|
||||
wait prompt_sonic_root
|
||||
sprintf2 strTitle "echo -e '\033[1;32mReboot Cycle : %d \033[0m'" cnt_cycle
|
||||
sendln strTitle
|
||||
|
||||
; ========== Pre Setting ==========
|
||||
; Make log directory
|
||||
wait prompt_sonic_root
|
||||
sendln "mkdir ./logs"
|
||||
|
||||
; Setting System Time
|
||||
getdate datestr
|
||||
gettime timestr
|
||||
sprintf2 cmd 'sudo date -s "%s %s"' datestr timestr
|
||||
sendln cmd
|
||||
|
||||
; ========== FAN SPEED ==========
|
||||
wait prompt_sonic_root
|
||||
sendln "echo 18-0020 > /sys/bus/i2c/drivers/max31790/unbind"
|
||||
wait prompt_sonic_root
|
||||
sendln "sleep .5"
|
||||
wait prompt_sonic_root
|
||||
sendln "echo 18-0020 > /sys/bus/i2c/drivers/max31790/bind"
|
||||
wait prompt_sonic_root
|
||||
sendln "echo 25-0020 > /sys/bus/i2c/drivers/max31790/unbind"
|
||||
wait prompt_sonic_root
|
||||
sendln "sleep .5"
|
||||
wait prompt_sonic_root
|
||||
sendln "echo 25-0020 > /sys/bus/i2c/drivers/max31790/bind"
|
||||
|
||||
wait prompt_sonic_root
|
||||
sprintf2 fan_ctrl_cmd 'fan-speed-control.sh %d' FAN_SPEED
|
||||
sendln fan_ctrl_cmd
|
||||
|
||||
wait "Set all configured fan channels to"
|
||||
sendln "y"
|
||||
|
||||
; ========== Wait DUT Init ==========
|
||||
include "utils/wait_init.ttl"
|
||||
|
||||
; ========== DUT Info ==========
|
||||
wait prompt_sonic_root
|
||||
sprintf2 strCKPt1 "echo -e '\033[36mCheck Pt1 : DUT Info\033[0m'"
|
||||
sendln strCKPt1
|
||||
|
||||
wait prompt_sonic_root
|
||||
sendln "show boot"
|
||||
wait prompt_sonic_root
|
||||
sendln "show version"
|
||||
wait prompt_sonic_root
|
||||
sendln "fwutil show status"
|
||||
wait prompt_sonic_root
|
||||
sendln "show system-memory"
|
||||
wait prompt_sonic_root
|
||||
sendln "show service"
|
||||
wait prompt_sonic_root
|
||||
sendln "show platform syseeprom"
|
||||
wait prompt_sonic_root
|
||||
sendln "show platform ssdhealth"
|
||||
wait prompt_sonic_root
|
||||
sendln "qfx5252-tpm-version"
|
||||
wait prompt_sonic_root
|
||||
sendln "/usr/sbin/nvme smart-log -H /dev/nvme0"
|
||||
wait prompt_sonic_root
|
||||
sendln "/usr/sbin/smartctl -x /dev/nvme0"
|
||||
|
||||
; ========== BMC version ==========
|
||||
wait prompt_sonic_root
|
||||
sprintf2 strCKPt2 "echo -e '\033[36mCheck Pt2 : BMC Info\033[0m'"
|
||||
sendln strCKPt2
|
||||
|
||||
wait prompt_sonic_root
|
||||
sendln "bmc-first-enroll"
|
||||
wait prompt_sonic_root
|
||||
sendln "bmc-manager version"
|
||||
wait prompt_sonic_root
|
||||
sendln "bmc-manager status"
|
||||
|
||||
; ========== Load Shell Script ==========
|
||||
wait prompt_sonic_root
|
||||
sendln "source ~/Blanton_Script/blanton_fpga_pcimem.sh"
|
||||
wait prompt_sonic_root
|
||||
sendln "source ~/Blanton_Script/blanton_cb_i2c.sh"
|
||||
wait prompt_sonic_root
|
||||
sendln "source ~/Blanton_Script/blanton_icb_vi2c.sh"
|
||||
wait prompt_sonic_root
|
||||
sendln "source ~/Blanton_Script/blanton_pwr_data.sh"
|
||||
wait prompt_sonic_root
|
||||
sendln "source ~/Blanton_Script/blanton_traffic_linespeed.sh"
|
||||
wait prompt_sonic_root
|
||||
sendln "source ~/Blanton_Script/LTC2980_Margin_Script/margin.sh"
|
||||
|
||||
; ========== CLEAR PCIE Error ==========
|
||||
include "utils/show_pcie_error_reg_TH6_SWB0.ttl"
|
||||
include "utils/show_pcie_error_reg_TH6_SWB1.ttl"
|
||||
include "utils/show_pcie_error_reg_FPGA.ttl"
|
||||
include "utils/show_pcie_error_reg_BMC.ttl"
|
||||
include "utils/show_pcie_error_reg_DDR.ttl"
|
||||
include "utils/show_pcie_error_reg_I210.ttl"
|
||||
include "utils/show_pcie_error_reg_SSD.ttl"
|
||||
|
||||
wait prompt_sonic_root
|
||||
sendln "/usr/sbin/ras-mc-ctl --summary"
|
||||
|
||||
; ========== Check PCIE tree + PCIE link status + GET PCIE bandwidth Test ==========
|
||||
include "utils/pcie_bus.ttl"
|
||||
|
||||
; ========== TAKE DATA ==========
|
||||
include "utils/setup_pmon.ttl"
|
||||
include "utils/show_dmesg.ttl"
|
||||
|
||||
; ========== 10G/1G MGMT Ping Test ==========
|
||||
wait prompt_sonic_root
|
||||
sprintf2 strCKPt3 "echo -e '\033[36mCheck Pt3 : Mgmt Ping Test\033[0m'"
|
||||
sendln strCKPt3
|
||||
|
||||
wait prompt_sonic_root
|
||||
sendln "./Blanton_Script/mgmt_ping_monitor.sh start"
|
||||
wait prompt_sonic_root
|
||||
pause 30
|
||||
sendln "~/Blanton_Script/mgmt_ping_monitor.sh stop"
|
||||
wait prompt_sonic_root
|
||||
sendln "cat ~/Blanton_Script/log/mgmt_ping.log"
|
||||
wait prompt_sonic_root
|
||||
sendln "~/Blanton_Script/mgmt_ping_monitor.sh clear"
|
||||
|
||||
; ========== NFC Test ==========
|
||||
wait prompt_sonic_root
|
||||
sprintf2 strCKPt4 "echo -e '\033[36mCheck Pt4 : NFC Test\033[0m'"
|
||||
sendln strCKPt4
|
||||
|
||||
wait prompt_sonic_root
|
||||
sendln "~/Blanton_Script/nfc_polling.sh start"
|
||||
wait prompt_sonic_root
|
||||
sendln "~/Blanton_Script/nfc_polling.sh status"
|
||||
wait prompt_sonic_root
|
||||
sendln "sleep 20"
|
||||
wait prompt_sonic_root
|
||||
sendln "~/Blanton_Script/nfc_polling.sh stop"
|
||||
wait prompt_sonic_root
|
||||
sendln "~/Blanton_Script/nfc_polling.sh report"
|
||||
|
||||
; ========== SSD read/write ==========
|
||||
wait prompt_sonic_root
|
||||
sprintf2 strCKPt5 "echo -e '\033[36mCheck Pt5 : SSD Test\033[0m'"
|
||||
sendln strCKPt5
|
||||
|
||||
wait prompt_sonic_root
|
||||
sendln "qfx5252-stress-ssd 1G --runtime 30 --passes 2 --write --force --log /host/hw-eval/jobs/qfx5252-stress-ssd.log"
|
||||
wait prompt_sonic_root
|
||||
sendln "cat /host/hw-eval/jobs/qfx5252-stress-ssd.log"
|
||||
|
||||
; ========== USB read/write ==========
|
||||
wait prompt_sonic_root
|
||||
sprintf2 strCKPt6 "echo -e '\033[36mCheck Pt6 : USB Test\033[0m'"
|
||||
sendln strCKPt6
|
||||
|
||||
; ---- Get USB partition node -> usb_dev ----
|
||||
usb_dev = ''
|
||||
wait prompt_sonic_root
|
||||
sendln 'D=$(bash ~/Blanton_Script/usb_target.sh -o dev 2>/dev/null); echo "<<D""EV=${D:-NONE}>>"'
|
||||
waitregex '<<DEV=([^>]*)>>'
|
||||
usb_dev = groupmatchstr1
|
||||
|
||||
wait prompt_sonic_root
|
||||
sprintf2 cmd "qfx5252-stress-usb %s 256M --runtime 30 --passes 2 --write --log /host/hw-eval/jobs/qfx5252-stress-usb.log" usb_dev
|
||||
sendln cmd
|
||||
wait prompt_sonic_root
|
||||
sendln "cat /host/hw-eval/jobs/qfx5252-stress-usb.log"
|
||||
|
||||
; ========== BMC USB Test ==========
|
||||
wait prompt_sonic_root
|
||||
sprintf2 strCKPt7 "echo -e '\033[36mCheck Pt7 : BMC USB Test\033[0m'"
|
||||
sendln strCKPt7
|
||||
|
||||
wait prompt_sonic_root
|
||||
sendln 'echo "NCMIF=$(ls -d /sys/bus/usb/drivers/cdc_ncm/*/net/* 2>/dev/null | head -n 1 | xargs -r basename)"'
|
||||
; timeout is GLOBAL and sticky: left at 15, every 'wait' below gives up after
|
||||
; 15 s instead of blocking, the macro runs ahead of the DUT and the whole
|
||||
; cycle desynchronises. Restore it BEFORE the branch so both paths are
|
||||
; covered - the ping block below waits on 'sleep 10', which is already two
|
||||
; thirds of the 15 s cap on a loaded DUT.
|
||||
timeout = 15
|
||||
waitregex 'NCMIF=[A-Za-z0-9_-]+'
|
||||
ncm_found = result ; hold it: 'result' is reused below
|
||||
timeout = 0 ; restore, both paths
|
||||
if ncm_found = 0 then
|
||||
messagebox 'cdc_ncm interface not found. Ping test skipped.' 'ERROR'
|
||||
goto skip_ping
|
||||
endif
|
||||
strlen matchstr
|
||||
cut_len = result - 6 ; 'NCMIF=' = 6 chars
|
||||
strcopy matchstr 7 cut_len ncm_if ; -> ncm_if = "eth2" / "eth3"
|
||||
|
||||
sprintf2 cmd 'ip -br link show %s' ncm_if
|
||||
wait prompt_sonic_root
|
||||
sendln cmd
|
||||
|
||||
wait prompt_sonic_root
|
||||
sendln 'systemctl stop qfx5252-bmc-usb-net-test.service 2>/dev/null || true'
|
||||
wait prompt_sonic_root
|
||||
sendln 'systemctl reset-failed qfx5252-bmc-usb-net-test.service 2>/dev/null || true'
|
||||
sprintf2 cmd 'systemd-run --unit=qfx5252-bmc-usb-net-test --property=Type=exec /usr/bin/ping -I %s -i 1 -W 2 -w 14400 192.168.200.200' ncm_if
|
||||
wait prompt_sonic_root
|
||||
sendln cmd
|
||||
wait prompt_sonic_root
|
||||
sendln "sleep 10"
|
||||
wait prompt_sonic_root
|
||||
sendln "systemctl stop qfx5252-bmc-usb-net-test.service"
|
||||
wait prompt_sonic_root
|
||||
sendln "journalctl -u qfx5252-bmc-usb-net-test.service --no-pager"
|
||||
|
||||
:skip_ping
|
||||
timeout = 0 ; backstop, same as Script B
|
||||
|
||||
; ========== 100G Port Setting ==========
|
||||
wait prompt_sonic_root
|
||||
sendln "sudo sfputil lpmode off Ethernet513"
|
||||
wait prompt_sonic_root
|
||||
sendln "sudo sfputil lpmode off Ethernet514"
|
||||
wait prompt_sonic_root
|
||||
sendln "config interface -n asic0 startup Ethernet513"
|
||||
wait prompt_sonic_root
|
||||
sendln "config interface -n asic1 startup Ethernet514"
|
||||
wait prompt_sonic_root
|
||||
sendln "config save -y"
|
||||
|
||||
; ========== First Traffic Test ==========
|
||||
; Silent MAC
|
||||
wait prompt_sonic_root
|
||||
sendln "config feature state lldp disabled"
|
||||
wait prompt_sonic_root
|
||||
sendln "config save -y"
|
||||
|
||||
; ========== 100G Port Status ==========
|
||||
wait prompt_sonic_root
|
||||
sprintf2 strCKPt8 "echo -e '\033[36mCheck Pt8 : Port Status and 15sec Traffic \033[0m'"
|
||||
sendln strCKPt8
|
||||
|
||||
wait prompt_sonic_root
|
||||
sendln "show interfaces status Ethernet513,Ethernet514"
|
||||
|
||||
; ========== Traffic Test ==========
|
||||
if SWB_UNIT0 = 1 && SWB_UNIT1 = 1 then
|
||||
wait prompt_sonic_root
|
||||
sendln "blanton_traffic_linespeed ps"
|
||||
wait prompt_sonic_root
|
||||
sendln "blanton_traffic_linespeed init"
|
||||
wait prompt_sonic_root
|
||||
sendln "blanton_traffic_linespeed clear"
|
||||
wait prompt_sonic_root
|
||||
sendln "blanton_traffic_linespeed show"
|
||||
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
|
||||
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
|
||||
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
|
||||
|
||||
; ========== BER ==========
|
||||
; PRBS takes the SerDes out of normal operation, so this runs AFTER the
|
||||
; traffic report. sleep 30 matches blanton_ber.sh BER_INTERVAL - reporting
|
||||
; earlier reads an interval that has not finished accumulating.
|
||||
wait prompt_sonic_root
|
||||
sprintf2 strCKPt8 "echo -e '\033[36mCheck Pt9 : BER Test \033[0m'"
|
||||
sendln strCKPt8
|
||||
|
||||
if SWB_UNIT0 = 1 && SWB_UNIT1 = 1 then
|
||||
wait prompt_sonic_root
|
||||
sendln "./Blanton_Script/blanton_ber.sh init"
|
||||
wait prompt_sonic_root
|
||||
sendln "./Blanton_Script/blanton_ber.sh start"
|
||||
wait prompt_sonic_root
|
||||
sendln "sleep 30"
|
||||
wait prompt_sonic_root
|
||||
sendln "./Blanton_Script/blanton_ber.sh report"
|
||||
wait prompt_sonic_root
|
||||
sendln "./Blanton_Script/blanton_ber.sh stop"
|
||||
wait prompt_sonic_root
|
||||
sendln "./Blanton_Script/blanton_ber.sh clear"
|
||||
elseif SWB_UNIT0 = 1 && SWB_UNIT1 = 0 then
|
||||
wait prompt_sonic_root
|
||||
sendln "./Blanton_Script/blanton_ber.sh init -u 0"
|
||||
wait prompt_sonic_root
|
||||
sendln "./Blanton_Script/blanton_ber.sh start -u 0"
|
||||
wait prompt_sonic_root
|
||||
sendln "sleep 30"
|
||||
wait prompt_sonic_root
|
||||
sendln "./Blanton_Script/blanton_ber.sh report -u 0"
|
||||
wait prompt_sonic_root
|
||||
sendln "./Blanton_Script/blanton_ber.sh stop -u 0"
|
||||
wait prompt_sonic_root
|
||||
sendln "./Blanton_Script/blanton_ber.sh clear -u 0"
|
||||
elseif SWB_UNIT0 = 0 && SWB_UNIT1 = 1 then
|
||||
wait prompt_sonic_root
|
||||
sendln "./Blanton_Script/blanton_ber.sh init -u 1"
|
||||
wait prompt_sonic_root
|
||||
sendln "./Blanton_Script/blanton_ber.sh start -u 1"
|
||||
wait prompt_sonic_root
|
||||
sendln "sleep 30"
|
||||
wait prompt_sonic_root
|
||||
sendln "./Blanton_Script/blanton_ber.sh report -u 1"
|
||||
wait prompt_sonic_root
|
||||
sendln "./Blanton_Script/blanton_ber.sh stop -u 1"
|
||||
wait prompt_sonic_root
|
||||
sendln "./Blanton_Script/blanton_ber.sh clear -u 1"
|
||||
else
|
||||
|
||||
endif
|
||||
|
||||
; ========== NVME Err Info ==========
|
||||
wait prompt_sonic_root
|
||||
sprintf2 strCKPt9 "echo -e '\033[36mCheck Pt10 : NVME Err Info \033[0m'"
|
||||
sendln strCKPt9
|
||||
|
||||
wait prompt_sonic_root
|
||||
sendln "/usr/sbin/nvme smart-log -H /dev/nvme0"
|
||||
wait prompt_sonic_root
|
||||
sendln "/usr/sbin/smartctl -x /dev/nvme0"
|
||||
|
||||
; ========== TAKE DATA ==========
|
||||
wait prompt_sonic_root
|
||||
sprintf2 strCKPt10 "echo -e '\033[36mCheck Pt11 : Platform Data \033[0m'"
|
||||
sendln strCKPt10
|
||||
include "utils/setup_pmon.ttl"
|
||||
|
||||
wait prompt_sonic_root
|
||||
sprintf2 strCKPt12 "echo -e '\033[36mCheck Pt12 : Dmesg_i2c \033[0m'"
|
||||
sendln strCKPt12
|
||||
include "utils/show_dmesg.ttl"
|
||||
|
||||
; ========== Check PCIE error counters ==========
|
||||
wait prompt_sonic_root
|
||||
sprintf2 strCKPt13 "echo -e '\033[36mCheck Pt13 : PCIE Error Counters \033[0m'"
|
||||
sendln strCKPt13
|
||||
include "utils/show_pcie_error_reg_TH6_SWB0.ttl"
|
||||
include "utils/show_pcie_error_reg_TH6_SWB1.ttl"
|
||||
include "utils/show_pcie_error_reg_FPGA.ttl"
|
||||
include "utils/show_pcie_error_reg_BMC.ttl"
|
||||
include "utils/show_pcie_error_reg_DDR.ttl"
|
||||
include "utils/show_pcie_error_reg_I210.ttl"
|
||||
include "utils/show_pcie_error_reg_SSD.ttl"
|
||||
|
||||
wait prompt_sonic_root
|
||||
sendln "/usr/sbin/ras-mc-ctl --summary"
|
||||
|
||||
; ========== Show Power on uptime ==========
|
||||
wait prompt_sonic_root
|
||||
sendln "show uptime"
|
||||
|
||||
; ========== Show Power on uptime ==========
|
||||
wait prompt_sonic_root
|
||||
sendln "reboot"
|
||||
|
||||
wait "Booting in blind mode"
|
||||
endwhile
|
||||
@@ -17,6 +17,14 @@ FAN_SPEED = 100
|
||||
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
|
||||
|
||||
;================================================================
|
||||
; Stress_Test
|
||||
;================================================================
|
||||
SSD_RUNTIME = 600 ; Unit seconds, 600 = 10 minutes
|
||||
SSD_COUNT = 720 ; Total time = SSD_RUNTIME * SSD_COUNT
|
||||
USB_RUNTIME = 600 ; Unit seconds, 600 = 10 minutes
|
||||
USB_COUNT = 720 ; Total time = USB_RUNTIME * USB_COUNT
|
||||
|
||||
;================================================================
|
||||
; Prompt Definitions
|
||||
;================================================================
|
||||
|
||||
Reference in New Issue
Block a user