已合并
fix: 修复 LLT 测试插件和日志桩依赖 #4735
yelongjian创建于 15 天前
fix: 修复 LLT 测试插件和日志桩依赖 #4735
已合并
Pull Request已成功合入, 合并人@CANN-robot
(感谢 yelongjian 的贡献)15 天前 创建了 pull request,commit 533c9b48
atomgit-bot
15 天前 评论:
15 天前 评论:
变更摘要
本 PR 修复了新 CANN 环境下 GE LLT 测试对真实 toolkit 插件和日志生命周期的隐式依赖,所有改动仅位于 tests/ 目录。核心改动有两处:一是在测试桩 mmDlopen 中过滤 liboptf_plugin_hccl.so 的加载;二是将日志桩中的静态 std::map 日志级别映射改为无静态析构对象的 switch 实现,消除退出阶段的 heap-use-after-free。
主要改动
- 过滤真实插件加载:在
tests/depends/mmpa/src/mmpa_stub.cc的mmDlopen中,当so_name包含liboptf_plugin_hccl.so时直接返回nullptr,使 LLT 测试不再依赖真实 toolkit 插件。 - 去除日志级别静态映射:在
tests/engines/nn_engine/depends/slog/slog_stub.cc中删除静态LOG_LEVEL_STR_MAP(std::map<int, std::string>)及其<map>头文件引用,避免静态析构对象带来的生命周期问题。 - 改用
switch映射日志级别:在DlogRecord中将原先基于map查找的日志级别转换改为switch语句(覆盖DLOG_DEBUG、DLOG_INFO、DLOG_WARN、DLOG_ERROR),不再产生静态析构对象,修复 FE 日志桩退出阶段的heap-use-after-free。


不准确?
atomgit-bot
15 天前 评论:
15 天前 评论:
15 天前 添加了label:cann-cla/yes
CANN-robot
15 天前 评论:
15 天前 评论:
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.
You can self-configure the PR merge rules for this repository. For more details, please refer to Here.
For more, you also can visit HICANN.
PR Approval Progress
✅ Congratulations! All modules have met the lgtm and approve requirements.
Module Approval Details
| module | lgtm status | approve status |
|---|---|---|
| repo-cann/ge | ✅ yangyongqiang0606, kobemini (2/2) | ✅ yangyongqiang0606 (1/1) |
| tests/engines/nn_engine | ✅ yangyongqiang0606, kobemini (2/2) | ✅ yangyongqiang0606 (1/1) |
| tests/engines/te_fusion | ✅ kobemini, yangyongqiang0606 (2/2) | ✅ yangyongqiang0606 (1/1) |
💡 Tip:
- Committer can comment
/approveor/lgtm- Commenting
/approveimplies both code review (lgtm) and intent to merge (approve)
CLA Signature Pass
yelongjian, thanks for your pull request. All authors of the commits have signed the CLA. 👍


此处折叠了86条消息 查看更多
GengChao
15 天前 评论:
15 天前 评论:
/lgtm


15 天前 添加了label:lgtm
yangyongqiang
15 天前 评论:
15 天前 评论:
/approve


15 天前 添加了label:approved
15 天前 合入了pull request
描述
修复新 CANN 环境下 GE LLT 测试对真实 toolkit 插件和日志生命周期的隐式依赖,所有修改仅位于 tests/ 目录。
变更类型
关联的Issue
无
如何测试
核对清单
其他信息
测试侧过滤 liboptf_plugin_hccl.so 的加载,并将日志级别映射改为无静态析构对象的 switch 实现。