提交 7a9b86be 编写于 作者: L Lucas Meneghel Rodrigues

kvm_vm: Clean network resources upon create_qemu_cmd failure

If an exception happened when assembling the qemu cmd
(for example, unsupported cmdline flags for that
particular qemu version), clean up any tap fd open
for each nic.

This is the more proper solution for the issue first
mentioned here:

https://github.com/autotest/autotest/issues/520

That Gerd hit while running the usb related tests
in the code using RHEL 6. This patch finally makes
the usb tests properly pass when using bridge:

[root@virtblade02 virt-test]# ./run -t kvm --nettype bridge --tests "boot_with_usb reboot_with_usb"
SETUP: PASS (1.55 s)
DATA DIR: /var/lib/virt_test
DEBUG LOG: /root/virt-test/logs/run-2012-12-24-00.27.31/debug.log
TESTS: 20
(1/20) boot_with_usb.ehci: PASS (22.82 s)
(2/20) boot_with_usb.keyboard.uhci: PASS (27.84 s)
(3/20) boot_with_usb.keyboard.xhci: SKIP
(4/20) boot_with_usb.mouse.uhci: PASS (26.95 s)
(5/20) boot_with_usb.mouse.xhci: SKIP
(6/20) boot_with_usb.usb_audio: SKIP
(7/20) boot_with_usb.hub: PASS (27.07 s)
(8/20) boot_with_usb.storage.uhci: PASS (27.76 s)
(9/20) boot_with_usb.storage.ehci: PASS (27.86 s)
(10/20) boot_with_usb.storage.xhci: SKIP
(11/20) reboot_with_usb.ehci: PASS (62.71 s)
(12/20) reboot_with_usb.keyboard.uhci: PASS (64.18 s)
(13/20) reboot_with_usb.keyboard.xhci: SKIP
(14/20) reboot_with_usb.mouse.uhci: PASS (63.01 s)
(15/20) reboot_with_usb.mouse.xhci: SKIP
(16/20) reboot_with_usb.usb_audio: SKIP
(17/20) reboot_with_usb.hub: PASS (63.05 s)
(18/20) reboot_with_usb.storage.uhci: PASS (64.08 s)
(19/20) reboot_with_usb.storage.ehci: PASS (64.16 s)
(20/20) reboot_with_usb.storage.xhci: SKIP

CC: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: NLucas Meneghel Rodrigues <lmr@redhat.com>
上级 78efe157
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册