Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
tp-qemu
提交
090ecf6c
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,发现更多精彩内容 >>
未验证
提交
090ecf6c
编写于
11月 29, 2018
作者:
Q
Qianqian Zhu
提交者:
GitHub
11月 29, 2018
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #1583 from yanan-fu/set_link
set_link: Drop cases "status_off" as it has been deprecated
上级
a7bef701
01d56d09
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
11 addition
and
19 deletion
+11
-19
qemu/tests/cfg/set_link.cfg
qemu/tests/cfg/set_link.cfg
+0
-5
qemu/tests/set_link.py
qemu/tests/set_link.py
+11
-14
未找到文件。
qemu/tests/cfg/set_link.cfg
浏览文件 @
090ecf6c
...
...
@@ -16,11 +16,6 @@
- status_on:
only virtio_net
nic_extra_params = ",status=on"
- status_off:
only virtio_net
nic_extra_params = ",status=off"
down-status = "unknown"
up-status = "unknown"
variants:
- reboot_shell:
reboot_method = shell
...
...
qemu/tests/set_link.py
浏览文件 @
090ecf6c
...
...
@@ -177,21 +177,22 @@ def run(test, params, env):
finally
:
session
.
close
()
def
set_link_test
(
linkid
,
link_up
,
expect_status
,
operstate_always_up
=
False
,
change_queues
=
False
):
def
set_link_test
(
linkid
,
link_up
,
change_queues
,
operstate_always_up
=
False
):
"""
Issue set_link commands and test its function
:param linkid: id of netdev or devices to be tested
:param link_up: flag linkid is up or down
:param expect_status : expect guest operstate status"
:param change_queues: whether run change mq queues, only effect on
linux guest with mq nic.
:param operstate_always_up: when linkid is netdev id, guest interface
operstate will never change,
need set it to True.
:param change_queues: whether run change mq queues, only effect on
linux guest with mq nic.
"""
if
link_up
:
expect_status
=
"up"
else
:
expect_status
=
"down"
vm
.
set_link
(
linkid
,
up
=
link_up
)
time
.
sleep
(
1
)
error_context
.
context
(
"Check guest interface operstate"
,
logging
.
info
)
...
...
@@ -249,27 +250,23 @@ def run(test, params, env):
session
.
close
()
expect_down_status
=
params
.
get
(
"down-status"
,
"down"
)
expect_up_status
=
params
.
get
(
"up-status"
,
"up"
)
operstate_always_up
=
params
.
get
(
"operstate_always_up"
,
"no"
)
==
"yes"
error_context
.
context
(
"Disable guest netdev link '%s' by set_link"
%
netdev_id
,
logging
.
info
)
set_link_test
(
netdev_id
,
False
,
expect_down_status
,
operstate_always_up
,
change_queues
)
set_link_test
(
netdev_id
,
False
,
change_queues
,
operstate_always_up
)
error_context
.
context
(
"Re-enable guest netdev link '%s' by set_link"
%
netdev_id
,
logging
.
info
)
set_link_test
(
netdev_id
,
True
,
expect_up_status
,
operstate_always_up
,
change_queues
)
set_link_test
(
netdev_id
,
True
,
change_queues
,
operstate_always_up
)
error_context
.
context
(
"Disable guest nic device '%s' by set_link"
%
device_id
,
logging
.
info
)
set_link_test
(
device_id
,
False
,
expect_down_status
,
False
,
change_queues
)
set_link_test
(
device_id
,
False
,
change_queues
)
error_context
.
context
(
"Re-enable guest nic device '%s' by set_link"
%
device_id
,
logging
.
info
)
set_link_test
(
device_id
,
True
,
expect_up_status
,
False
,
change_queues
)
set_link_test
(
device_id
,
True
,
change_queues
)
error_context
.
context
(
"Do file transfer after setlink on and off"
,
logging
.
info
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录