a12367981d
48 轮直读 SINT 矩阵(8 周期×6 变体)复核历史"丢中断"说法:芯片侧事件 丢失 = 0。归类:drain 读清消费 3/48(drain-int 探针现场抓获)、门控 竞态 2/48、主机同步 1/48、幽灵态 0/48 未复现。 根除性修复:net_listen_locked / net_listener_try 的排事件读清从 listen 后挪至 LISTEN 命令之前——新连接 CONNECT 落进该窗即被本方读清 吞掉,即"数据被吞"的生产侧自伤机制(台架 3/48 为同形态放大版)。 全局读收口:全局中断寄存器唯一读者 = net_poll(I7);生产/测试/台架 游离全局读全部删除,ch395f.h 声明处加护栏注释。 归因更正:17 文件约 40 处"丢中断"措辞改为"事件未收到/读清消费竞态" (机制全部保留,仅归因更正);设计文档 §5.2 新增 E14 锚点;Trap Records TRAP-NET-17/-20/B3 归因更正段;配图生成器与 SVG 重生成。 台架:事件未收到复核探针保留(drain-int / SINT 补读×3 / 超时归类), 下次跑矩阵自动归类;实验注册(main.c/uvprojx)已完全还原。 验证:@build 0 错误 0 警告;ci_local L0 32/0 + gitlint + L0.5 953/953;doc-links --all --sections-strict 通过;@test PASS(无 [ERR],net init 619ms);回归 :7003 300ms×10 = 10/10、:21 n30×50 = 0/50 失败。
65 lines
2.4 KiB
Python
65 lines
2.4 KiB
Python
#!/usr/bin/env python3
|
|
# -*- coding: utf-8 -*-
|
|
"""E6 24h soak driver (U15 mismatch frequency, self-heal design anchor E6).
|
|
|
|
Protocol (docs/网络/网络自愈架构设计.md §4.8, anchor §5.2 E6):
|
|
24h normal operation + periodic E1 stress injection:
|
|
- every hour : relisten_stress :7003 n=10 gap=100 (UI-like churn)
|
|
- every 4th hour : full E1 (:7003 n=50 gap=0 + :21 n=50 gap=100)
|
|
Device-side confirmed hits are counted by the NET_U15_PROBE firmware and
|
|
appear in the serial log as "U15 probe: sockN rx=... hits=N" (first hit
|
|
immediately, then <=1/hour). Read the verdict from serial.log afterwards.
|
|
|
|
Usage: python e6_soak.py [--hours 24]
|
|
Exit: 0 = soak completed; nonzero = driver error (device untouched).
|
|
"""
|
|
import argparse
|
|
import os
|
|
import subprocess
|
|
import sys
|
|
import time
|
|
|
|
ROOT = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
|
STRESS = os.path.join(ROOT, "test", "host", "relisten_stress.py")
|
|
|
|
|
|
def log(msg):
|
|
print("[%s] %s" % (time.strftime("%m-%d %H:%M:%S"), msg), flush=True)
|
|
|
|
|
|
def burst(args_list, tag):
|
|
t0 = time.time()
|
|
try:
|
|
r = subprocess.run([sys.executable, STRESS] + args_list,
|
|
capture_output=True, text=True, timeout=900)
|
|
out = (r.stdout or "") + (r.stderr or "")
|
|
tail = [ln for ln in out.splitlines() if "ok=" in ln or "latency" in ln]
|
|
dt = time.time() - t0
|
|
log("%s rc=%d %.0fs %s" % (tag, r.returncode, dt, " | ".join(tail[-2:])))
|
|
except Exception as e: # driver hiccup must not abort the soak
|
|
log("%s ERROR %r" % (tag, e))
|
|
|
|
|
|
def main():
|
|
ap = argparse.ArgumentParser()
|
|
ap.add_argument("--hours", type=int, default=24)
|
|
a = ap.parse_args()
|
|
|
|
log("E6 soak start: %d h, hourly :7003x10, every-4h E1 full" % a.hours)
|
|
t_start = time.time()
|
|
for h in range(1, a.hours + 1):
|
|
# sleep first: hour boundary cadence
|
|
remain = t_start + h * 3600.0 - time.time()
|
|
if remain > 0:
|
|
time.sleep(remain)
|
|
burst(["--port", "7003", "--n", "10", "--gap-ms", "100"], "hour%02d :7003x10" % h)
|
|
if h % 4 == 0:
|
|
burst(["--port", "7003", "--n", "50", "--gap-ms", "0"], "hour%02d E1 :7003x50g0" % h)
|
|
burst(["--port", "21", "--n", "50", "--gap-ms", "100"], "hour%02d E1 :21x50g100" % h)
|
|
log("E6 soak done: %.1f h elapsed" % ((time.time() - t_start) / 3600.0))
|
|
return 0
|
|
|
|
|
|
if __name__ == "__main__":
|
|
sys.exit(main())
|