Repository navigation
test: sync DEF-003 pinning test with fixed disableOutDevice behavior - #952
Conversation
…evice Upstream commit 3645c98 changed the authorized-file-open-failure branch in disableOutDevice from return to continue (UT-DEF-003 reported by ut_enableutils.cpp pinning test). The pinning test still asserted the old aborting behavior, leaving the suite red on master. - rename disableOutDevice_usbFileOpenFails_abortsRemainingItems to ..._continuesRemainingItems and assert the fixed behavior: the USB item whose authorized file cannot be opened is skipped, the remaining network item is still disabled via ioctl and its DB path updated - suites EnableSqlManager*/EnableUtilsTest/WakeupUtilsTest: 122/122 pass
Reviewer's guide (collapsed on small PRs)Reviewer's GuideUpdates the DEF-003 pinning test to validate the upstream fix that continues processing remaining devices when a USB authorized file cannot be opened, while preserving the failed item’s state. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
deepin pr auto review🤖 AI 代码审查报告📊 总体评价
🔍 详细分析1. 语法逻辑 ✅评价: 语法正确,逻辑清晰 ✅ 通过 潜在问题: 建议: [] 2. 代码质量 ✅评价: 代码结构清晰,注释完整 ✅ 通过 潜在问题: 建议: [] 3. 代码性能 ✅评价: 性能良好,资源使用合理 ✅ 通过 潜在问题: 建议: [] 4. 代码安全 🔒评价: 存在0个安全漏洞 ✅ 通过
安全漏洞详情: 建议: [] 💡 改进建议代码示例本次变更无需修复,代码已符合规范。测试用例正确验证了修复后的行为: 当 USB 设备 authorized 文件打开失败时,disableOutDevice 函数使用 continue 跳过当前条目, 循环继续处理后续设备(如网卡),而非使用 return 提前退出整个循环。本报告由 AI 代码审查工具自动生成 |
|
TAG Bot New tag: 6.0.75 |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: add-uos, lzwind The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
/forcemerge |
背景
PR #937 合入上游 master 后,缺陷修复提交 3645c98(UT-DEF-003:disableOutDevice 中 authorized 文件打开失败分支
return→continue)只改了源码,未同步更新配套 pinning 测试,导致 master 上EnableUtilsTest.disableOutDevice_usbFileOpenFails_abortsRemainingItems断言旧缺陷行为、测试变红。本 PR 同步该 pinning 测试到修复后行为:
disableOutDevice_usbFileOpenFails_continuesRemainingItems验证
deepin-devicemanager-server-test(EnableSqlManager* / EnableUtilsTest.* / WakeupUtilsTest.*):122/122 全部通过关联
return→continue,已由 3645c98 修复)Summary by Sourcery
Align the disableOutDevice pinning test with the upstream fix so it validates that USB authorization failures do not prevent later devices from being disabled.
Enhancements:
Tests: