Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
da62d860
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看板
提交
da62d860
编写于
8月 25, 2021
作者:
Y
youyouyuai
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix cases
Signed-off-by:
N
youyouyuai
<
youyouyuailj@163.com
>
上级
5ea4db37
变更
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
浏览文件 @
da62d860
...
@@ -856,9 +856,10 @@ HWTEST_F(hilogtest, buff_size_all, Function|MediumTest|Level3)
...
@@ -856,9 +856,10 @@ HWTEST_F(hilogtest, buff_size_all, Function|MediumTest|Level3)
*/
*/
HWTEST_F
(
hilogtest
,
buff_size_illegal
,
Function
|
MediumTest
|
Level4
)
HWTEST_F
(
hilogtest
,
buff_size_illegal
,
Function
|
MediumTest
|
Level4
)
{
{
bool
ret
=
true
;
result
=
ExecuteCmd
(
"hilog -g -t abc"
);
result
=
ExecuteCmd
(
"hilog -g -t abc"
);
expect
=
"Invalid parameter
\n
"
;
ret
=
result
.
find
(
"Invalid log type"
)
!=
std
::
string
::
npos
;
EXPECT_
STREQ
(
result
.
c_str
(),
expect
.
c_str
()
);
EXPECT_
EQ
(
ret
,
true
);
}
}
/*
/*
...
@@ -868,9 +869,10 @@ HWTEST_F(hilogtest, buff_size_illegal, Function|MediumTest|Level4)
...
@@ -868,9 +869,10 @@ HWTEST_F(hilogtest, buff_size_illegal, Function|MediumTest|Level4)
*/
*/
HWTEST_F
(
hilogtest
,
buff_size_illegal2
,
Function
|
MediumTest
|
Level4
)
HWTEST_F
(
hilogtest
,
buff_size_illegal2
,
Function
|
MediumTest
|
Level4
)
{
{
bool
ret
=
true
;
result
=
ExecuteCmd
(
"hilog -g -t 'core abc'"
);
result
=
ExecuteCmd
(
"hilog -g -t 'core abc'"
);
expect
=
"buffsize operation error!
\n
"
;
ret
=
result
.
find
(
"Invalid log type"
)
!=
std
::
string
::
npos
;
EXPECT_
STREQ
(
result
.
c_str
(),
expect
.
c_str
()
);
EXPECT_
EQ
(
ret
,
true
);
}
}
/*
/*
...
@@ -997,9 +999,10 @@ HWTEST_F(hilogtest, buff_resize_gbyte2, Function|MediumTest|Level3)
...
@@ -997,9 +999,10 @@ HWTEST_F(hilogtest, buff_resize_gbyte2, Function|MediumTest|Level3)
*/
*/
HWTEST_F
(
hilogtest
,
buff_resize_illegal
,
Function
|
MediumTest
|
Level4
)
HWTEST_F
(
hilogtest
,
buff_resize_illegal
,
Function
|
MediumTest
|
Level4
)
{
{
bool
ret
=
true
;
result
=
ExecuteCmd
(
"hilog -G 0"
);
result
=
ExecuteCmd
(
"hilog -G 0"
);
expect
=
"core buffer resize fail
\n
app buffer resize fail
\n\n
"
;
ret
=
result
.
find
(
"Invalid buffer size"
)
!=
std
::
string
::
npos
;
EXPECT_
STREQ
(
result
.
c_str
(),
expect
.
c_str
()
);
EXPECT_
EQ
(
ret
,
true
);
}
}
/*
/*
...
@@ -1009,9 +1012,10 @@ HWTEST_F(hilogtest, buff_resize_illegal, Function|MediumTest|Level4)
...
@@ -1009,9 +1012,10 @@ HWTEST_F(hilogtest, buff_resize_illegal, Function|MediumTest|Level4)
*/
*/
HWTEST_F
(
hilogtest
,
buff_resize_illegal2
,
Function
|
MediumTest
|
Level3
)
HWTEST_F
(
hilogtest
,
buff_resize_illegal2
,
Function
|
MediumTest
|
Level3
)
{
{
bool
ret
=
true
;
result
=
ExecuteCmd
(
"hilog -G 2g"
);
result
=
ExecuteCmd
(
"hilog -G 2g"
);
expect
=
"core buffer resize fail
\n
app buffer resize fail
\n\n
"
;
ret
=
result
.
find
(
"Invalid buffer size"
)
!=
std
::
string
::
npos
;
EXPECT_
STREQ
(
result
.
c_str
(),
expect
.
c_str
()
);
EXPECT_
EQ
(
ret
,
true
);
}
}
/*
/*
...
@@ -1086,9 +1090,10 @@ HWTEST_F(hilogtest, buff_resize_all, Function|MediumTest|Level4)
...
@@ -1086,9 +1090,10 @@ HWTEST_F(hilogtest, buff_resize_all, Function|MediumTest|Level4)
*/
*/
HWTEST_F
(
hilogtest
,
buff_resize_illegal_type
,
Function
|
MediumTest
|
Level4
)
HWTEST_F
(
hilogtest
,
buff_resize_illegal_type
,
Function
|
MediumTest
|
Level4
)
{
{
bool
ret
=
true
;
result
=
ExecuteCmd
(
"hilog -G 2m -t abc"
);
result
=
ExecuteCmd
(
"hilog -G 2m -t abc"
);
expect
=
"Invalid parameter
\n
"
;
ret
=
result
.
find
(
"Invalid log type"
)
!=
std
::
string
::
npos
;
EXPECT_
STREQ
(
result
.
c_str
(),
expect
.
c_str
()
);
EXPECT_
EQ
(
ret
,
true
);
ExeCmd
(
"hilog -G 1m -t all"
);
ExeCmd
(
"hilog -G 1m -t all"
);
}
}
...
@@ -1099,9 +1104,10 @@ HWTEST_F(hilogtest, buff_resize_illegal_type, Function|MediumTest|Level4)
...
@@ -1099,9 +1104,10 @@ HWTEST_F(hilogtest, buff_resize_illegal_type, Function|MediumTest|Level4)
*/
*/
HWTEST_F
(
hilogtest
,
buff_resize_illegal_type2
,
Function
|
MediumTest
|
Level4
)
HWTEST_F
(
hilogtest
,
buff_resize_illegal_type2
,
Function
|
MediumTest
|
Level4
)
{
{
bool
ret
=
true
;
result
=
ExecuteCmd
(
"hilog -G 2m -t 'core abc'"
);
result
=
ExecuteCmd
(
"hilog -G 2m -t 'core abc'"
);
expect
=
"buffsize operation error!
\n
"
;
ret
=
result
.
find
(
"Invalid log type"
)
!=
std
::
string
::
npos
;
EXPECT_
STREQ
(
result
.
c_str
(),
expect
.
c_str
()
);
EXPECT_
EQ
(
ret
,
true
);
ExeCmd
(
"hilog -G 1m -t all"
);
ExeCmd
(
"hilog -G 1m -t all"
);
}
}
...
@@ -1313,9 +1319,10 @@ HWTEST_F(hilogtest, statistic_info_clear_init, Function|MediumTest|Level4)
...
@@ -1313,9 +1319,10 @@ HWTEST_F(hilogtest, statistic_info_clear_init, Function|MediumTest|Level4)
*/
*/
HWTEST_F
(
hilogtest
,
statistic_info_query_illegal
,
Function
|
MediumTest
|
Level3
)
HWTEST_F
(
hilogtest
,
statistic_info_query_illegal
,
Function
|
MediumTest
|
Level3
)
{
{
bool
ret
=
true
;
result
=
ExecuteCmd
(
"hilog -s -t abc"
);
result
=
ExecuteCmd
(
"hilog -s -t abc"
);
expect
=
"Invalid parameter
\n
"
;
ret
=
result
.
find
(
"Invalid log type"
)
!=
std
::
string
::
npos
;
EXPECT_
STREQ
(
result
.
c_str
(),
expect
.
c_str
()
);
EXPECT_
EQ
(
ret
,
true
);
}
}
/*
/*
...
@@ -1325,9 +1332,10 @@ HWTEST_F(hilogtest, statistic_info_query_illegal, Function|MediumTest|Level3)
...
@@ -1325,9 +1332,10 @@ HWTEST_F(hilogtest, statistic_info_query_illegal, Function|MediumTest|Level3)
*/
*/
HWTEST_F
(
hilogtest
,
statistic_info_clear_illegal
,
Function
|
MediumTest
|
Level4
)
HWTEST_F
(
hilogtest
,
statistic_info_clear_illegal
,
Function
|
MediumTest
|
Level4
)
{
{
bool
ret
=
true
;
result
=
ExecuteCmd
(
"hilog -S -t abc"
);
result
=
ExecuteCmd
(
"hilog -S -t abc"
);
expect
=
"Invalid parameter
\n
"
;
ret
=
result
.
find
(
"Invalid log type"
)
!=
std
::
string
::
npos
;
EXPECT_
STREQ
(
result
.
c_str
(),
expect
.
c_str
()
);
EXPECT_
EQ
(
ret
,
true
);
}
}
/*
/*
...
@@ -1502,9 +1510,10 @@ HWTEST_F(hilogtest, log_clear_all, Function|MediumTest|Level4)
...
@@ -1502,9 +1510,10 @@ HWTEST_F(hilogtest, log_clear_all, Function|MediumTest|Level4)
*/
*/
HWTEST_F
(
hilogtest
,
log_clear_illegal
,
Function
|
MediumTest
|
Level4
)
HWTEST_F
(
hilogtest
,
log_clear_illegal
,
Function
|
MediumTest
|
Level4
)
{
{
bool
ret
=
true
;
result
=
ExecuteCmd
(
"hilog -r -t abc"
);
result
=
ExecuteCmd
(
"hilog -r -t abc"
);
expect
=
"Invalid parameter
\n
"
;
ret
=
result
.
find
(
"Invalid log type"
)
!=
std
::
string
::
npos
;
EXPECT_
STREQ
(
result
.
c_str
(),
expect
.
c_str
()
);
EXPECT_
EQ
(
ret
,
true
);
}
}
/*
/*
...
@@ -1514,7 +1523,8 @@ HWTEST_F(hilogtest, log_clear_illegal, Function|MediumTest|Level4)
...
@@ -1514,7 +1523,8 @@ HWTEST_F(hilogtest, log_clear_illegal, Function|MediumTest|Level4)
*/
*/
HWTEST_F
(
hilogtest
,
log_clear_illegal2
,
Function
|
MediumTest
|
Level4
)
HWTEST_F
(
hilogtest
,
log_clear_illegal2
,
Function
|
MediumTest
|
Level4
)
{
{
bool
ret
=
true
;
result
=
ExecuteCmd
(
"hilog -r -t 'abc core'"
);
result
=
ExecuteCmd
(
"hilog -r -t 'abc core'"
);
expect
=
"clear log operation error!
\n
"
;
ret
=
result
.
find
(
"Invalid log type"
)
!=
std
::
string
::
npos
;
EXPECT_
STREQ
(
result
.
c_str
(),
expect
.
c_str
()
);
EXPECT_
EQ
(
ret
,
true
);
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录