From 50b1fe30e76ef846202f04c8c17260aa76b645b2 Mon Sep 17 00:00:00 2001 From: Xiyue Wang Date: Wed, 31 Oct 2018 09:31:49 -0400 Subject: [PATCH] nic_hotplug: python3 compatible, add e1000e, remove e1000 1. fix python3 compatible issue 2. add e1000e variant 3. remove e1000 for RHEL8 guest 4. remove useless parameter match_string in cfg file Signed-off-by: Xiyue Wang --- qemu/tests/cfg/nic_hotplug.cfg | 8 +++++--- qemu/tests/nic_hotplug.py | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/qemu/tests/cfg/nic_hotplug.cfg b/qemu/tests/cfg/nic_hotplug.cfg index d346b4ba..4e3c9beb 100644 --- a/qemu/tests/cfg/nic_hotplug.cfg +++ b/qemu/tests/cfg/nic_hotplug.cfg @@ -11,19 +11,21 @@ - nic_8139: no ppc64, ppc64le, s390x pci_model = rtl8139 - match_string = "8139" - nic_virtio: #TODO: Confirm this works with libvirt pci_model = virtio-net-pci - match_string = "Virtio network device" Host_RHEL.m5: pci_model = virtio s390x: pci_model = virtio-net-ccw - nic_e1000: no ppc64, ppc64le, s390x + RHEL: + only RHEL.6 RHEL.7 pci_model = e1000 - match_string = "Gigabit Ethernet Controller" + - nic_e1000e: + no ppc64, ppc64le, s390x + pci_model = e1000e variants: - one_pci: pci_num = 1 diff --git a/qemu/tests/nic_hotplug.py b/qemu/tests/nic_hotplug.py index 0ccc6b31..b3febd8b 100644 --- a/qemu/tests/nic_hotplug.py +++ b/qemu/tests/nic_hotplug.py @@ -74,7 +74,7 @@ def run(test, params, env): if nic_ip: return nic_ip cached_ip = vm.address_cache.get(nic["mac"]) - arps = process.system_output("arp -aen") + arps = process.system_output("arp -aen").decode() logging.debug("Can't get IP address:") logging.debug("\tCached IP: %s", cached_ip) logging.debug("\tARP table: %s", arps) -- GitLab