Skip to content

test: add trace-signal testing and builtin coverage for trace-signal …#106

Open
yuKing123-king wants to merge 1 commit into
DKapture:mainfrom
yuKing123-king:test/trace-signal
Open

test: add trace-signal testing and builtin coverage for trace-signal …#106
yuKing123-king wants to merge 1 commit into
DKapture:mainfrom
yuKing123-king:test/trace-signal

Conversation

@yuKing123-king

@yuKing123-king yuKing123-king commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

本次修改集中在 test 目录,修改内容如下

  1. 添加了 trace-signal 的 BUILTIN 单测。测试内容围绕 trace-signal 的实际功能补充了回归验证,覆盖了帮助输出(验证 -h/--help 能正常打印 usage,并包含 sender-pid、recv-pid、sender-prog、recv-prog、sig、res 等选项说明)、非法参数处理(验证传入非法选项时,返回错误,并输出 usage)、自定义规则解析与过滤语义(验证 sender-pid、recv-pid、sender-prog、recv-prog、sig、res 规则能够正确解析,并且只有匹配规则的 signal 事件会输出,不匹配事件会被过滤)、默认规则解析(验证未传参时规则字段保持默认值,且默认不过滤时可输出多条不同事件)、以及日志输出格式化(验证输出中包含 sender pid、sender comm、receiver pid、receiver comm、signal 文本和 result 字段)这几类关键行为。
  2. 在test/Makefile 中补齐测试目标的链接依赖;
  3. 在test/mock.cpp 中修正 skeleton 对象在全局容器中的分配、指针回填和销毁逻辑,避免因扩容和错索引导致的崩溃;

@yuKing123-king
yuKing123-king force-pushed the test/trace-signal branch 2 times, most recently from 9c7f1cb to 5c06264 Compare July 21, 2026 02:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant