Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
tp-qemu
提交
d3367af6
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,发现更多精彩内容 >>
未验证
提交
d3367af6
编写于
7月 21, 2020
作者:
Y
Yanan Fu
提交者:
GitHub
7月 21, 2020
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #2211 from YanhuiMa/boot_with_load
add timer device case
上级
51769090
8d7cc28b
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
47 addition
and
11 deletion
+47
-11
qemu/tests/cfg/timerdevice.cfg
qemu/tests/cfg/timerdevice.cfg
+23
-9
qemu/tests/timerdevice_boot.py
qemu/tests/timerdevice_boot.py
+24
-2
未找到文件。
qemu/tests/cfg/timerdevice.cfg
浏览文件 @
d3367af6
...
...
@@ -50,6 +50,7 @@
- boot_test:
no RHEL.3 RHEL.4 RHEL.5 RHEL.6
type = timerdevice_boot
start_vm = no
i386, x86_64:
rtc_drift = slew
timerdevice_drift_threshold = 3
...
...
@@ -86,22 +87,35 @@
only RHEL
only ppc64 ppc64le
timerdevice_clksource = "timebase"
variants:
- without_host_load:
- with_host_load:
login_timeout = 600
only clock_host
no clksource_tsc
reboot_immediately:
only Linux
with_boot:
repeat_nums = 6
sleep_time = 600
Linux:
timerdevice_host_load_cmd = "for (( I=0; I<%s; I++ ));"
timerdevice_host_load_cmd += " 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'"
Windows:
stress_install_from_repo = "no"
download_url_stress = 'stress/stress-1.0.4.tar.gz'
timerdevice_host_load_cmd = "--cpu %s --io 4 --vm 2 --vm-bytes 256M"
timerdevice_host_load_stop_cmd = "pkill -9 stress"
variants:
- with_boot:
- with_reboot:
timerdevice_reboot_test = yes
variants:
- without_host_load:
- with_host_load:
only Linux
login_timeout = 600
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:
only with_host_load
timerdevice_sleep_time = 3600
- tscsync:
only Linux
...
...
qemu/tests/timerdevice_boot.py
浏览文件 @
d3367af6
...
...
@@ -5,6 +5,7 @@ import re
from
avocado.utils
import
process
from
virttest
import
utils_test
from
virttest
import
utils_time
from
virttest
import
env_process
from
virttest
import
funcatexit
from
virttest
import
error_context
...
...
@@ -134,13 +135,25 @@ def run(test, params, env):
timerdevice_host_load_cmd
=
params
.
get
(
"timerdevice_host_load_cmd"
)
if
timerdevice_host_load_cmd
:
error_context
.
context
(
"Add some load on host"
,
logging
.
info
)
process
.
system
(
timerdevice_host_load_cmd
,
shell
=
True
,
ignore_bg_processes
=
True
)
host_cpu_cnt_cmd
=
params
[
"host_cpu_cnt_cmd"
]
host_cpu_cnt
=
int
(
process
.
system_output
(
host_cpu_cnt_cmd
,
shell
=
True
).
strip
())
if
params
[
"os_type"
]
==
"linux"
:
timerdevice_host_load_cmd
=
timerdevice_host_load_cmd
%
host_cpu_cnt
process
.
system
(
timerdevice_host_load_cmd
,
shell
=
True
,
ignore_bg_processes
=
True
)
else
:
timerdevice_host_load_cmd
=
timerdevice_host_load_cmd
%
int
(
host_cpu_cnt
/
2
)
stress_bg
=
utils_test
.
HostStress
(
"stress"
,
params
,
stress_args
=
timerdevice_host_load_cmd
)
stress_bg
.
load_stress_tool
()
host_load_stop_cmd
=
params
.
get
(
"timerdevice_host_load_stop_cmd"
,
"pkill -f 'do X=1'"
)
funcatexit
.
register
(
env
,
params
[
"type"
],
_system
,
host_load_stop_cmd
)
params
[
"start_vm"
]
=
"yes"
env_process
.
preprocess_vm
(
test
,
params
,
env
,
params
.
get
(
"main_vm"
))
vm
=
env
.
get_vm
(
params
[
"main_vm"
])
vm
.
verify_alive
()
...
...
@@ -169,6 +182,15 @@ def run(test, params, env):
if
params
[
"os_type"
]
==
"linux"
:
verify_timedrift
(
session
,
is_hardware
=
True
)
repeat_nums
=
params
.
get_numeric
(
"repeat_nums"
)
if
repeat_nums
:
sleep_time
=
params
[
"sleep_time"
]
for
index
in
range
(
repeat_nums
):
time
.
sleep
(
int
(
sleep_time
))
verify_timedrift
(
session
)
if
params
[
"os_type"
]
==
"linux"
:
verify_timedrift
(
session
,
is_hardware
=
True
)
if
params
.
get
(
"timerdevice_reboot_test"
)
==
"yes"
:
sleep_time
=
params
.
get
(
"timerdevice_sleep_time"
)
if
sleep_time
:
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录