Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Startup Init Lite
提交
63b6bbc7
S
Startup Init Lite
项目概览
OpenHarmony
/
Startup Init Lite
1 年多 前同步成功
通知
3
Star
37
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
S
Startup Init Lite
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
63b6bbc7
编写于
4月 24, 2023
作者:
O
openharmony_ci
提交者:
Gitee
4月 24, 2023
浏览文件
操作
浏览文件
下载
差异文件
!1915 fix:超时时间修改成15s
Merge pull request !1915 from cheng_jinsong/deviceinfo15
上级
ceffb5a2
9b103793
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
7 addition
and
11 deletion
+7
-11
device_info/device_info_stub.cpp
device_info/device_info_stub.cpp
+3
-3
services/etc/init.cfg
services/etc/init.cfg
+1
-2
services/modules/trace/init_trace_static.c
services/modules/trace/init_trace_static.c
+0
-3
test/moduletest/deviceinfo_moduleTest.cpp
test/moduletest/deviceinfo_moduleTest.cpp
+2
-2
test/moduletest/service_watcher_moduleTest.cpp
test/moduletest/service_watcher_moduleTest.cpp
+1
-1
未找到文件。
device_info/device_info_stub.cpp
浏览文件 @
63b6bbc7
...
...
@@ -42,9 +42,9 @@ REGISTER_SYSTEM_ABILITY_BY_ID(DeviceInfoService, SYSPARAM_DEVICE_SERVICE_ID, tru
static
std
::
mutex
g_lock
;
static
time_t
g_lastTime
;
#ifndef STARTUP_INIT_TEST
static
const
int
DEVICE_INFO_EXIT_TIMEOUT_MS
=
60
;
static
const
int
DEVICE_INFO_EXIT_TIMEOUT_MS
=
15
;
#else
static
const
int
DEVICE_INFO_EXIT_TIMEOUT_MS
=
2
;
static
const
int
DEVICE_INFO_EXIT_TIMEOUT_MS
=
3
;
#endif
static
void
UnloadDeviceInfoSa
(
int
signo
)
...
...
@@ -53,7 +53,7 @@ static void UnloadDeviceInfoSa(int signo)
time_t
currTime
;
(
void
)
time
(
&
currTime
);
if
(
difftime
(
currTime
,
g_lastTime
)
<
DEVICE_INFO_EXIT_TIMEOUT_MS
)
{
alarm
(
DEVICE_INFO_EXIT_TIMEOUT_MS
/
2
);
// 2
half
alarm
(
DEVICE_INFO_EXIT_TIMEOUT_MS
/
3
);
// 3
half
return
;
}
DINFO_LOGI
(
"DeviceInfoService::UnloadDeviceInfoSa"
);
...
...
services/etc/init.cfg
浏览文件 @
63b6bbc7
...
...
@@ -27,8 +27,7 @@
"bootchart start",
"chown access_token access_token /dev/access_token_id",
"chmod 0666 /dev/access_token_id",
"trigger init-hitrace",
"trigger init-trace"
"trigger init-hitrace"
]
}, {
"name" : "init",
...
...
services/modules/trace/init_trace_static.c
浏览文件 @
63b6bbc7
...
...
@@ -20,9 +20,6 @@ static int InitTraceEarlyHook(const HOOK_INFO *info, void *cookie)
{
if
(
GetBootEventEnable
())
{
PLUGIN_LOGI
(
"init trace enabled."
);
#ifndef STARTUP_INIT_TEST
InitModuleMgrInstall
(
"inittrace"
);
#endif
return
0
;
}
return
0
;
...
...
test/moduletest/deviceinfo_moduleTest.cpp
浏览文件 @
63b6bbc7
...
...
@@ -50,7 +50,7 @@ HWTEST_F(DeviceInfoModuleTest, DeviceInfoGetUdid_001, TestSize.Level0)
EXPECT_EQ
(
object
!=
nullptr
,
1
);
BEGET_ERROR_CHECK
(
object
!=
nullptr
,
return
,
"Get deviceinfo manager object from samgr failed"
);
std
::
this_thread
::
sleep_for
(
std
::
chrono
::
seconds
(
80
));
// wait sa died 8
0s
std
::
this_thread
::
sleep_for
(
std
::
chrono
::
seconds
(
20
));
// wait sa died 2
0s
object
=
samgr
->
GetSystemAbility
(
SYSPARAM_DEVICE_SERVICE_ID
);
EXPECT_EQ
(
object
==
nullptr
,
1
);
...
...
@@ -77,7 +77,7 @@ HWTEST_F(DeviceInfoModuleTest, DeviceInfoGetSerial_001, TestSize.Level0)
EXPECT_EQ
(
object
!=
nullptr
,
1
);
BEGET_ERROR_CHECK
(
object
!=
nullptr
,
return
,
"Get deviceinfo manager object from samgr failed"
);
std
::
this_thread
::
sleep_for
(
std
::
chrono
::
seconds
(
80
));
// wait sa died 8
0s
std
::
this_thread
::
sleep_for
(
std
::
chrono
::
seconds
(
20
));
// wait sa died 2
0s
object
=
samgr
->
GetSystemAbility
(
SYSPARAM_DEVICE_SERVICE_ID
);
EXPECT_EQ
(
object
==
nullptr
,
1
);
...
...
test/moduletest/service_watcher_moduleTest.cpp
浏览文件 @
63b6bbc7
...
...
@@ -84,7 +84,7 @@ HWTEST_F(ServiceWatcherModuleTest, serviceWatcher_test_003, TestSize.Level0)
auto
status1
=
GetServiceStatus
(
serviceName
);
EXPECT_TRUE
(
status1
==
"running"
);
// wait service exit
std
::
this_thread
::
sleep_for
(
std
::
chrono
::
seconds
(
80
));
// wait sa died 8
0s
std
::
this_thread
::
sleep_for
(
std
::
chrono
::
seconds
(
20
));
// wait sa died 2
0s
auto
status2
=
GetServiceStatus
(
serviceName
);
EXPECT_TRUE
(
status2
==
"stopped"
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录