Re: [Autotest] [PATCH] Add a subtest pci_hotplug in kvm test

2009-07-14 Thread Yolkfull Chow

On 07/08/2009 09:51 AM, Lucas Meneghel Rodrigues wrote:

I've spent some time doing a second review and test of the code.
During my tests:

  * I found some problems with PCI hotplug itself and would like help
to figure out why things are not working as expected.
  * Made suggestions regarding the phrasing of the error messages
thrown by the test. Mostly nipticking. Let me know if you think the
new messages make sense.
  * The order of the final test steps looks a bit weird to me

Comments follow.

On Fri, Jul 3, 2009 at 3:00 AM, Yolkfull Chow  wrote:
   

On 07/03/2009 01:57 PM, Yolkfull Chow wrote:
 

Signed-off-by: Yolkfull Chow
---
   client/tests/kvm/kvm.py   |1 +
   client/tests/kvm/kvm_tests.cfg.sample |   65 ++-
   client/tests/kvm/kvm_tests.py |   94 
+
   client/tests/kvm/kvm_vm.py|2 +
   4 files changed, 161 insertions(+), 1 deletions(-)

diff --git a/client/tests/kvm/kvm.py b/client/tests/kvm/kvm.py
index b18b643..fc92e10 100644
--- a/client/tests/kvm/kvm.py
+++ b/client/tests/kvm/kvm.py
@@ -55,6 +55,7 @@ class kvm(test.test):
   "kvm_install":  test_routine("kvm_install", 
"run_kvm_install"),
   "linux_s3": test_routine("kvm_tests", "run_linux_s3"),
   "stress_boot":  test_routine("kvm_tests", "run_stress_boot"),
+"pci_hotplug":  test_routine("kvm_tests", "run_pci_hotplug"),
   }

   # Make it possible to import modules from the test's bindir
diff --git a/client/tests/kvm/kvm_tests.cfg.sample 
b/client/tests/kvm/kvm_tests.cfg.sample
index 2f864de..a9e16d6 100644
--- a/client/tests/kvm/kvm_tests.cfg.sample
+++ b/client/tests/kvm/kvm_tests.cfg.sample
@@ -94,6 +94,53 @@ variants:
   max_vms = 5
   alive_test_cmd = ps aux

+
+- nic_hotplug:
+type = pci_hotplug
+pci_type = nic
+modprobe_acpiphp = yes
+reference_cmd = lspci
+find_pci_cmd = 'lspci | tail -n1'
   

I tried block device hotplug, lspci doesn't show up the newly added
devices. Already tried with F8 and F9. Any idea why?
   
  It doesn't need to modprobe acpiphp on Fedora, also, both F8 and F9 
don't have virtio & virtio_ring modules.  I ran it on guest Fedora-11 
and Win2008,  both ran successfully:


# ./scan_results.py
teststatus
secondsinfo
--
---
Fedora.11.32.nic_hotplug.nic_rtl8139GOOD
68completed successfully
Fedora.11.32.nic_hotplug.nic_virtio GOOD46
completed successfully
Fedora.11.32.block_hotplug.fmt_qcow2.block_virtioGOOD46
completed successfully
Fedora.11.32.block_hotplug.fmt_qcow2.block_scsi GOOD44
completed successfully
Fedora.11.32.block_hotplug.fmt_raw.block_virtio GOOD45
completed successfully
Fedora.11.32.block_hotplug.fmt_raw.block_scsi   GOOD46
completed successfully
Win2008.32.nic_hotplug.nic_rtl8139  GOOD
66completed successfully
Win2008.32.block_hotplug.fmt_qcow2.block_scsi   GOOD186
completed successfully
Win2008.32.block_hotplug.fmt_raw.block_scsi GOOD71
completed successfully


   

+pci_test_cmd = 'nslookupwww.redhat.com'
+seconds_wait_for_device_install = 3
+variants:
+- @nic_8139:
+pci_model = rtl8139
+match_string = "8139"
+- nic_virtio:
+pci_model = virtio
+match_string = "Virtio network device"
+- nic_e1000:
+pci_model = e1000
+match_string = "Gigabit Ethernet Controller"
   

Pretty much all block hotplug 'guest side check' is failing during the
stage where the output  of lspci | tail -n1 is being compared with the
match strings. Hypervisor is qemu 0.10.5 (kvm-87 upstream).

   

+- block_hotplug:
+type = pci_hotplug
+pci_type = block
+modprobe_acpiphp = yes
+reference_cmd = lspci
+find_pci_cmd = 'lspci | tail -n1'
+images += " stg"
+boot_drive_stg = no
+image_name_stg = storage
+image_size = 1G
+force_create_image_stg = yes
+pci_test_cmd = 'dir'
+seconds_wait_for_device_install = 3
+variants:
+- block_virtio:
+pci_model = virtio
+match_string = "Virtio block device"
+- block_scsi:
+pci_model = scsi
+match_string = "SCSI storage controller"
+variants:
+- fmt_qcow2:
+image_format_stg = qcow2
+- fmt_raw:
+image_format_stg = raw
+
+
   # NICs
   variants:
   - @rtl8139:
@@ -306,6 +353,22 @@ variants:
  

Re: [Autotest] [PATCH] Add a subtest pci_hotplug in kvm test

2009-07-09 Thread Yolkfull Chow

On 07/08/2009 09:51 AM, Lucas Meneghel Rodrigues wrote:

I've spent some time doing a second review and test of the code.
During my tests:

  * I found some problems with PCI hotplug itself and would like help
to figure out why things are not working as expected.
  * Made suggestions regarding the phrasing of the error messages
thrown by the test. Mostly nipticking. Let me know if you think the
new messages make sense.
  * The order of the final test steps looks a bit weird to me

Comments follow.
   


Lucas, sorry for reply you a little late since I left two days. :)


On Fri, Jul 3, 2009 at 3:00 AM, Yolkfull Chow  wrote:
   

On 07/03/2009 01:57 PM, Yolkfull Chow wrote:
 

Signed-off-by: Yolkfull Chow
---
   client/tests/kvm/kvm.py   |1 +
   client/tests/kvm/kvm_tests.cfg.sample |   65 ++-
   client/tests/kvm/kvm_tests.py |   94 
+
   client/tests/kvm/kvm_vm.py|2 +
   4 files changed, 161 insertions(+), 1 deletions(-)

diff --git a/client/tests/kvm/kvm.py b/client/tests/kvm/kvm.py
index b18b643..fc92e10 100644
--- a/client/tests/kvm/kvm.py
+++ b/client/tests/kvm/kvm.py
@@ -55,6 +55,7 @@ class kvm(test.test):
   "kvm_install":  test_routine("kvm_install", 
"run_kvm_install"),
   "linux_s3": test_routine("kvm_tests", "run_linux_s3"),
   "stress_boot":  test_routine("kvm_tests", "run_stress_boot"),
+"pci_hotplug":  test_routine("kvm_tests", "run_pci_hotplug"),
   }

   # Make it possible to import modules from the test's bindir
diff --git a/client/tests/kvm/kvm_tests.cfg.sample 
b/client/tests/kvm/kvm_tests.cfg.sample
index 2f864de..a9e16d6 100644
--- a/client/tests/kvm/kvm_tests.cfg.sample
+++ b/client/tests/kvm/kvm_tests.cfg.sample
@@ -94,6 +94,53 @@ variants:
   max_vms = 5
   alive_test_cmd = ps aux

+
+- nic_hotplug:
+type = pci_hotplug
+pci_type = nic
+modprobe_acpiphp = yes
+reference_cmd = lspci
+find_pci_cmd = 'lspci | tail -n1'
   

I tried block device hotplug, lspci doesn't show up the newly added
devices. Already tried with F8 and F9. Any idea why?
   
Strange, it could be run successfully with guest RHEL.5.3.i386 and 
Win2008.32(use telnet login), but I never run it on Fedora. Jason 
reminded me several days ago that there is no 'acpiphp' module on Fedora 
which may be related. Anyway, I will fix it.
   

+pci_test_cmd = 'nslookup www.redhat.com'
+seconds_wait_for_device_install = 3
+variants:
+- @nic_8139:
+pci_model = rtl8139
+match_string = "8139"
+- nic_virtio:
+pci_model = virtio
+match_string = "Virtio network device"
+- nic_e1000:
+pci_model = e1000
+match_string = "Gigabit Ethernet Controller"
   

Pretty much all block hotplug 'guest side check' is failing during the
stage where the output  of lspci | tail -n1 is being compared with the
match strings. Hypervisor is qemu 0.10.5 (kvm-87 upstream).

   

+- block_hotplug:
+type = pci_hotplug
+pci_type = block
+modprobe_acpiphp = yes
+reference_cmd = lspci
+find_pci_cmd = 'lspci | tail -n1'
+images += " stg"
+boot_drive_stg = no
+image_name_stg = storage
+image_size = 1G
+force_create_image_stg = yes
+pci_test_cmd = 'dir'
+seconds_wait_for_device_install = 3
+variants:
+- block_virtio:
+pci_model = virtio
+match_string = "Virtio block device"
+- block_scsi:
+pci_model = scsi
+match_string = "SCSI storage controller"
+variants:
+- fmt_qcow2:
+image_format_stg = qcow2
+- fmt_raw:
+image_format_stg = raw
+
+
   # NICs
   variants:
   - @rtl8139:
@@ -306,6 +353,22 @@ variants:
   migration_test_command = ver&&vol
   stress_boot:
   alive_test_cmd = systeminfo
+nic_hotplug:
+modprobe_acpiphp = no
+reference_cmd = systeminfo
+seconds_wait_for_device_install = 10
+find_pci_cmd = ipconfig /all | find "Description"
+nic_e1000:
+match_string = "Intel(R) PRO/1000 MT Network Connection"
+block_hotplug:
+use_telnet = yes
+modprobe_acpiphp = no
+reference_cmd = wmic diskdrive
+find_pci_cmd = wmic diskdrive | find "disk drives"
+seconds_wait_for_device_install = 10
+only block_scsi
+block_scsi:
+match_string = "SCSI"

   

It supports Windows block_hotplug now. But we need use_telnet to login
Windows OS since command 'wmic' could only run on telnet session.
   

Re: [Autotest] [PATCH] Add a subtest pci_hotplug in kvm test

2009-07-07 Thread Lucas Meneghel Rodrigues
I've spent some time doing a second review and test of the code.
During my tests:

 * I found some problems with PCI hotplug itself and would like help
to figure out why things are not working as expected.
 * Made suggestions regarding the phrasing of the error messages
thrown by the test. Mostly nipticking. Let me know if you think the
new messages make sense.
 * The order of the final test steps looks a bit weird to me

Comments follow.

On Fri, Jul 3, 2009 at 3:00 AM, Yolkfull Chow wrote:
> On 07/03/2009 01:57 PM, Yolkfull Chow wrote:
>> Signed-off-by: Yolkfull Chow
>> ---
>>   client/tests/kvm/kvm.py               |    1 +
>>   client/tests/kvm/kvm_tests.cfg.sample |   65 ++-
>>   client/tests/kvm/kvm_tests.py         |   94 
>> +
>>   client/tests/kvm/kvm_vm.py            |    2 +
>>   4 files changed, 161 insertions(+), 1 deletions(-)
>>
>> diff --git a/client/tests/kvm/kvm.py b/client/tests/kvm/kvm.py
>> index b18b643..fc92e10 100644
>> --- a/client/tests/kvm/kvm.py
>> +++ b/client/tests/kvm/kvm.py
>> @@ -55,6 +55,7 @@ class kvm(test.test):
>>                   "kvm_install":  test_routine("kvm_install", 
>> "run_kvm_install"),
>>                   "linux_s3":     test_routine("kvm_tests", "run_linux_s3"),
>>                   "stress_boot":  test_routine("kvm_tests", 
>> "run_stress_boot"),
>> +                "pci_hotplug":  test_routine("kvm_tests", 
>> "run_pci_hotplug"),
>>                   }
>>
>>           # Make it possible to import modules from the test's bindir
>> diff --git a/client/tests/kvm/kvm_tests.cfg.sample 
>> b/client/tests/kvm/kvm_tests.cfg.sample
>> index 2f864de..a9e16d6 100644
>> --- a/client/tests/kvm/kvm_tests.cfg.sample
>> +++ b/client/tests/kvm/kvm_tests.cfg.sample
>> @@ -94,6 +94,53 @@ variants:
>>           max_vms = 5
>>           alive_test_cmd = ps aux
>>
>> +
>> +    - nic_hotplug:
>> +        type = pci_hotplug
>> +        pci_type = nic
>> +        modprobe_acpiphp = yes
>> +        reference_cmd = lspci
>> +        find_pci_cmd = 'lspci | tail -n1'

I tried block device hotplug, lspci doesn't show up the newly added
devices. Already tried with F8 and F9. Any idea why?

>> +        pci_test_cmd = 'nslookup www.redhat.com'
>> +        seconds_wait_for_device_install = 3
>> +        variants:
>> +            - @nic_8139:
>> +                pci_model = rtl8139
>> +                match_string = "8139"
>> +            - nic_virtio:
>> +                pci_model = virtio
>> +                match_string = "Virtio network device"
>> +            - nic_e1000:
>> +                pci_model = e1000
>> +                match_string = "Gigabit Ethernet Controller"

Pretty much all block hotplug 'guest side check' is failing during the
stage where the output  of lspci | tail -n1 is being compared with the
match strings. Hypervisor is qemu 0.10.5 (kvm-87 upstream).

>> +    - block_hotplug:
>> +        type = pci_hotplug
>> +        pci_type = block
>> +        modprobe_acpiphp = yes
>> +        reference_cmd = lspci
>> +        find_pci_cmd = 'lspci | tail -n1'
>> +        images += " stg"
>> +        boot_drive_stg = no
>> +        image_name_stg = storage
>> +        image_size = 1G
>> +        force_create_image_stg = yes
>> +        pci_test_cmd = 'dir'
>> +        seconds_wait_for_device_install = 3
>> +        variants:
>> +            - block_virtio:
>> +                pci_model = virtio
>> +                match_string = "Virtio block device"
>> +            - block_scsi:
>> +                pci_model = scsi
>> +                match_string = "SCSI storage controller"
>> +        variants:
>> +            - fmt_qcow2:
>> +                image_format_stg = qcow2
>> +            - fmt_raw:
>> +                image_format_stg = raw
>> +
>> +
>>   # NICs
>>   variants:
>>       - @rtl8139:
>> @@ -306,6 +353,22 @@ variants:
>>               migration_test_command = ver&&  vol
>>           stress_boot:
>>               alive_test_cmd = systeminfo
>> +        nic_hotplug:
>> +            modprobe_acpiphp = no
>> +            reference_cmd = systeminfo
>> +            seconds_wait_for_device_install = 10
>> +            find_pci_cmd = ipconfig /all | find "Description"
>> +            nic_e1000:
>> +                match_string = "Intel(R) PRO/1000 MT Network Connection"
>> +        block_hotplug:
>> +            use_telnet = yes
>> +            modprobe_acpiphp = no
>> +            reference_cmd = wmic diskdrive
>> +            find_pci_cmd = wmic diskdrive | find "disk drives"
>> +            seconds_wait_for_device_install = 10
>> +            only block_scsi
>> +            block_scsi:
>> +                match_string = "SCSI"
>>
> It supports Windows block_hotplug now. But we need use_telnet to login
> Windows OS since command 'wmic' could only run on telnet session.
>>
>>           variants:
>>               - Win2000:
>> @@ -571,4 +634,4 @@ variants:
>>           only rtl8139
>>
>>   # Choose your test list
>> -o