Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
tp-qemu
提交
bcd2169f
T
tp-qemu
项目概览
openeuler
/
tp-qemu
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
tp-qemu
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
bcd2169f
编写于
3月 06, 2020
作者:
X
Xueqiang Wei
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add new case: uefishell.check_memory_map
Signed-off-by:
N
Xueqiang Wei
<
xuwei@redhat.com
>
上级
491c88ab
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
31 addition
and
1 deletion
+31
-1
qemu/tests/cfg/uefishell.cfg
qemu/tests/cfg/uefishell.cfg
+8
-0
qemu/tests/uefishell.py
qemu/tests/uefishell.py
+23
-1
未找到文件。
qemu/tests/cfg/uefishell.cfg
浏览文件 @
bcd2169f
...
...
@@ -18,6 +18,14 @@
command_connect = "connect -r"
command_oprom = "dh -d -v -p SimpleNetwork"
check_result_oprom = "Controller Name.*:.*iPXE"
- check_memory_map:
test_scenarios = "connect memmap"
command_connect = "connect -r"
command_memmap = "memmap"
attribute_value = "800000000000000F"
rt_code_lines = "RT_Code\s+\w+-\w+\s+\w+\s+(\w+)\s+"
adjacent_rt_code_lines = "RT_Code\s+\w+-\w+\s+\w+\s+\w+\s+RT_Code"
memmap_output_handler = "handle_memory_map"
- check_network:
bootindex_nic1 = 1
time_interval = 3
...
...
qemu/tests/uefishell.py
浏览文件 @
bcd2169f
...
...
@@ -200,6 +200,23 @@ def run(test, params, env):
params
,
"ipv6"
,
True
).
split
(
"%"
)[
0
]
return
" "
.
join
([
src_ipv6
[
0
],
target_ipv6
])
def
handle_memory_map
(
output
):
"""
search all RT_Code lines from output, each line ends
with 800000000000000F;
search two adjacent RT_Code lines, the result should be None
"""
attribute_values
=
re
.
findall
(
params
[
"rt_code_lines"
],
output
[
0
],
re
.
M
)
for
value
in
attribute_values
:
if
params
[
"attribute_value"
]
!=
value
:
test
.
fail
(
"The last column should be '%s' for all "
"RT_Code entries. The actual value is '%s'"
%
(
params
[
"attribute_value"
],
value
))
if
re
.
search
(
params
[
"adjacent_rt_code_lines"
],
output
[
0
],
re
.
M
):
test
.
fail
(
"Found two adjacent RT_Code lines in command output. "
"The range of 'RT_Code' should be covered by just one"
" entry. The command output is %s"
%
output
[
0
])
uefishell_test
=
UEFIShellTest
(
test
,
params
,
env
)
time_interval
=
float
(
params
[
"time_interval"
])
under_fs0
=
params
.
get
(
"under_fs0"
,
"yes"
)
...
...
@@ -211,6 +228,11 @@ def run(test, params, env):
func_name
=
params
[
"command_%s_%s"
%
(
scenario
,
"args"
)]
command
+=
eval
(
func_name
)
check_result
=
params
.
get
(
"check_result_%s"
%
scenario
)
uefishell_test
.
send_command
(
command
,
check_result
,
time_interval
)
output
=
uefishell_test
.
send_command
(
command
,
check_result
,
time_interval
)
if
params
.
get
(
"%s_output_handler"
%
scenario
):
func_name
=
params
[
"%s_output_handler"
%
scenario
]
eval
(
func_name
)(
output
)
uefishell_test
.
post_test
()
uefishell_test
.
clean
()
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录