Skip to contentSkip to conversation

KVM test: minor pci_hotplug fixes

PATCH New Michael Goldish 1 participant 1 message Nov 6, 2009 KVM

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 KVM test: minor pci_hotplug fixes

- Put the PCI device removal code in a finally clause.
- Use kvm_vm.get_image_filename() instead of os.path.join().
It's a bit cleaner because if we ever change the names of image parameters we'll only have to change the code in one place.
Also, the way os.path.join() was used lead to image filenames being prefixed with 'images/' twice, e.g. 'images/images/foo.qcow2'.
- Make some failure messages clearer.
- Remove 'only Fedora Ubuntu Windows' from the fmt_raw variant. 'only' works for things that have already been defined, but the guests are defined later.
- Remove unused 'modprobe_acpiphp' parameter.
- Change 'online disk' to 'online' in pci_test_cmd for Windows ('online disk' doesn't seem to work).
- Remove the unneeded telnet/ssh/guest_port parameters from the Windows block_hotplug parameters.

Changes from previous version:
- When deleting the PCI device compare the output of 'info pci' rather than the output of the pci_del command.
- If an exception is raised in the 'try' block, do not raise an exception in the device deletion code, because it will mask the first exception.
- After pci_del, give the device some time to disappear from 'info pci'.

---
 client/tests/kvm/kvm_tests.cfg.sample |    7 +--
 client/tests/kvm/tests/pci_hotplug.py |  120 ++++++++++++++++++---------------
 2 files changed, 67 insertions(+), 60 deletions(-)
client/tests/kvm/kvm_tests.cfg.sample +1 -6
index f271a09..326ae20 100644
@@ -181,7 +181,6 @@ variants:
     - nic_hotplug:  install setup unattended_install
         type = pci_hotplug
         pci_type = nic
-        modprobe_acpiphp = no
         reference_cmd = lspci
         find_pci_cmd = 'lspci | tail -n1'
         pci_test_cmd = 'nslookup www.redhat.com'
@@ -223,7 +222,6 @@ variants:
                 image_format_stg = qcow2
             - fmt_raw:
                 image_format_stg = raw
-                only Fedora Ubuntu Windows
 
     - system_reset: install setup unattended_install
         type = boot
@@ -538,13 +536,10 @@ variants:
             nic_virtio:
                 match_string = "VirtIO Ethernet"
         block_hotplug:
-            use_telnet = yes
-            ssh_port = 23
-            guest_port_ssh = 23
             wait_secs_for_hook_up = 10
             reference_cmd = wmic diskdrive list brief
             find_pci_cmd = wmic diskdrive list brief
-            pci_test_cmd = echo select disk 1 > dt && echo online disk >> dt && echo detail disk >> dt && echo exit >> dt && diskpart /s dt
+            pci_test_cmd = echo select disk 1 > dt && echo online >> dt && echo detail disk >> dt && echo exit >> dt && diskpart /s dt
 
         variants:
             - Win2000:
client/tests/kvm/tests/pci_hotplug.py +66 -54

141 lines not on this page · raw message

Signature · 1 line
1.5.4.1