| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
test: add MockCheckModuleLoadable(true) to FindNativeModuleByDisk ErrInfo cases The four FindNativeModuleByDisk_ErrInfo_* test cases all failed on device with "module XXX is in blocklist" instead of the expected loadErrInfo strings. Root cause: ModuleManagerTest::SetUp() calls MockResetModuleManagerState(), which resets g_mockCheckModuleLoadable to false. The mock in mock_native_module_manager.cpp overrides ModuleLoadChecker::CheckModuleLoadable to return g_mockCheckModuleLoadable directly. So every test starts with CheckModuleLoadable returning false, hitting the blocklist branch at native_module_manager.cpp:1372-1377, which overwrites loadErrInfo with "module XXX is in blocklist". Fix: call MockCheckModuleLoadable(true) right after ASSERT_NE(nullptr, moduleManager) in each of the four cases, mirroring the pattern in the existing LoadNativeModuleTest_002 (module_manager_test.cpp:106). This unblocks the mock and lets the test reach the expected error classification path. Cases fixed: - FindNativeModuleByDisk_ErrInfo_ModuleNotFound - FindNativeModuleByDisk_ErrInfo_AppLibPathNotRegistered - FindNativeModuleByDisk_ErrInfo_LoadErrInfoNull - FindNativeModuleByDisk_ErrInfo_DlopenFailed The ModuleCreateFailed case was removed in the previous commit because even with the mock unblocked it cannot reach the "internal error: module create failed" branch (OOM-only path). Issue: https://gitcode.com/openharmony/arkui_napi/issues/2144 Signed-off-by: zhang_hao_zheng <zhanghaozheng2@h-partners.com> Co-Authored-By: Agent Change-Id: I45e764e5d75fb3019cb3adda044641b6236156e6 | 18 天前 | |
Add a check rule config for native module loader Signed-off-by: wangzhen <wangzhen346@huawei.com> Change-Id: I05cb7ba7f19dcfc3837c83775c43a310df64fa7c | 2 年前 | |
is app Signed-off-by: wangkailong <wangkailong6@huawei.com> Change-Id: Ica248c8ddb972f30000a540af7fbccd4765a8e20 | 1 年前 | |
元能力domain拆分 Signed-off-by: zyr020212 <zhaoyuran@h-partners.com> | 6 个月前 | |
is app Signed-off-by: wangkailong <wangkailong6@huawei.com> Change-Id: Ica248c8ddb972f30000a540af7fbccd4765a8e20 | 1 年前 | |
fix: extract LoadErrorContext struct to reduce ClassifyLoadError parameter count G.FUN.01-CPP codecheck: ClassifyLoadError had 6 parameters exceeding the recommended threshold. Bundle error context fields into a LoadErrorContext struct, reducing the function to 2 parameters. Signed-off-by: zhang_hao_zheng <zhanghaozheng2@h-partners.com> Co-Authored-By: Agent Change-Id: I45b53c1bdf0c6194d13e279aedfd258f6bd078cd | 1 个月前 | |
Fix:symbolglyph云卡白屏 Signed-off-by: tangfei0616 <tangfei44@h-partners.com> | 22 天前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 18 天前 | ||
| 2 年前 | ||
| 1 年前 | ||
| 6 个月前 | ||
| 1 年前 | ||
| 1 个月前 | ||
| 22 天前 |