mirror of
https://gitcode.com/JianFeeeee/HomeAgent.git
synced 2026-09-28 21:33:05 +00:00
docs(make): 记下 proc grandchild 测试本身不稳定(现象,未下根因)
`make test` 的后置验证里发现 `internal/plugin/proc` 会 FAIL,实测形态: - 单独跑**同一命令**:`ok 11.5s` / `FAIL` 交替出现(至少各一次) - 全量并发跑:曾 600s 超时(`panic: test timed out after 10m0s`), 也曾 90s 就 FAIL - 失败测试固定是 `TestKillReturnsEvenWhenGrandchildSurvives`, 伴随日志 `[proc] audit 退出: signal: killed` 与本次改动(1ef1998 SSE 退避、9c3d285 判据)无关联:改的是 `cmd/gui/renderer/app.js` 与判据脚本,没碰 `internal/plugin/proc`。 症状**像** fork/kill 的进程组语义在容器/并发下不稳(孙进程 setsid 脱组后杀不掉 ⇒ Wait 挂死),但**尚未定位到根因**,因此 Makefile 里 只记现象、不下结论。 ★ 记这一条是因为我自己先踩了坑:一开始连跑 3 次全绿,我就准备写 「单跑稳定、仅并发偶发」;紧接着同一命令又 FAIL 了。**单跑通过不能 当结论** —— 这类 fork/kill 测试必须重试才能给出可信判断。
This commit is contained in:
11
Makefile
11
Makefile
@ -341,6 +341,17 @@ install: build
|
||||
systemctl daemon-reload
|
||||
@echo "Installed. Run: systemctl enable --now homeagent"
|
||||
|
||||
# ⚠ internal/plugin/proc 的 grandchild 系列测试(fork 真进程 + syscall.Kill
|
||||
# 杀进程组)**本身不稳定**,与本次改动无关:
|
||||
# · 单独跑同一命令:ok 11.5s / FAIL 交替出现(实测至少各一次)
|
||||
# · 全量并发跑:曾 600s 超时,也曾 90s 就 FAIL
|
||||
# · 失败形态固定是 TestKillReturnsEvenWhenGrandchildSurvives,
|
||||
# 伴随日志 `[proc] audit 退出: signal: killed`
|
||||
# 症状像 fork/kill 的进程组语义在容器/并发下不稳(孙进程 setsid 脱组后
|
||||
# 杀不掉 ⇒ Wait 挂死),但**尚未定位到根因**,所以这里只记录现象、
|
||||
# 不下结论。要稳定门禁就单独跑并重试:
|
||||
# go test ./internal/plugin/proc/ -count=1
|
||||
# ⚠ 别把"单跑通过"当结论——同一命令会交替通过/失败。
|
||||
test:
|
||||
$(GO) test ./...
|
||||
@$(MAKE) test-gui
|
||||
|
||||
Reference in New Issue
Block a user