提交 57c20970 编写于 作者: X Xiaoling Gao

qemu_guest_agent: can't be offline for the first vcpu in linux guest

For guest-get-vcpus cmd,when logical-id is 0,can-offline value
should be false.
Signed-off-by: NXiaoling Gao <xiagao@redhat.com>
上级 2b329ae9
......@@ -463,11 +463,14 @@ class QemuGuestAgentBasicCheck(QemuGuestAgentTest):
vcpus_info = self.gagent.get_vcpus()
cpu_num_qga = len(vcpus_info)
for vcpu in vcpus_info:
if params.get("os_type") == "linux" and not vcpu["can-offline"]:
test.fail("Linux guest cpu can't be offline from qga"
"which isn't expected.")
if params.get("os_type") == "linux":
if vcpu["logical-id"] == 0 and vcpu["can-offline"] is True:
test.fail("The first logical vcpu can't be offline.")
if vcpu["logical-id"] != 0 and vcpu["can-offline"] is False:
test.fail("Linux guest cpu can't be offline from qga "
"which isn't expected.")
if params.get("os_type") == "windows" and vcpu["can-offline"]:
test.fail("Windows guest cpu can be offline from qga"
test.fail("Windows guest cpu can be offline from qga "
"which isn't expected.")
error_context.context("Check cpu number.", logging.info)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册