Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
tp-qemu
提交
e9d7db15
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,发现更多精彩内容 >>
提交
e9d7db15
编写于
7月 21, 2016
作者:
S
Suqin Huang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add more scenerios to win virtio driver test
上级
9568e469
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
50 addition
and
49 deletion
+50
-49
qemu/tests/cfg/win_virtio_driver_update_test.cfg
qemu/tests/cfg/win_virtio_driver_update_test.cfg
+32
-10
qemu/tests/win_virtio_driver_update_test.py
qemu/tests/win_virtio_driver_update_test.py
+18
-39
未找到文件。
qemu/tests/cfg/win_virtio_driver_update_test.cfg
浏览文件 @
e9d7db15
- win_virtio_driver_update_test:
type =
win_virtio_driver_update_test
type =
driver_in_use
only Windows
monitor_type = qmp
monitors = qmp1
...
...
@@ -12,10 +12,28 @@
need_enable_verifier = yes
need_clear_verifier = yes
driver_install_timeout = 600
suppress_exception = no
tmp_folder = C:\tmp
guest_alias = "Win7-32:w7\x86,Win7-64:w7\amd64,Win8-32:w8\x86,Win8-64:w8\amd64,Win8.1-32:w8.1\x86,Win8-64.1:w8.1\amd64,Win10-32:w10\x86,Win10-64:w10\amd64,Win2008-32:2k8\x86,Win2008-64:2k8\amd64,Win2012-64:2k12\amd64,Win2012-64r2:2k12R2\amd64"
driver_install_cmd = "python WIN_UTILS:\win_driver_install.py %s %s %s %s %s"
show_file_ext_cmd = "reg add HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced /v HideFileExt /t REG_DWORD /d 0 /f"
read_rng_cmd = "X:\random_%PROCESSOR_ARCHITECTURE%.exe"
sub_test = win_virtio_driver_update_test
variants:
- uninstall_install:
need_uninstall = yes
- downgrade_upgrade:
need_uninstall = no
cdrom_virtio_downgrade = isos/windows/virtio-win-downgrade.iso
variants:
- before_bg_test:
run_bg_flag = "before_bg_test"
- during_bg_test:
run_bg_flag = "during_bg_test"
read_rng_cmd = for /l %i in (1, 1, 1000) do "X:\random_%PROCESSOR_ARCHITECTURE%.exe"
suppress_exception = yes
- after_bg_test:
run_bg_flag = "after_bg_test"
variants:
- with_balloon:
driver_name = balloon
...
...
@@ -25,7 +43,7 @@
driver_name = balloon
device_name = "VirtIO Balloon Driver"
driver_id_pattern = "(.*?):.*?VirtIO Balloon Driver"
sub_test
= balloon_check
run_bgstress
= balloon_check
virtio_balloon_pause = 10.0
free_mem_cmd = cat /proc/meminfo |grep MemFree
ratio = 0.5
...
...
@@ -40,7 +58,7 @@
nic_model_nic2 = rtl8139
device_name = "Red Hat VirtIO Ethernet Adapter"
hostpassword = redhat
sub_test
= netperf_stress
run_bgstress
= netperf_stress
netperf_link = netperf-2.6.0.tar.bz2
server_path = /var/tmp/
client_path = /var/tmp/
...
...
@@ -55,7 +73,7 @@
- with_viostor:
driver_name = viostor
device_name = "Red Hat VirtIO SCSI controller"
sub_test
= iozone_windows
run_bgstress
= iozone_windows
drive_format_image1 = ide
images += " stg"
image_name_stg = "images/storage"
...
...
@@ -73,6 +91,7 @@
- with_vioscsi:
driver_name = vioscsi
device_name = "Red Hat VirtIO SCSI pass-through controller"
run_bgstress = iozone_windows
drive_format_image1 = ide
images += " stg"
image_name_stg = "images/storage"
...
...
@@ -87,9 +106,12 @@
iozone_cmd = "WIN_UTILS:\Iozone\iozone.exe -azR -r 64k -n 1G -g 2G -M -i 0 -i 1 -b iozone.xls -f ${disk_letter}:\testfile"
iozone_timeout = 7200
wait_bg_time = 180
variants:
- uninstall_install:
need_uninstall = yes
- downgrade_upgrade:
need_uninstall = no
cdrom_virtio_downgrade = isos/windows/virtio-win-downgrade.iso
- with_viorng:
no no_virtio_rng
driver_name = viorng
device_name = "VirtIO RNG Device"
run_bgstress = rng_bat
target_process = random\w*.exe
session_cmd_timeout = 240
rng_data_rex = "0x\w"
driver_id_pattern = "(.*?):.*?VirtIO RNG Device"
qemu/tests/win_virtio_driver_update_test.py
浏览文件 @
e9d7db15
import
logging
from
virttest
import
utils_test
from
virttest
import
error_context
from
qemu.tests
import
single_driver_install
...
...
@@ -24,47 +23,27 @@ def run(test, params, env):
:param params: Dictionary with the test parameters
:param env: Dictionary with test environment
"""
driver
=
params
[
"driver_name"
]
timeout
=
int
(
params
.
get
(
"login_timeout"
,
360
))
sub_test
=
params
.
get
(
"sub_test"
)
cdrom_virtio_downgrade
=
params
.
get
(
"cdrom_virtio_downgrade"
)
vm
=
env
.
get_vm
(
params
[
"main_vm"
])
vm
.
verify_alive
()
error_context
.
context
(
"Boot guest with %s device"
%
driver
,
logging
.
info
)
session
=
vm
.
wait_for_login
(
timeout
=
timeout
)
if
params
.
get
(
"need_enable_verifier"
,
"yes"
)
==
"yes"
:
error_context
.
context
(
"Enable %s driver verifier in guest"
%
driver
,
logging
.
info
)
session
=
utils_test
.
qemu
.
setup_win_driver_verifier
(
session
,
driver
,
vm
,
timeout
)
try
:
if
params
.
get
(
"need_uninstall"
)
==
"yes"
:
error_context
.
context
(
"Uninstall virtio driver"
,
logging
.
info
)
single_driver_install
.
run
(
test
,
params
,
env
)
# Need install driver after uninstallation.
params
[
"need_uninstall"
]
=
False
error_context
.
context
(
"Install virtio driver"
,
logging
.
info
)
else
:
error_context
.
context
(
"Downgrade virtio driver"
,
logging
.
info
)
new_params
=
params
.
copy
()
new_params
[
"cdrom_virtio"
]
=
cdrom_virtio_downgrade
vm
.
create
(
params
=
new_params
)
vm
.
verify_alive
()
single_driver_install
.
run
(
test
,
new_params
,
env
)
if
sub_test
:
error_context
.
context
(
"Run sub test %s"
%
sub_test
,
logging
.
info
)
utils_test
.
run_virt_sub_test
(
test
,
new_params
,
env
,
sub_test
)
error_context
.
context
(
"Upgrade virtio driver to original"
,
logging
.
info
)
vm
.
create
(
params
=
params
)
vm
.
verify_alive
()
if
params
.
get
(
"need_uninstall"
)
==
"yes"
:
error_context
.
context
(
"Uninstall virtio driver"
,
logging
.
info
)
single_driver_install
.
run
(
test
,
params
,
env
)
finally
:
if
params
.
get
(
"need_clear_verifier"
,
"yes"
)
==
"yes"
:
error_context
.
context
(
"Clear %s driver verifier in guest"
%
driver
,
logging
.
info
)
session
=
utils_test
.
qemu
.
clear_win_driver_verifier
(
session
,
vm
,
timeout
)
vm
.
destroy
()
# Need install driver after uninstallation.
params
[
"need_uninstall"
]
=
False
error_context
.
context
(
"Install virtio driver"
,
logging
.
info
)
else
:
error_context
.
context
(
"Downgrade virtio driver"
,
logging
.
info
)
new_params
=
params
.
copy
()
new_params
[
"cdrom_virtio"
]
=
cdrom_virtio_downgrade
vm
.
create
(
params
=
new_params
)
vm
.
verify_alive
()
single_driver_install
.
run
(
test
,
new_params
,
env
)
error_context
.
context
(
"Upgrade virtio driver to original"
,
logging
.
info
)
vm
.
create
(
params
=
params
)
vm
.
verify_alive
()
single_driver_install
.
run
(
test
,
params
,
env
)
vm
.
destroy
()
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录