Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
tp-qemu
提交
6c7a9d81
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,发现更多精彩内容 >>
未验证
提交
6c7a9d81
编写于
2月 12, 2018
作者:
X
Xu Han
提交者:
GitHub
2月 12, 2018
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #1222 from peixiu/bug1520254
Use the fio multiple device function to replace multiple thread
上级
97c988aa
7642d0d8
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
18 addition
and
30 deletion
+18
-30
qemu/tests/cfg/fio_windows.cfg
qemu/tests/cfg/fio_windows.cfg
+4
-4
qemu/tests/fio_windows.py
qemu/tests/fio_windows.py
+14
-26
未找到文件。
qemu/tests/cfg/fio_windows.cfg
浏览文件 @
6c7a9d81
...
@@ -8,8 +8,8 @@
...
@@ -8,8 +8,8 @@
force_create_image_disk1 = yes
force_create_image_disk1 = yes
disk_index = 1
disk_index = 1
disk_letter = I
disk_letter = I
fio_file_name = "C\:\\fio_system_disk_test
I\:\\fio_data_disk_test"
fio_file_name = "C\:\\fio_system_disk_test
:
I\:\\fio_data_disk_test"
fio_log_file = "C:\fio_log
_sys.txt C:\fio_log_data
.txt"
fio_log_file = "C:\fio_log.txt"
cmd_timeout = 300
cmd_timeout = 300
i386, i686:
i386, i686:
install_path = "C:\Program Files\fio"
install_path = "C:\Program Files\fio"
...
@@ -19,6 +19,6 @@
...
@@ -19,6 +19,6 @@
install_cmd = 'msiexec /a DRIVE:\fio-x64.msi /qn TARGETDIR="${install_path}"'
install_cmd = 'msiexec /a DRIVE:\fio-x64.msi /qn TARGETDIR="${install_path}"'
#config_cmd = 'setx -m path "%PATH%;${install_path}\fio;"'
#config_cmd = 'setx -m path "%PATH%;${install_path}\fio;"'
fio_cmd = '"${install_path}\fio\fio.exe" --rw=randrw --bs=4k --iodepth=4 --direct=1'
fio_cmd = '"${install_path}\fio\fio.exe" --rw=randrw --bs=4k --iodepth=4 --direct=1'
fio_cmd += ' --filename=
%s --name=fiotest_%s
--ioengine=windowsaio --thread --group_reporting'
fio_cmd += ' --filename=
${fio_file_name} --name=fiotest
--ioengine=windowsaio --thread --group_reporting'
fio_cmd += ' --numjobs=4 --size=1G --runtime=${cmd_timeout} >
%s
'
fio_cmd += ' --numjobs=4 --size=1G --runtime=${cmd_timeout} >
${fio_log_file}
'
qemu/tests/fio_windows.py
浏览文件 @
6c7a9d81
...
@@ -21,10 +21,8 @@ def run(test, params, env):
...
@@ -21,10 +21,8 @@ def run(test, params, env):
"""
"""
install_path
=
params
[
"install_path"
].
rstrip
(
"
\\
"
)
install_path
=
params
[
"install_path"
].
rstrip
(
"
\\
"
)
fio_log_file
=
params
.
objects
(
"fio_log_file"
)
fio_log_file
=
params
.
get
(
"fio_log_file"
)
fio_file_name
=
params
.
objects
(
"fio_file_name"
)
fio_cmd
=
params
.
get
(
"fio_cmd"
)
fio_cmd_sys
=
params
.
get
(
"fio_cmd"
)
%
(
fio_file_name
[
0
],
"sys"
,
fio_log_file
[
0
])
fio_cmd_data
=
params
.
get
(
"fio_cmd"
)
%
(
fio_file_name
[
1
],
"data"
,
fio_log_file
[
1
])
timeout
=
float
(
params
.
get
(
"login_timeout"
,
360
))
timeout
=
float
(
params
.
get
(
"login_timeout"
,
360
))
cmd_timeout
=
int
(
params
.
get
(
"cmd_timeout"
,
"360"
))
cmd_timeout
=
int
(
params
.
get
(
"cmd_timeout"
,
"360"
))
check_installed_cmd
=
'dir "%s"|findstr /I fio'
%
install_path
check_installed_cmd
=
'dir "%s"|findstr /I fio'
%
install_path
...
@@ -33,45 +31,35 @@ def run(test, params, env):
...
@@ -33,45 +31,35 @@ def run(test, params, env):
vm
=
env
.
get_vm
(
params
[
"main_vm"
])
vm
=
env
.
get_vm
(
params
[
"main_vm"
])
vm
.
verify_alive
()
vm
.
verify_alive
()
session_sys
=
vm
.
wait_for_login
(
timeout
=
timeout
)
session
=
vm
.
wait_for_login
(
timeout
=
timeout
)
session_data
=
vm
.
wait_for_login
(
timeout
=
timeout
)
error_context
.
context
(
"Format disk"
,
logging
.
info
)
error_context
.
context
(
"Format disk"
,
logging
.
info
)
utils_misc
.
format_windows_disk
(
session
_sys
,
params
[
"disk_index"
],
utils_misc
.
format_windows_disk
(
session
,
params
[
"disk_index"
],
mountpoint
=
params
[
"disk_letter"
])
mountpoint
=
params
[
"disk_letter"
])
try
:
try
:
installed
=
session
_sys
.
cmd_status
(
check_installed_cmd
)
==
0
installed
=
session
.
cmd_status
(
check_installed_cmd
)
==
0
if
not
installed
:
if
not
installed
:
dst
=
r
"%s:\\"
%
utils_misc
.
get_winutils_vol
(
session
_sys
)
dst
=
r
"%s:\\"
%
utils_misc
.
get_winutils_vol
(
session
)
error_context
.
context
(
"Install fio in guest"
,
logging
.
info
)
error_context
.
context
(
"Install fio in guest"
,
logging
.
info
)
install_cmd
=
params
[
"install_cmd"
]
install_cmd
=
params
[
"install_cmd"
]
install_cmd
=
re
.
sub
(
r
"DRIVE:\\+"
,
dst
,
install_cmd
)
install_cmd
=
re
.
sub
(
r
"DRIVE:\\+"
,
dst
,
install_cmd
)
session
_sys
.
cmd
(
install_cmd
,
timeout
=
180
)
session
.
cmd
(
install_cmd
,
timeout
=
180
)
time
.
sleep
(
30
)
time
.
sleep
(
30
)
config_cmd
=
params
.
get
(
"config_cmd"
)
config_cmd
=
params
.
get
(
"config_cmd"
)
if
config_cmd
:
if
config_cmd
:
session
_sys
.
cmd
(
config_cmd
)
session
.
cmd
(
config_cmd
)
error_context
.
context
(
"Start fio in guest."
,
logging
.
info
)
error_context
.
context
(
"Start fio in guest."
,
logging
.
info
)
# FIXME:Here use the timeout=(cmd_timeout*2)
status
,
output
=
session
.
cmd_status_output
(
fio_cmd
,
timeout
=
(
cmd_timeout
*
2
))
# Will determine a better specific calculation later
if
status
:
fio_thread_data
=
utils_misc
.
InterruptedThread
(
session_data
.
cmd_status_output
,
test
.
error
(
"Failed to run fio, output: %s"
%
output
)
(
fio_cmd_data
,
(
cmd_timeout
*
2
)))
fio_thread_data
.
start
()
status_sys
,
output_sys
=
session_sys
.
cmd_status_output
(
fio_cmd_sys
,
timeout
=
(
cmd_timeout
*
2
))
status_data
,
output_data
=
fio_thread_data
.
join
()
if
status_sys
or
status_data
:
test
.
error
(
"Failed to run fio, output: %s
\n
%s"
%
(
output_sys
,
output_data
))
finally
:
finally
:
error_context
.
context
(
"Copy fio log from guest to host."
,
logging
.
info
)
error_context
.
context
(
"Copy fio log from guest to host."
,
logging
.
info
)
try
:
try
:
vm
.
copy_files_from
(
fio_log_file
[
0
],
test
.
resultsdir
)
vm
.
copy_files_from
(
fio_log_file
,
test
.
resultsdir
)
vm
.
copy_files_from
(
fio_log_file
[
1
],
test
.
resultsdir
)
except
Exception
,
err
:
except
Exception
,
err
:
logging
.
warn
(
"Log file copy failed: %s"
%
err
)
logging
.
warn
(
"Log file copy failed: %s"
%
err
)
session_data
.
close
()
if
session
:
if
session_sys
:
session
.
close
()
session_sys
.
close
()
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录