Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
tp-qemu
提交
d634ab83
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,发现更多精彩内容 >>
提交
d634ab83
编写于
8月 06, 2013
作者:
Q
Qingtang Zhou
提交者:
Lucas Meneghel Rodrigues
9月 02, 2013
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
qemu.tests: Add test for timerdevice with load on host
Signed-off-by:
N
Qingtang Zhou
<
qzhou@redhat.com
>
上级
32947a39
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
26 addition
and
9 deletion
+26
-9
qemu/tests/cfg/timerdevice.cfg
qemu/tests/cfg/timerdevice.cfg
+7
-0
qemu/tests/timerdevice_boot.py
qemu/tests/timerdevice_boot.py
+19
-9
未找到文件。
qemu/tests/cfg/timerdevice.cfg
浏览文件 @
d634ab83
...
...
@@ -61,6 +61,13 @@
- with_boot:
- with_reboot:
timerdevice_reboot_test = yes
variants:
- without_host_load:
- with_host_load:
timerdevice_host_load_cmd = "for (( I=0; I<`grep processor /proc/cpuinfo"
timerdevice_host_load_cmd += " | wc -l`; I++ )); do taskset -c $I /bin/bash -c"
timerdevice_host_load_cmd += " 'for ((;;)); do X=1; done &'; done"
timerdevice_host_load_stop_cmd = "pkill -f 'do X=1'"
variants:
- reboot_immediately:
- reboot_after_sleep:
...
...
qemu/tests/timerdevice_boot.py
浏览文件 @
d634ab83
...
...
@@ -2,6 +2,7 @@ import logging, re, time
from
autotest.client.shared
import
error
from
autotest.client
import
utils
from
virttest
import
data_dir
,
storage
,
utils_disk
,
utils_test
,
env_process
from
virttest
import
funcatexit
@
error
.
context_aware
def
run_timerdevice_boot
(
test
,
params
,
env
):
...
...
@@ -9,15 +10,16 @@ def run_timerdevice_boot(test, params, env):
Timer device boot guest:
1) Sync the host system time with ntp server
2) Boot the guest with specific clock source
3) Check the clock source currently used on guest
4) Do some file operation on guest (Optional)
5) Check the system time on guest and host (Optional)
6) Check the hardware time on guest and host (Optional)
7) Sleep period of time before reboot (Optional)
8) Reboot guest (Optional)
9) Check the system time on guest and host (Optional)
10) Check the hardware time on guest and host (Optional)
2) Add some load on host (Optional)
3) Boot the guest with specific clock source
4) Check the clock source currently used on guest
5) Do some file operation on guest (Optional)
6) Check the system time on guest and host (Optional)
7) Check the hardware time on guest and host (Optional)
8) Sleep period of time before reboot (Optional)
9) Reboot guest (Optional)
10) Check the system time on guest and host (Optional)
11) Check the hardware time on guest and host (Optional)
@param test: QEMU test object.
@param params: Dictionary with test parameters.
...
...
@@ -34,6 +36,14 @@ def run_timerdevice_boot(test, params, env):
error
.
context
(
"Sync the host system time with ntp server"
,
logging
.
info
)
utils
.
system
(
"ntpdate clock.redhat.com"
)
timerdevice_host_load_cmd
=
params
.
get
(
"timerdevice_host_load_cmd"
)
if
timerdevice_host_load_cmd
:
error
.
context
(
"Add some load on host"
,
logging
.
info
)
utils
.
system
(
timerdevice_host_load_cmd
)
host_load_stop_cmd
=
params
[
"timerdevice_host_load_stop_cmd"
]
funcatexit
.
register
(
env
,
params
[
"type"
],
utils
.
system
,
host_load_stop_cmd
)
error
.
context
(
"Boot a guest with kvm-clock"
,
logging
.
info
)
vm
=
env
.
get_vm
(
params
[
"main_vm"
])
vm
.
verify_alive
()
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录