未验证 提交 3370247e 编写于 作者: O openharmony_ci 提交者: Gitee

!796 解决init 单元测试不输出结果问题

Merge pull request !796 from Mupceet/master_cc
......@@ -273,8 +273,14 @@ HWTEST_F(ServiceUnitTest, TestServiceExec, TestSize.Level1)
service->pathArgs.count = 1;
const char *path = "/data/init_ut/test_service_release";
service->pathArgs.argv[0] = strdup(path);
EnterServiceSandbox(service);
service->importance = 20;
service->servPerm.gIDCnt = -1;
service->servPerm.uID = 0;
unsigned int *caps = (unsigned int *)calloc(1, sizeof(unsigned int) * 1);
caps[0] = FULL_CAP;
service->servPerm.caps = caps;
service->servPerm.capsCnt = 1;
EnterServiceSandbox(service);
int ret = ServiceExec(service);
EXPECT_EQ(ret, 0);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册