mirror of
https://gitee.com/openharmony/startup_init
synced 2025-02-21 12:50:48 +00:00
fix init ut dont output result
Signed-off-by: laiguizhong <laiguizhong@huawei.com> Change-Id: I8359f8017b5561c4a479d1c751d6ef2f72027119
This commit is contained in:
parent
bddfb1ca6a
commit
f1adf07215
@ -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);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user