mirror of
https://gitee.com/openharmony/startup_appspawn
synced 2024-11-27 01:00:38 +00:00
!1666 Appspawn踢狗UT用例失败修复
Merge pull request !1666 from 陈其文/HM_AddNwebspawnKickdog
This commit is contained in:
commit
3e4a510277
@ -120,7 +120,7 @@ static int CheckKernelType(bool *isLinux)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int SpawnKickDogStart(AppSpawnMgr *mgrContent)
|
||||
APPSPAWN_STATIC int SpawnKickDogStart(AppSpawnMgr *mgrContent)
|
||||
{
|
||||
APPSPAWN_CHECK(mgrContent != NULL, return 0, "content is null");
|
||||
APPSPAWN_CHECK((mgrContent->content.mode == MODE_FOR_APP_SPAWN) ||
|
||||
|
@ -112,6 +112,7 @@ int RunBegetctlBootApp(AppSpawnMgr *content, AppSpawningCtx *property);
|
||||
void SetSystemEnv(void);
|
||||
void RunAppSandbox(const char *ptyName);
|
||||
HOOK_MGR *GetAppSpawnHookMgr(void);
|
||||
int SpawnKickDogStart(AppSpawnMgr *mgrContent);
|
||||
#define STUB_NEED_CHECK 0x01
|
||||
typedef int (*ExecvFunc)(const char *pathname, char *const argv[]);
|
||||
enum {
|
||||
|
@ -99,6 +99,7 @@ HWTEST_F(AppSpawnKickDogTest, App_Spawn_AppSpawnKickDog_001, TestSize.Level0)
|
||||
|
||||
std::unique_ptr<OHOS::AppSpawnTestServer> testServer =
|
||||
std::make_unique<OHOS::AppSpawnTestServer>("appspawn -mode appspawn");
|
||||
AddPreloadHook(HOOK_PRIO_COMMON, SpawnKickDogStart);
|
||||
testServer->Start(nullptr);
|
||||
if (CheckDeviceInLinux()) {
|
||||
EXPECT_EQ(CheckFileContent(HM_APPSPAWN_WATCHDOG_FILE, LINUX_APPSPAWN_WATCHDOG_ON), 0);
|
||||
@ -139,6 +140,7 @@ HWTEST_F(AppSpawnKickDogTest, App_Spawn_AppSpawnKickDog_002, TestSize.Level0)
|
||||
|
||||
std::unique_ptr<OHOS::AppSpawnTestServer> testServer =
|
||||
std::make_unique<OHOS::AppSpawnTestServer>("appspawn -mode nwebspawn");
|
||||
AddPreloadHook(HOOK_PRIO_COMMON, SpawnKickDogStart);
|
||||
testServer->Start(nullptr);
|
||||
if (CheckDeviceInLinux()) {
|
||||
EXPECT_EQ(CheckFileContent(HM_APPSPAWN_WATCHDOG_FILE, LINUX_APPSPAWN_WATCHDOG_ON), 0);
|
||||
|
Loading…
Reference in New Issue
Block a user