已合并
test: 重构 TSD 单元测试并提升测试有效性(#800) #4085
DevLeev创建于 8月7日
test: 重构 TSD 单元测试并提升测试有效性(#800) #4085
已合并
Pull Request已成功合入, 合并人@CANN-robot
(感谢 DevLeev 的贡献)atomgit-bot
8月7日 评论:
8月7日 评论:
🤖 正在生成合并请求摘要,请稍候…


atomgit-bot
8月7日 评论:
8月7日 评论:
🤖 AI 代码检视正在进行中,请稍候…


8月7日 添加了label:cann-cla/yes
CANN-robot
8月7日 评论:
8月7日 评论:
Thanks for your pull-request.
The full list of commands accepted by me can be found at here。
You can get sig-info at here
PR Approval Progress
✅ Congratulations! All modules have met the lgtm and approve requirements.
Module Approval Details
| module | lgtm status | approve status |
|---|---|---|
| tests/ut/tsd | ✅ ZhaiPeiChao, yanmingxiang (2/2) | ✅ ZhaiPeiChao (1/1) |
💡 Tip:
- Committer can comment
/approveor/lgtm- Commenting
/approveimplies both code review (lgtm) and intent to merge (approve)
CLA Signature Pass
LiWei79, thanks for your pull request. All authors of the commits have signed the CLA. 👍


8月7日 将wangtao43,zhangpengpeng8,yanmingxiang,ZhaiPeiChao,Reyn52166,ykl999,houyanbao,tingwood设为评审人
8月7日 将wangtao43,zhangpengpeng8,yanmingxiang,ZhaiPeiChao,Reyn52166,ykl999,houyanbao,tingwood设为评审人
8月7日 将ZhaiPeiChao设为审查人
atomgit-bot
8月7日 评论:
8月7日 评论:
⚠️ 本次变更过大(66 个可审文件、16023 行),已超出 AI 代码评审的处理范围,本次跳过。建议拆分为更小的 PR 以获得有效评审。


atomgit-bot
8月7日 评论:
8月7日 评论:
⚠️ 本次变更过大(66 个可审文件、16023 行),已超出 AI 代码评审的处理范围,本次跳过。建议拆分为更小的 PR 以获得有效评审。


8月7日 添加了label:ci-pipeline-running
CANN-robot
8月7日 评论:
8月7日 评论:
流水线任务触发成功
任务链接 [e0f3ad938b984e76b19e576251e32bba][流水线指导]
| 任务名称 | 状态 | 日志 | 下载链接 |
|---|---|---|---|
| Compile_Ascend_X86 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_ARM | ✅ SUCCESS | >>>>> | >>>>> |
| pre_comment | ✅ SUCCESS | >>>>> | |
| Compile_Ascend_X86_ubuntu24 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_ARM_ubuntu24 | ✅ SUCCESS | >>>>> | >>>>> |
| UT_Test_acl | ✅ SUCCESS | >>>>> | |
| UT_Test_rts_v201 | ✅ SUCCESS | >>>>> | |
| UT_Test_rts_c | ✅ SUCCESS | >>>>> | |
| UT_Test_rts_david | ✅ SUCCESS | >>>>> | |
| UT_Test_rts_910b | ✅ SUCCESS | >>>>> | |
| UT_Test_rts_common | ✅ SUCCESS | >>>>> | |
| UT_Test_platform | ✅ SUCCESS | >>>>> | |
| UT_Test_qs | ✅ SUCCESS | >>>>> | |
| UT_Test_aicpusd | ✅ SUCCESS | >>>>> | |
| UT_Test_tsd | ✅ SUCCESS | >>>>> | |
| UT_Test_error_manager | ✅ SUCCESS | >>>>> | |
| UT_Test_slog | ✅ SUCCESS | >>>>> | |
| UT_Test_atrace | ✅ SUCCESS | >>>>> | |
| UT_Test_msprof_part1 | ✅ SUCCESS | ||
| UT_Test_msprof_part2 | ✅ SUCCESS | ||
| UT_Test_adump | ✅ SUCCESS | >>>>> | |
| UT_Test_mmpa | ✅ SUCCESS | >>>>> | |
| UT_Test_camodel_check | ✅ SUCCESS | ||
| API_Check | ✅ SUCCESS | >>>>> | |
| PreSmoke_A900_npupool | ✅ SUCCESS | >>>>> | |
| UT_Test_rts_report | ✅ SUCCESS | >>>>> | |
| UT_Test_msprof_report | ✅ SUCCESS | >>>>> |
[2026-08-07 10:49:42] CI执行结束


CANN-robot
8月7日 评论:
8月7日 评论:
流水线任务触发成功
任务链接 [cdc6ef673a6c4499b7deee843deb1f2c][流水线指导]
| 任务名称 | 状态 | 日志 | 下载链接 |
|---|---|---|---|
| codecheck | ✅ SUCCESS | >>>>> | |
| SCA | ✅ SUCCESS | >>>>> | |
| antipoison | ✅ SUCCESS | >>>>> | |
| codecheck_Check_Pr | ✅ SUCCESS | ||
| codecheck_style | ✅ SUCCESS | >>>>> | |
| codecheck_precommit | ✅ SUCCESS | >>>>> | |
| StaticCheck_codespell | ✅ SUCCESS | ||
| StaticCheck_link_validity | ✅ SUCCESS | ||
| StaticCheck_resource_existence | ✅ SUCCESS | ||
| StaticCheck_tag_closed | ✅ SUCCESS | ||
| StaticCheck_markdownlint | ✅ SUCCESS |
[2026-08-07 10:47:10] CI执行结束


8月7日 添加了label:api-check-pass
8月7日 删除了label:ci-pipeline-running
8月7日 添加了label:ci-pipeline-passed
ZhaiPeiChao
8月7日 评论:
8月7日 评论:
/lgtm
/approve


8月7日 通过审查
8月7日 通过了评审
8月7日 添加了label:approved
yanmingxiang
8月7日 评论:
8月7日 评论:
/lgtm
/approve


8月7日 添加了label:lgtm
8月7日 合入了pull request
Pull Request
描述
本 PR 对 TSD 单元测试进行结构和质量重构,不修改
src/tsd生产代码:src/tsd模块结构重排tests/ut/tsd,实现 37 个生产.cpp与 37 个 source-owned UT 文件一一对应。tsd_client_utesttarget,CMake 显式挂载全部生产源文件和对应 UT。libplatform.so。变更类型
请选择本次引入的变更类型:
关联的Issue
Closes #800
Issue:https://gitcode.com/cann/runtime/issues/800
如何测试
前提条件:容器
cann_build,CANN 8.5.0-beta.1,第三方依赖位于/workspace/runtime/output/third_party。执行全量 TSD UT:
source /usr/local/Ascend/cann-8.5.0-beta.1/set_env.sh bash tests/build_ut.sh --ut=tsd --target=tsd_client_utest \ --cann_3rd_lib_path=/workspace/runtime/output/third_party结果:
880/880通过,0 failure/error/disabled。执行 shuffle/repeat:
结果:两轮均
880/880通过。执行覆盖率和结构门禁:
src/tsd/**/*.cpp行覆盖率:90.9% (4603/5062)。96.8% (485/501)。37/37/37。核对清单
其他信息
4979f0f07 test: 重构TSD单元测试。src/tsd、Markdown、skill 或过程文件。