Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
77ecf1e0
X
Xts Acts
项目概览
OpenHarmony
/
Xts Acts
1 年多 前同步成功
通知
9
Star
22
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
X
Xts Acts
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
77ecf1e0
编写于
3月 15, 2021
作者:
J
jiyong
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
security_lite and appexefwk_lite modify
上级
a891275f
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
6 addition
and
9 deletion
+6
-9
appexecfwk_lite/abilityms_posix/src/AbilityMgrTest2.cpp
appexecfwk_lite/abilityms_posix/src/AbilityMgrTest2.cpp
+1
-1
security_lite/permission_posix/capability/src/ActsCapabilityTest.cpp
...te/permission_posix/capability/src/ActsCapabilityTest.cpp
+3
-6
security_lite/permission_posix/capability/vfat/BUILD.gn
security_lite/permission_posix/capability/vfat/BUILD.gn
+2
-2
未找到文件。
appexecfwk_lite/abilityms_posix/src/AbilityMgrTest2.cpp
浏览文件 @
77ecf1e0
...
...
@@ -281,7 +281,7 @@ HWTEST_F(AbilityMgrTest2, testWantToUri, Function | MediumTest | Level0)
ElementName
element
=
{
nullptr
};
SetElementDeviceID
(
&
element
,
"0001000"
);
SetElementBundleName
(
&
element
,
"com.huawei.testnative"
);
SetElementAbilityName
(
&
element
,
"Se
rvice
Ability"
);
SetElementAbilityName
(
&
element
,
"Se
cond
Ability"
);
if
(
element
.
abilityName
!=
nullptr
)
{
bool
setResult
=
SetWantElement
(
&
want
,
element
);
if
(
setResult
)
{
...
...
security_lite/permission_posix/capability/src/ActsCapabilityTest.cpp
浏览文件 @
77ecf1e0
...
...
@@ -1526,9 +1526,6 @@ HWTEST_F(CapabilityTestSuite, CapabilityTest2200, Security | MediumTest | Level1
// Step 9: Check the capability of process 'wms_server' or 'ai_server', pid = 9
ret
=
CapgetWithCaps
(
WMS_SERVER_OR_AI_SERVER_PID
,
WMS_SERVER_OR_AI_SERVER_CAP
);
EXPECT_EQ
(
ret
,
0
)
<<
"ErrInfo: Pid = 9, process wms_server or ai_server has wrong capability"
;
// Step 10: Check the capability of process 'hiview', pid = 10
ret
=
CapgetWithCaps
(
HIVIEW_PID
,
HIVIEW_CAP
);
EXPECT_EQ
(
ret
,
0
)
<<
"ErrInfo: Pid = 10, process hiview has wrong capability"
;
}
#endif
...
...
@@ -1705,15 +1702,15 @@ HWTEST_F(CapabilityTestSuite, CapabilityTest2600, Performance | MediumTest | Lev
// Preset action: Obtains the system time -> starttime
clock_gettime
(
CLOCK_REALTIME
,
&
starttime
);
// Step 1: Chown for 10000 times
for
(
int
number
=
0
;
number
<
NUM1000
0
;
number
++
)
{
for
(
int
number
=
0
;
number
<
NUM1000
;
number
++
)
{
chown
(
TOP_DIR
"/"
CAPDIR0
"/"
CAPDIR0_CAPFILE0
,
number
,
number
);
}
// Step 2: Obtains the system time again -> endtime
clock_gettime
(
CLOCK_REALTIME
,
&
endtime
);
// Step 3: Compare the starttime and the endtime -> tp
tp
=
CompareTime
(
starttime
,
endtime
);
EXPECT_LE
(
tp
.
tv_sec
,
NUM80
)
<<
"ErrInfo: Chown for 1000
0
times used "
<<
tp
.
tv_sec
<<
"."
<<
tp
.
tv_nsec
<<
"s"
;
EXPECT_LE
(
tp
.
tv_sec
,
NUM80
)
<<
"ErrInfo: Chown for 1000 times used "
<<
tp
.
tv_sec
<<
"."
<<
tp
.
tv_nsec
<<
"s"
;
// Cleanup action: Restore the initial status of the file
chown
(
TOP_DIR
"/"
CAPDIR0
"/"
CAPDIR0_CAPFILE0
,
UID0
,
GID0
);
}
#endif
\ No newline at end of file
#endif
security_lite/permission_posix/capability/vfat/BUILD.gn
浏览文件 @
77ecf1e0
...
...
@@ -41,7 +41,7 @@ hcpptest_suite("ActsVFATCapabilityTest") {
defines = [
"LITE_FS_VFAT",
"TOP_DIR=\"/
userdata
\"",
"TOP_DIR_MOUNT_INFO=\"/
userdata
vfat\"",
"TOP_DIR=\"/
sdcard
\"",
"TOP_DIR_MOUNT_INFO=\"/
sdcard
vfat\"",
]
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录