feat(nfc): Poll the NFC tag through the soak instead of sampling it once
nfc_polling.sh wraps blantons_nfc_validate.py in a background loop and keeps score: start/stop/status/tail/report/clear/fg. Script A takes a 30s baseline, Script B starts the poll for the soak, Script C stops it with the other monitors and reports. report only reads the log, so it can be run mid-soak without disturbing anything - and it says RUNNING so a snapshot is not read as the final answer. Each round appends a machine-readable RESULT line, which keeps the tally independent of the tool's wording. ERROR is counted apart from FAIL. A round where the tool printed neither [PASS] nor [FAIL] - crashed, missing, hung past the timeout - measured nothing, and that is a different fault from a tag that would not read. Rolling them together hides whichever one you are not looking for. Two habits from earlier bugs are baked in: tail does not follow (tail -f never returns and a macro waiting on the prompt hangs there), and the .py is called through python3 rather than ./ (it arrives mode 100644 and a USB copy carries no execute bit). Also fixes Script C copying "nfc_polling.log" to the job dir when the file is "nfc_poll.log". The cp failed, nothing checked it, and the run finished looking fine - you would find out at the desk, with a job archive that had no NFC log in it. Script A -> V1.1.2. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014RetWKFZFG1ZHcitQAyhwM
This commit is contained in:
@@ -9,7 +9,7 @@ DUT 端的取數能力由一組 **bash 工具庫** 提供(CB FPGA `pcimem` →
|
||||
|
||||
完整架構見 [ARCHITECTURE.md](ARCHITECTURE.md)。
|
||||
|
||||
**目前狀態(2026-08-28)**:Script A 為 **V1.1.1**(A 集中記錄 A/B/C 三支的變更)。涵蓋
|
||||
**目前狀態(2026-08-28)**:Script A 為 **V1.1.2**(A 集中記錄 A/B/C 三支的變更)。涵蓋
|
||||
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` 指定
|
||||
@@ -22,7 +22,8 @@ TR518 負載(`blanton_tr518.sh`,**TTL 尚未接**)、SWB 軌功耗(`TH6_
|
||||
線速流量也納入 100G `ce0`(VLAN 138,靠 ingress mirror 維持循環)。
|
||||
Script A 開頭會先收掉前一輪殘留(`hw-test-session finish` + `bgctl reset/stop --all`),
|
||||
再 `bgctl list` 確認沒有 job 留著佔資源。
|
||||
最後一次發布是 **V1.1.0**;SWB 的 I2C 通道與位址已於 2026-08-19 上機驗證。
|
||||
NFC tag 讀取由 `nfc_polling.sh` 背景輪詢(A 做基線、B 起、C 停並 report)。
|
||||
最後一次發布是 **V1.1.1**;SWB 的 I2C 通道與位址已於 2026-08-19 上機驗證。
|
||||
交付用 `./publish/publish.sh` 打包。
|
||||
|
||||
## 技術棧
|
||||
@@ -129,6 +130,16 @@ sleep 30 # 至少等一個 interval 再 rep
|
||||
./Blanton_Script/blanton_tr518.sh stop # 只送 port cd lb=none
|
||||
# ⚠️ stop 不還原 l2 learn / test mode(TR_RESTORE_LEARN=1 / _TESTMODE=1 才會)
|
||||
|
||||
# ── NFC tag 輪詢 ────────────────────────────────────
|
||||
~/Blanton_Script/nfc_polling.sh start # 背景,start 會先清空 log
|
||||
~/Blanton_Script/nfc_polling.sh status # pid、已跑幾輪、最後一筆結果
|
||||
~/Blanton_Script/nfc_polling.sh report # PASS/FAIL/ERROR 統計,polling 中也能跑
|
||||
~/Blanton_Script/nfc_polling.sh tail 50 # 最後 50 行(不 follow,不會卡住)
|
||||
~/Blanton_Script/nfc_polling.sh stop
|
||||
# log: ~/Blanton_Script/log/nfc_poll.log
|
||||
# ERROR = 工具沒印出 [PASS]/[FAIL](或逾時),跟「tag 讀不到」分開算
|
||||
# NFC_INTERVAL_SEC / NFC_TIMEOUT_SEC / NFC_ARGS 可調(要每個子指令都帶)
|
||||
|
||||
# ── USB 目標偵測 ────────────────────────────────────
|
||||
bash ~/Blanton_Script/usb_target.sh -o dev # /dev/sdX1
|
||||
bash ~/Blanton_Script/usb_target.sh -o mnt # 掛好並回傳掛載點
|
||||
|
||||
Reference in New Issue
Block a user