From db44f7235236ea9752b81e33685142c495ab35ed Mon Sep 17 00:00:00 2001 From: ETWen Date: Mon, 31 Aug 2026 22:19:38 +0800 Subject: [PATCH] feat(thermal): Add a standalone thermal/safety run, and move margin out of the soak loop 4_Blanton_Script_thermal_safety.ttl brings the DUT up the way Script A does, then loads it - mlucas-avx2 -cpu 0:15 in the background plus blanton_tr518.sh start - and samples platform data and both switch boards' rail power every minute. Power per rail under sustained full load, over hours, is the whole point of it. It is standalone: nothing starts it, it starts nothing, and it must not share a DUT with Script B because both take over the cd ports. It also has no teardown. When you interrupt it the unit is still in port cd lb=mac / l2 learn off / test mode nr=yes and mlucas is still running, and show interfaces status does not reveal any of that. Called out in the version history, the release notes, CLAUDE.md gotchas and the ARCHITECTURE future-work list, because whoever uses the box next will not find out on their own. Script B's per-round loop drops the margin scan. The loop is meant to be a quick minute-by-minute sample and margin_status_all.sh walks nine LTC2980s over I2C, which dominated the round. Script C takes it instead, once, before show uptime. The trade-off is real: margin drift DURING the soak is no longer visible, only a start and an end reading. Documented rather than glossed over, with a suggestion (scan every N rounds) if it needs to come back. Script C also sends exit and waits for "Script done" before hw-test-session finish, so finish runs in the login shell rather than inside the session it is closing. Adds docs/Blanton_Test_Flow.drawio: all four scripts side by side, with the config flags that change each step marked, Script B's one real goto drawn, and the A->B->C handoffs shown as the manual steps they are. The new script arrived LF-only while every other .ttl is CRLF and .gitattributes marks *.ttl as -text, so what is committed is exactly what Tera Term reads. Converted. Script A -> V1.1.4. Co-Authored-By: Claude Opus 5 (1M context) Claude-Session: https://claude.ai/code/session_014RetWKFZFG1ZHcitQAyhwM --- ARCHITECTURE.md | 17 +- CLAUDE.md | 12 +- docs/Blanton_Test_Flow.drawio | 172 ++++++++++++++++++ docs/release-notes/v1.1.4.md | 61 +++++++ src/Script_ABC_Blanton/1_Blanton_Script_A.ttl | 27 ++- src/Script_ABC_Blanton/2_Blanton_Script_B.ttl | 4 - src/Script_ABC_Blanton/3_Blanton_Script_C.ttl | 8 + .../4_Blanton_Script_thermal_safety.ttl | 158 ++++++++++++++++ 8 files changed, 448 insertions(+), 11 deletions(-) create mode 100644 docs/Blanton_Test_Flow.drawio create mode 100644 docs/release-notes/v1.1.4.md create mode 100644 src/Script_ABC_Blanton/4_Blanton_Script_thermal_safety.ttl diff --git a/ARCHITECTURE.md b/ARCHITECTURE.md index 0fb15bb..ace8ca7 100644 --- a/ARCHITECTURE.md +++ b/ARCHITECTURE.md @@ -120,6 +120,7 @@ Blanton_TTL_Script/ │ ├── Blantons_FPGA_Registers_draft.docx # 同上,客戶原始 docx │ ├── Blantons_FPGA_Registers_Map_draft.xlsx │ ├── Blantons_PCIe_AER_and_DDR_EDAC_checks.pdf # AER / EDAC 檢查點依據 +│ ├── Blanton_Test_Flow.drawio # A/B/C + 熱安規四支的測試流程圖(draw.io) │ ├── LTC2980_channel_map.csv # 9 個 settings/*.conf 合併:Board,CONN,Ch,NetName,Vnom(144 列) │ ├── TTL_Script_Blanton_Status_20260814.xlsx │ └── TTL_Script_Blanton_Status_20260817.xlsx # ⭐ 最新:三支腳本逐項 Status(OK / On-Going + Owner) @@ -152,6 +153,7 @@ Blanton_TTL_Script/ └── src/ └── Script_ABC_Blanton/ # ← Tera Term 的工作目錄(整包給測試員) │ + ├── 4_Blanton_Script_thermal_safety.ttl # 熱 / 安規:獨立跑,不接 A→B→C ├── 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 @@ -355,9 +357,10 @@ PROFILE_CHANNELS=( "0:high:8" "1:low:8" ... ) # "channel:operation:change_perc | 模組 | 進入點 | 功能 | |------|--------|------| -| **Script A(Pre-test)** | `1_Blanton_Script_A.ttl` V1.1.2 | 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 壓力 + 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 + 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` → `ip -s link show eth0/eth1` → `cat` mlucas log → **NFC `report`** → traffic `stop` + `report` → **BER 掃描**(依 `SWB_UNIT`)→ NVMe 健康 → `show reboot-cause` / `uptime` → **job log 複製到 USB(帶時戳)** → `hw-test-session finish` | +| **Script A(Pre-test)** | `1_Blanton_Script_A.ttl` V1.1.4 | 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 壓力 + 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` → `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` | | **SWB loopback 流量** | `blanton_traffic_linespeed [-u 0\|1\|all]` | `init`(VLAN 30..137,成對 `cdN`/`cdN+32`)→ `clear` → `start`(`tx 100 length=512`)→ `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 [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 裝置必需) | @@ -801,6 +804,14 @@ margin status、全部 VRM 軌的 Vin/Vout/Iout/Temp、CB + ICB 溫感讀值, **`sleep 120` 的方向還沒驗證** —— 若 `tr 518` 的流量是有時限的(參數含 `runtime=1`、 `CheckDataTime=200`),等 120 秒可能量到已經降下來的值,要上機比對 0s / 30s / 120s 三次; TTL 尚未呼叫它。 +- **Script 4 沒有收尾段**:`while 1` 之後就是檔案結尾,中斷時 DUT 停在 `port cd lb=mac` / + `l2 learn off` / `test mode nr=yes`,而且 `mlucas-avx2` 還在背景跑。要手動 + `blanton_tr518.sh stop` + `kill`,否則下一輪任何測試都在被污染的狀態上開始 + (Script A 的 `bgctl reset/stop --all` 收得掉 job,但收不掉 bcm 的 loopback 設定)。 + 可考慮加一支對應的收尾腳本,或在檔尾用 `messagebox` 提示要下哪些指令。 +- **margin 在 soak 期間不再取樣**(V1.1.4):只剩 Script A 的起始值與 Script C 的結束值。 + 漂移發生在中間就看不到了。若要恢復,比較好的做法是在 B 的迴圈內每 N 輪才掃一次, + 而不是每輪都掃。 - **`blanton_ber.sh` 的 `sleep 30` 與 `BER_INTERVAL` 是兩處要同步改的數字**:Script C 寫死 `sendln "sleep 30"`,腳本預設 `BER_INTERVAL=30`。改一邊沒改另一邊,report 會讀到還沒累積完 一個 interval 的數字,而且不會有任何警告。 diff --git a/CLAUDE.md b/CLAUDE.md index 0df8479..024aa77 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -9,7 +9,7 @@ DUT 端的取數能力由一組 **bash 工具庫** 提供(CB FPGA `pcimem` → 完整架構見 [ARCHITECTURE.md](ARCHITECTURE.md)。 -**目前狀態(2026-08-30)**:Script A 為 **V1.1.3**(A 集中記錄 A/B/C 三支的變更)。涵蓋 +**目前狀態(2026-08-31)**:Script A 為 **V1.1.4**(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` 指定 @@ -23,7 +23,10 @@ TR518 負載(`blanton_tr518.sh`,**TTL 尚未接**)、SWB 軌功耗(`TH6_ Script A 開頭會先收掉前一輪殘留(`hw-test-session finish` + `bgctl reset/stop --all`), 再 `bgctl list` 確認沒有 job 留著佔資源。 NFC tag 讀取由 `nfc_polling.sh` 背景輪詢(A 做基線、B 起、C 停並 report)。 -最後一次發布是 **V1.1.2**;SWB 的 I2C 通道與位址已於 2026-08-19 上機驗證。 +另有 **`4_Blanton_Script_thermal_safety.ttl`**(熱 / 安規,**獨立跑不接 A→B→C**,滿載後每分鐘 +取 PMON + 兩片 SWB 的軌功耗;**沒有收尾段**,中斷後要手動 `blanton_tr518.sh stop`)。 +流程圖:`docs/Blanton_Test_Flow.drawio`。 +最後一次發布是 **V1.1.3**;SWB 的 I2C 通道與位址已於 2026-08-19 上機驗證。 margin 的 `VNOM` 已於 2026-08-30 改為 Blanton 實測中位數(144 條軌中 86 條上調 0.8~2.5%)。 交付用 `./publish/publish.sh` 打包。 @@ -219,6 +222,11 @@ Tera Term 連 COM port (115200-8-N-1) - ⚠️ **ICB/PDB 一律走 VI2C(`blanton_icb_vi2c.sh`),不要走 VSPI**:VSPI ~18 ms/reg 會讓 I2C byte 相間隔拉到 ~50 ms,踩中 SMBus 25–35 ms timeout,裝置直接 NACK。實測全掃 9.4 s vs 34.0 s。 - ⚠️ **I2C 讀一律 Repeated START**(不是 STOP + START),否則 PMBus/SMBus 裝置(VRM、EFUSE)不理。 +- ⚠️ **Script 4(thermal/safety)沒有收尾**:`while 1` 之後就是檔尾。中斷後 DUT 停在 + `port cd lb=mac` / `l2 learn off` / `test mode nr=yes`,`mlucas-avx2` 也還在背景。 + 下一個測試會在被污染的狀態上開始,而且 **`show interfaces status` 看不出來**。 + 收尾:`blanton_tr518.sh stop` + `kill $(jobs -p)` +- ⚠️ **Script 4 與 Script B 不能共用同一台 DUT**:兩者都會接管 `port cd` 的 loopback - ⚠️ **`settings/*.conf` 的 `VNOM` 是實測中位數,不是規格值**(2026-08-30 起)。它同時是 `margin_status` 偏差 % 的分母、也是 `margin_set` 推算 high/low/OV/UV 的基準,所以改它會 同時移動「看到的數字」和「實際打出去的電壓」。**跨這個日期的 margin log 不能直接互比。** diff --git a/docs/Blanton_Test_Flow.drawio b/docs/Blanton_Test_Flow.drawio new file mode 100644 index 0000000..f16441d --- /dev/null +++ b/docs/Blanton_Test_Flow.drawio @@ -0,0 +1,172 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/release-notes/v1.1.4.md b/docs/release-notes/v1.1.4.md new file mode 100644 index 0000000..19ac72d --- /dev/null +++ b/docs/release-notes/v1.1.4.md @@ -0,0 +1,61 @@ +# v1.1.4 — A thermal and safety run that loads the box and watches the rails + +## ✨ New features + +**`4_Blanton_Script_thermal_safety.ttl`** +* A **standalone** script — it is not part of the A → B → C chain and is not started by any of them. Run it on its own when the question is thermal or safety rather than functional. +* Brings the DUT up the same way Script A does (login, session reset, fan speed, `wait_init`, DUT inventory, BMC, PCIe error clear, `pcie_bus`, PMON, dmesg), then loads it: `mlucas-avx2 -cpu 0:15` in the background and `blanton_tr518.sh start` on the data plane. +* Then loops every minute: platform data, **both switch boards' rail power** via `TH6_SWB0/1_power_readback.sh`, and `bgctl list` / `jobs`. That is the point of the script — power per rail under sustained full load, sampled over hours. +* **It has no teardown.** When you interrupt it the DUT is still in `port cd lb=mac`, `l2 learn off` and `test mode nr=yes`, and `mlucas-avx2` is still running. Run `blanton_tr518.sh stop` and `kill $(jobs -p)` before anything else uses the box — nothing in `show interfaces status` reveals the leftover state. +* **It cannot share a DUT with Script B.** Both take over the `cd` ports. + +**Test flow diagram** +* `docs/Blanton_Test_Flow.drawio` draws all four scripts side by side, with the config flags that change each step marked, the one real `goto` in Script B drawn, and the manual handoffs between A → B → C shown as such. + +## 🐛 Bug fixes + +**The soak loop spent most of its minute reading margin** +* Script B's per-round loop is meant to be a quick sample. `margin_status_all.sh` walks nine LTC2980s over I2C and dominated the round. The scan moved to Script C, which takes it once before `show uptime`. +* **The trade-off is real and worth knowing**: margin is now only measured at the start (Script A) and the end (Script C). Drift that happens *during* the soak is no longer visible. + +**`hw-test-session finish` ran from inside the session's own shell** +* Script C now sends `exit` and waits for `Script done` first, so `finish` runs in the login shell that opened the session. + +**The new script arrived with LF line endings** +* Every other `.ttl` in the repo is CRLF, and `.gitattributes` marks `*.ttl` as `-text` — whatever is committed is exactly what Tera Term gets. Converted to CRLF to match. + +## 📦 Downloads + +| File | Contents | +|---|---| +| `Script_ABC_Blanton_V1.1.4.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` 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 + +* **Script 4 leaves the switch loaded and looped back.** Always finish with `blanton_tr518.sh stop`. If the next test starts without it, traffic and BER results are meaningless and nothing warns you. +* **Do not run Script 4 and Script B on the same DUT.** Same ports, same L2 settings. +* **Margin is no longer sampled during the soak** — only Script A (start) and Script C (end). +* **Re-baseline your margin limits if you have not already**: `VNOM` became the measured median in v1.1.3, which moved both the deviation % and the margin window. +* **These three cannot share the switch**: `blanton_ber.sh`, `blanton_tr518.sh`, `blanton_traffic_linespeed`. +* **PRBS takes the links down** while `blanton_ber.sh` is armed. +* **`ce0` keeps circulating until you stop it.** +* **Two numbers must stay in step**: Script C's `sleep 30` and `blanton_ber.sh`'s `BER_INTERVAL`. +* **`FAN_SPEED` is 100** — relevant here more than anywhere: a thermal run at full fan is not the same test as one at 30%. +* **The three items listed as unverified in v1.1.0 are still unverified**: the `ce0` ingress mirror, the 120s settle in `blanton_tr518.sh`, and `test mode nr=no` on stop. The settle matters most for this release — Script 4 depends on `tr 518` still driving traffic minutes after it was started. + +## 🔗 Links + +* [Blanton_Test_Flow.drawio](https://etgit.et-wen.com/etwen/Blanton_TTL_Script/src/branch/main/docs/Blanton_Test_Flow.drawio) — the four scripts side by side +* [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 + +**Full changelog:** [V1.1.3...V1.1.4](https://etgit.et-wen.com/etwen/Blanton_TTL_Script/compare/V1.1.3...V1.1.4) diff --git a/src/Script_ABC_Blanton/1_Blanton_Script_A.ttl b/src/Script_ABC_Blanton/1_Blanton_Script_A.ttl index 691d74e..66c945f 100644 --- a/src/Script_ABC_Blanton/1_Blanton_Script_A.ttl +++ b/src/Script_ABC_Blanton/1_Blanton_Script_A.ttl @@ -1,7 +1,7 @@ ; ============================================================================= ; Script A for Blanton -; Version : V1.1.3 -; Date : 2026-08-30 +; Version : V1.1.4 +; Date : 2026-08-31 ; Author : ETWen ; ============================================================================= ; Version History: @@ -178,6 +178,29 @@ ; board at comboA, which this change deleted - all 9 ; boards would have failed with "Profile not found" ; docs/LTC2980_channel_map.csv Regenerated (tools/gen_channel_map.sh) - it is output +; V1.1.4 2026-08-31 4_Blanton_Script_thermal_safety.ttl Add the thermal / safety run - a STANDALONE script, +; not part of the A -> B -> C chain +; Script A style setup (login, session, fan, wait_init, +; DUT info, BMC, PCIe clear, pcie_bus, pmon, dmesg) +; then FULL LOAD: mlucas-avx2 -cpu 0:15 in the +; background + blanton_tr518.sh start +; then while 1: setup_pmon + TH6_SWB0/SWB1 power +; readback + bgctl list + jobs, pause 60 +; !! no teardown section: after you interrupt it the +; unit is still on port cd lb=mac / l2 learn off / +; test mode nr=yes - run blanton_tr518.sh stop +; !! it drives the same ports as traffic and BER, so it +; cannot share a DUT with Script B +; ScriptB Drop the margin scan from the soak loop +; The loop is a fast per-minute sample; margin_status +; walks 9 LTC2980 over I2C and dominated the round +; ScriptC Take the margin scan instead, once, before uptime +; Trade-off: no margin drift DURING the soak any more, +; only a start (Script A) and end (Script C) reading +; ScriptC exit + wait "Script done" before hw-test-session +; finish - leaves the session shell first, so finish +; runs in the login shell that opened it +; docs/Blanton_Test_Flow.drawio Add the A/B/C + thermal flow diagram ; ============================================================================= include "config.ttl" diff --git a/src/Script_ABC_Blanton/2_Blanton_Script_B.ttl b/src/Script_ABC_Blanton/2_Blanton_Script_B.ttl index 4332cb0..6187b32 100644 --- a/src/Script_ABC_Blanton/2_Blanton_Script_B.ttl +++ b/src/Script_ABC_Blanton/2_Blanton_Script_B.ttl @@ -174,9 +174,5 @@ while 1 sendln "bgctl list" wait prompt_sonic_root sendln "jobs" - ; ========== Check Margin ========== - if EN_Margin = 1 then - include "utils/show_margin_status.ttl" - endif pause 60 endwhile diff --git a/src/Script_ABC_Blanton/3_Blanton_Script_C.ttl b/src/Script_ABC_Blanton/3_Blanton_Script_C.ttl index 7ead29b..4df7a0e 100644 --- a/src/Script_ABC_Blanton/3_Blanton_Script_C.ttl +++ b/src/Script_ABC_Blanton/3_Blanton_Script_C.ttl @@ -184,6 +184,11 @@ sendln "/usr/sbin/smartctl -x /dev/nvme0" wait prompt_sonic_root sendln "show reboot-cause" +; ========== Check Margin ========== +if EN_Margin = 1 then + include "utils/show_margin_status.ttl" +endif + ; ========== Show Power on uptime ========== wait prompt_sonic_root sendln "show uptime" @@ -219,6 +224,9 @@ sendln cmd ; ========== HW Test Session ========== wait prompt_sonic_root +sendln "exit" +wait "Script done" +wait prompt_sonic_root sendln "hw-test-session finish" wait prompt_sonic_root sendln "bgctl reset --yes" diff --git a/src/Script_ABC_Blanton/4_Blanton_Script_thermal_safety.ttl b/src/Script_ABC_Blanton/4_Blanton_Script_thermal_safety.ttl new file mode 100644 index 0000000..6742658 --- /dev/null +++ b/src/Script_ABC_Blanton/4_Blanton_Script_thermal_safety.ttl @@ -0,0 +1,158 @@ +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 strTestcase str_starttime + logopen filename 0 1 1 1 +endif + +; ========== Root Login ========== +wait prompt_login +sendln "admin" +wait "Password:" +sendln "YourPaSsWoRd" +wait prompt_sonic +sendln "sudo -i" + +; ========== 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 + +;Stress log clear +wait prompt_sonic_root +sendln "rm /host/hw-eval/jobs/*" + +; ========== HW Test Session ========== +; Clear session +wait prompt_sonic_root +sendln "hw-test-session finish" +wait prompt_sonic_root +sendln "bgctl reset --yes" +wait prompt_sonic_root +sendln "bgctl stop --all" +wait prompt_sonic_root +sendln "bgctl list" + +wait prompt_sonic_root +sendln "hw-test-session start" +wait prompt_sonic_root +sendln "hw-test-session log" +wait prompt_sonic_root +sendln "hw-test-session status" + +; ========== 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 +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 +;sendln "bmc-manager run 'cat /etc/issue'" +wait prompt_sonic_root +sendln "bmc-first-enroll" +wait prompt_sonic_root +sendln "bmc-manager version" +wait prompt_sonic_root +sendln "bmc-manager status" + +; ========== 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" + +; ========== Full Load ========== +; AMD CPU STRESS TEST +wait prompt_sonic_root +sendln 'chmod +x ~/hammer/tools/amd/mlucas-avx2' +wait prompt_sonic_root +sendln "~/hammer/tools/amd/mlucas-avx2 -s l -cpu 0:15 > ~/hammer/tools/amd/mlucas_amm_log 2>&1 &" + +; TR518 TEST +wait prompt_sonic_root +sendln "~/Blanton_Script/blanton_tr518.sh start" + +while 1 + ; Base info polling + include "utils/setup_pmon.ttl" + + ; TH6 Power Polling + wait prompt_sonic_root + sendln "~/Blanton_Script/TH6_SWB0_power_readback.sh" + wait prompt_sonic_root + sendln "~/Blanton_Script/TH6_SWB1_power_readback.sh" + + ; Background jobs Check + wait prompt_sonic_root + sendln "bgctl list" + wait prompt_sonic_root + sendln "jobs" + pause 60 +endwhile