Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
c51fd777
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看板
提交
c51fd777
编写于
8月 26, 2021
作者:
O
openharmony_ci
提交者:
Gitee
8月 26, 2021
浏览文件
操作
浏览文件
下载
差异文件
!473 fix hilog testcases
Merge pull request !473 from youyouyuai/master
上级
ee8acaca
da62d860
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
30 addition
and
20 deletion
+30
-20
hiviewdfx/hilogtest/libhilogtest/hilogtest/hilogtest.cpp
hiviewdfx/hilogtest/libhilogtest/hilogtest/hilogtest.cpp
+30
-20
未找到文件。
hiviewdfx/hilogtest/libhilogtest/hilogtest/hilogtest.cpp
浏览文件 @
c51fd777
...
...
@@ -856,9 +856,10 @@ HWTEST_F(hilogtest, buff_size_all, Function|MediumTest|Level3)
*/
HWTEST_F
(
hilogtest
,
buff_size_illegal
,
Function
|
MediumTest
|
Level4
)
{
bool
ret
=
true
;
result
=
ExecuteCmd
(
"hilog -g -t abc"
);
expect
=
"Invalid parameter
\n
"
;
EXPECT_
STREQ
(
result
.
c_str
(),
expect
.
c_str
()
);
ret
=
result
.
find
(
"Invalid log type"
)
!=
std
::
string
::
npos
;
EXPECT_
EQ
(
ret
,
true
);
}
/*
...
...
@@ -868,9 +869,10 @@ HWTEST_F(hilogtest, buff_size_illegal, Function|MediumTest|Level4)
*/
HWTEST_F
(
hilogtest
,
buff_size_illegal2
,
Function
|
MediumTest
|
Level4
)
{
bool
ret
=
true
;
result
=
ExecuteCmd
(
"hilog -g -t 'core abc'"
);
expect
=
"buffsize operation error!
\n
"
;
EXPECT_
STREQ
(
result
.
c_str
(),
expect
.
c_str
()
);
ret
=
result
.
find
(
"Invalid log type"
)
!=
std
::
string
::
npos
;
EXPECT_
EQ
(
ret
,
true
);
}
/*
...
...
@@ -997,9 +999,10 @@ HWTEST_F(hilogtest, buff_resize_gbyte2, Function|MediumTest|Level3)
*/
HWTEST_F
(
hilogtest
,
buff_resize_illegal
,
Function
|
MediumTest
|
Level4
)
{
bool
ret
=
true
;
result
=
ExecuteCmd
(
"hilog -G 0"
);
expect
=
"core buffer resize fail
\n
app buffer resize fail
\n\n
"
;
EXPECT_
STREQ
(
result
.
c_str
(),
expect
.
c_str
()
);
ret
=
result
.
find
(
"Invalid buffer size"
)
!=
std
::
string
::
npos
;
EXPECT_
EQ
(
ret
,
true
);
}
/*
...
...
@@ -1009,9 +1012,10 @@ HWTEST_F(hilogtest, buff_resize_illegal, Function|MediumTest|Level4)
*/
HWTEST_F
(
hilogtest
,
buff_resize_illegal2
,
Function
|
MediumTest
|
Level3
)
{
bool
ret
=
true
;
result
=
ExecuteCmd
(
"hilog -G 2g"
);
expect
=
"core buffer resize fail
\n
app buffer resize fail
\n\n
"
;
EXPECT_
STREQ
(
result
.
c_str
(),
expect
.
c_str
()
);
ret
=
result
.
find
(
"Invalid buffer size"
)
!=
std
::
string
::
npos
;
EXPECT_
EQ
(
ret
,
true
);
}
/*
...
...
@@ -1086,9 +1090,10 @@ HWTEST_F(hilogtest, buff_resize_all, Function|MediumTest|Level4)
*/
HWTEST_F
(
hilogtest
,
buff_resize_illegal_type
,
Function
|
MediumTest
|
Level4
)
{
bool
ret
=
true
;
result
=
ExecuteCmd
(
"hilog -G 2m -t abc"
);
expect
=
"Invalid parameter
\n
"
;
EXPECT_
STREQ
(
result
.
c_str
(),
expect
.
c_str
()
);
ret
=
result
.
find
(
"Invalid log type"
)
!=
std
::
string
::
npos
;
EXPECT_
EQ
(
ret
,
true
);
ExeCmd
(
"hilog -G 1m -t all"
);
}
...
...
@@ -1099,9 +1104,10 @@ HWTEST_F(hilogtest, buff_resize_illegal_type, Function|MediumTest|Level4)
*/
HWTEST_F
(
hilogtest
,
buff_resize_illegal_type2
,
Function
|
MediumTest
|
Level4
)
{
bool
ret
=
true
;
result
=
ExecuteCmd
(
"hilog -G 2m -t 'core abc'"
);
expect
=
"buffsize operation error!
\n
"
;
EXPECT_
STREQ
(
result
.
c_str
(),
expect
.
c_str
()
);
ret
=
result
.
find
(
"Invalid log type"
)
!=
std
::
string
::
npos
;
EXPECT_
EQ
(
ret
,
true
);
ExeCmd
(
"hilog -G 1m -t all"
);
}
...
...
@@ -1313,9 +1319,10 @@ HWTEST_F(hilogtest, statistic_info_clear_init, Function|MediumTest|Level4)
*/
HWTEST_F
(
hilogtest
,
statistic_info_query_illegal
,
Function
|
MediumTest
|
Level3
)
{
bool
ret
=
true
;
result
=
ExecuteCmd
(
"hilog -s -t abc"
);
expect
=
"Invalid parameter
\n
"
;
EXPECT_
STREQ
(
result
.
c_str
(),
expect
.
c_str
()
);
ret
=
result
.
find
(
"Invalid log type"
)
!=
std
::
string
::
npos
;
EXPECT_
EQ
(
ret
,
true
);
}
/*
...
...
@@ -1325,9 +1332,10 @@ HWTEST_F(hilogtest, statistic_info_query_illegal, Function|MediumTest|Level3)
*/
HWTEST_F
(
hilogtest
,
statistic_info_clear_illegal
,
Function
|
MediumTest
|
Level4
)
{
bool
ret
=
true
;
result
=
ExecuteCmd
(
"hilog -S -t abc"
);
expect
=
"Invalid parameter
\n
"
;
EXPECT_
STREQ
(
result
.
c_str
(),
expect
.
c_str
()
);
ret
=
result
.
find
(
"Invalid log type"
)
!=
std
::
string
::
npos
;
EXPECT_
EQ
(
ret
,
true
);
}
/*
...
...
@@ -1502,9 +1510,10 @@ HWTEST_F(hilogtest, log_clear_all, Function|MediumTest|Level4)
*/
HWTEST_F
(
hilogtest
,
log_clear_illegal
,
Function
|
MediumTest
|
Level4
)
{
bool
ret
=
true
;
result
=
ExecuteCmd
(
"hilog -r -t abc"
);
expect
=
"Invalid parameter
\n
"
;
EXPECT_
STREQ
(
result
.
c_str
(),
expect
.
c_str
()
);
ret
=
result
.
find
(
"Invalid log type"
)
!=
std
::
string
::
npos
;
EXPECT_
EQ
(
ret
,
true
);
}
/*
...
...
@@ -1514,7 +1523,8 @@ HWTEST_F(hilogtest, log_clear_illegal, Function|MediumTest|Level4)
*/
HWTEST_F
(
hilogtest
,
log_clear_illegal2
,
Function
|
MediumTest
|
Level4
)
{
bool
ret
=
true
;
result
=
ExecuteCmd
(
"hilog -r -t 'abc core'"
);
expect
=
"clear log operation error!
\n
"
;
EXPECT_
STREQ
(
result
.
c_str
(),
expect
.
c_str
()
);
ret
=
result
.
find
(
"Invalid log type"
)
!=
std
::
string
::
npos
;
EXPECT_
EQ
(
ret
,
true
);
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录