Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
tp-qemu
提交
c208f8c0
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,发现更多精彩内容 >>
未验证
提交
c208f8c0
编写于
10月 19, 2018
作者:
Q
Qianqian Zhu
提交者:
GitHub
10月 19, 2018
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #1477 from sitoliu/timerdevice_fix
timerdevice_clock_drift_with_sleep: fix error
上级
ddda4d0b
c18ded3c
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
25 addition
and
19 deletion
+25
-19
qemu/tests/cfg/timerdevice.cfg
qemu/tests/cfg/timerdevice.cfg
+19
-13
qemu/tests/timerdevice_clock_drift_with_sleep.py
qemu/tests/timerdevice_clock_drift_with_sleep.py
+6
-6
未找到文件。
qemu/tests/cfg/timerdevice.cfg
浏览文件 @
c208f8c0
- timerdevice:
no Host_RHEL.m5
,
Host_RHEL.m6
no Host_RHEL.m5 Host_RHEL.m6
restart_vm = yes
host_cpu_cnt_cmd = "cat /proc/cpuinfo | grep "physical id" | wc -l"
variants:
- tscwrite:
only Fedora.19
,
RHEL.7
only Fedora.19 RHEL.7
type = timerdevice_tscwrite
msr_tools_install_cmd = "yum install -y msr-tools"
msr_tools_cmd = "a=$(rdmsr -d 0x00000010); echo -e ibase=16\\n $a | tail -n 1 | while read n; do wrmsr 0x00000010 $(($n+100000000000)); echo $n; done"
...
...
@@ -13,21 +14,25 @@
type = timerdevice_clock_drift_with_sleep
rtc_base = utc
rtc_clock = host
rtc_drift = slew
i386, x86_64:
rtc_drift = slew
ntp_sync_cmd = "(systemctl stop chronyd || service ntpdate stop)"
ntp_sync_cmd += " && chronyd -q 'server clock.redhat.com iburst'"
- clock_drift_with_ntp:
only Fedora.19
,
RHEL.7
only Fedora.19 RHEL.7
type = timerdevice_clock_drift_with_ntp
host_cpu_cnt_cmd = "cat /proc/cpuinfo | grep "physical id" | wc -l"
test_run_timeout = 7200
- change_guest_clksource:
only RHEL
type = timerdevice_change_guest_clksource
rtc_base = utc
rtc_clock = host
rtc_drift = slew
i386, x86_64:
rtc_drift = slew
- boot_test:
type = timerdevice_boot
rtc_drift = slew
i386, x86_64:
rtc_drift = slew
timerdevice_drift_threshold = 3
variants:
- clock_host:
...
...
@@ -46,7 +51,7 @@
only Windows
timerdevice_clksource = ""
- clksource_kvm-clock:
only Fedora.19
,
RHEL
only Fedora.19 RHEL
timerdevice_clksource = "kvm-clock"
- clksource_tsc:
# Fedora guest can't bootup without '-kvmclock' option.
...
...
@@ -54,7 +59,7 @@
only RHEL
timerdevice_clksource = "tsc"
- clksource_pit:
only RHEL.3
, RHEL.4,
RHEL.5
only RHEL.3
RHEL.4
RHEL.5
timerdevice_clksource = "pit"
timerdevice_file_operation = "yes"
variants:
...
...
@@ -73,7 +78,7 @@
- reboot_after_sleep:
timerdevice_sleep_time = 3600
- tscsync:
only Fedora.19
,
RHEL.7
only Fedora.19 RHEL.7
variants:
- change_host_clksource:
type = timerdevice_tscsync_change_host_clksource
...
...
@@ -90,11 +95,12 @@
vcpu_socket = 2
- newer_msrs_support_check:
only Linux
no Host_RHEL.m5
,
Host_RHEL.m6.u0
no RHEL.6.0
, RHEL.6.1, RHEL.6.2,
RHEL.6.3
no Host_RHEL.m5 Host_RHEL.m6.u0
no RHEL.6.0
RHEL.6.1 RHEL.6.2
RHEL.6.3
type = timerdevice_kvmclock_newer_msrs_support
rtc_base = utc
rtc_clock = host
rtc_drift = slew
i386, x86_64:
rtc_drift = slew
msrs = "4b564d01 4b564d00"
msrs_catch_re = "kvm-clock: Using msrs (\w+) and (\w+)"
qemu/tests/timerdevice_clock_drift_with_sleep.py
浏览文件 @
c208f8c0
...
...
@@ -37,15 +37,16 @@ def run(test, params, env):
output
=
session
.
cmd_output
(
get_time_cmd
,
timeout
=
timeout
)
times_list
=
output
.
splitlines
()[
1
:]
times_list
=
[
_
for
_
in
times_list
if
_
>
10.0
or
_
<
11.0
]
times_list
=
[
_
for
_
in
times_list
if
float
(
_
)
<
10.0
or
float
(
_
)
>
11.0
]
if
times_list
:
test
.
fail
(
"Unexpected time drift found: Detail: '%s'"
%
output
)
test
.
fail
(
"Unexpected time drift found: Detail: '%s'
\n
timeslist: %s"
%
(
output
,
times_list
))
error_context
.
context
(
"Sync the host system time with ntp server"
,
logging
.
info
)
process
.
system
(
"yum install -y ntpdate; ntpdate clock.redhat.com"
,
shell
=
True
)
ntp_sync_cmd
=
params
.
get
(
"ntp_sync_cmd"
)
process
.
system
(
ntp_sync_cmd
,
shell
=
True
)
error_context
.
context
(
"Boot the guest"
,
logging
.
info
)
vm
=
env
.
get_vm
(
params
[
"main_vm"
])
...
...
@@ -104,8 +105,7 @@ def run(test, params, env):
session
.
cmd_status_output
(
cmd
)
error_context
.
context
(
"Sync time from guest to ntpserver"
,
logging
.
info
)
session
.
cmd
(
"yum install -y ntpdate; ntpdate clock.redhat.com"
,
timeout
=
timeout
)
session
.
cmd
(
ntp_sync_cmd
,
timeout
=
timeout
)
error_context
.
context
(
"Sleep a while and check the time drift on guest"
" (without any pinned vcpu)"
,
logging
.
info
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录