Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
tp-qemu
提交
57a045ef
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,发现更多精彩内容 >>
提交
57a045ef
编写于
7月 27, 2016
作者:
S
Suqin Huang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add viorng_in_use test scenerios
上级
c894a989
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
65 addition
and
38 deletion
+65
-38
qemu/tests/cfg/viorng_in_use.cfg
qemu/tests/cfg/viorng_in_use.cfg
+39
-0
qemu/tests/driver_in_use.py
qemu/tests/driver_in_use.py
+24
-29
qemu/tests/rng_bat.py
qemu/tests/rng_bat.py
+2
-9
未找到文件。
qemu/tests/cfg/viorng_in_use.cfg
0 → 100644
浏览文件 @
57a045ef
- viorng_in_use:
type = driver_in_use
start_vm = yes
kill_vm_on_error = yes
check_guest_bsod = yes
login_timeout = 240
suppress_exception = no
run_bgstress = rng_bat
session_cmd_timeout = 240
read_rng_cmd = for /l %i in (1, 1, 1000) do "X:\random_%PROCESSOR_ARCHITECTURE%.exe"
rng_data_rex = "0x\w"
driver_name = "viorng"
cdrom_cd1 = isos/windows/winutils.iso
no no_virtio_rng
only Windows
variants:
- before_bg_test:
run_bg_flag = "before_bg_test"
- during_bg_test:
suppress_exception = yes
run_bg_flag = "during_bg_test"
target_process = random\w*.exe
- after_bg_test:
run_bg_flag = "after_bg_test"
variants:
- with_stop_continue:
suppress_exception = no
sub_test = stop_continue
- with_shutdown:
sub_test = shutdown
shutdown_method = shell
- with_reboot:
sub_test = boot
reboot_count = 1
reboot_method = shell
- with_system_reset:
sub_test = boot
reboot_method = system_reset
sleep_before_reset = 20
qemu/tests/driver_in_use.py
浏览文件 @
57a045ef
...
...
@@ -31,11 +31,11 @@ def run(test, params, env):
else return False
"""
session
=
vm
.
wait_for_login
()
list_cmd
=
"wmic process
where name='%s' list"
%
target_process
list_cmd
=
"wmic process
get name"
output
=
session
.
cmd_output_safe
(
list_cmd
,
timeout
=
60
)
check_reg
=
re
.
compile
(
r
"%s"
%
target_process
,
re
.
I
|
re
.
M
)
process
=
re
.
findall
(
target_process
,
output
,
re
.
M
|
re
.
I
)
session
.
close
()
return
bool
(
check_reg
.
findall
(
output
)
)
return
bool
(
process
)
def
run_bg_stress_test
(
bg_stress_test
):
"""
...
...
@@ -59,7 +59,7 @@ def run(test, params, env):
{
"sub_type"
:
bg_stress_test
})
stress_thread
.
start
()
if
not
utils_misc
.
wait_for
(
lambda
:
check_bg_running
(
target_process
),
120
,
0
,
5
):
120
,
0
,
1
):
raise
exceptions
.
TestFail
(
"Backgroud test %s is not "
"alive!"
%
bg_stress_test
)
if
params
.
get
(
"set_bg_stress_flag"
,
"no"
)
==
"yes"
:
...
...
@@ -97,28 +97,23 @@ def run(test, params, env):
error_context
.
context
(
"Run sub test %s %s"
%
(
sub_type
,
run_bg_flag
),
logging
.
info
)
try
:
if
run_bg_flag
==
"before_bg_test"
:
run_subtest
(
sub_type
)
if
vm
.
is_dead
():
vm
.
create
(
params
=
params
)
run_subtest
(
bg_stress_test
)
elif
run_bg_flag
==
"during_bg_test"
:
stress_thread
=
run_bg_stress_test
(
bg_stress_test
)
stop_time
=
time
.
time
()
+
wait_time
while
time
.
time
()
<
stop_time
:
if
env
[
"bg_status"
]
==
1
:
run_subtest
(
sub_type
)
break
if
stress_thread
:
stress_thread
.
join
(
timeout
=
timeout
,
suppress_exception
=
suppress_exception
)
elif
run_bg_flag
==
"after_bg_test"
:
run_subtest
(
bg_stress_test
)
if
vm
.
is_dead
():
vm
.
create
(
params
=
params
)
run_subtest
(
sub_type
)
finally
:
session
.
close
()
utils_test
.
qemu
.
clear_win_driver_verifier
(
driver
,
vm
,
timeout
)
if
run_bg_flag
==
"before_bg_test"
:
run_subtest
(
sub_type
)
if
vm
.
is_dead
():
vm
.
create
(
params
=
params
)
run_subtest
(
bg_stress_test
)
elif
run_bg_flag
==
"during_bg_test"
:
stress_thread
=
run_bg_stress_test
(
bg_stress_test
)
stop_time
=
time
.
time
()
+
wait_time
while
time
.
time
()
<
stop_time
:
if
env
[
"bg_status"
]
==
1
:
run_subtest
(
sub_type
)
break
if
stress_thread
:
stress_thread
.
join
(
timeout
=
timeout
,
suppress_exception
=
suppress_exception
)
elif
run_bg_flag
==
"after_bg_test"
:
run_subtest
(
bg_stress_test
)
if
vm
.
is_dead
():
vm
.
create
(
params
=
params
)
run_subtest
(
sub_type
)
qemu/tests/rng_bat.py
浏览文件 @
57a045ef
...
...
@@ -5,7 +5,6 @@ import aexpect
from
virttest
import
utils_misc
from
virttest
import
error_context
from
virttest
import
utils_test
from
virttest
import
funcatexit
from
avocado.core
import
exceptions
from
avocado.utils
import
process
...
...
@@ -68,14 +67,8 @@ def run(test, params, env):
raise
exceptions
.
TestFail
(
msg
)
if
params
[
"os_type"
]
==
"windows"
:
try
:
utils_test
.
qemu
.
setup_win_driver_verifier
(
driver_name
,
vm
,
timeout
)
funcatexit
.
register
(
env
,
params
.
get
(
"type"
),
utils_test
.
qemu
.
clear_win_driver_verifier
,
driver_name
,
vm
,
timeout
)
except
Exception
,
e
:
raise
exceptions
.
TestFail
(
e
)
utils_test
.
qemu
.
setup_win_driver_verifier
(
driver_name
,
vm
,
timeout
)
else
:
error_context
.
context
(
"verify virtio-rng device driver"
,
logging
.
info
)
session
=
vm
.
wait_for_login
(
timeout
=
timeout
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录