[Libvirt-cim] [PATCH] cimtest: Update controller type from pci to scsi

Xu Wang gesaint at linux.vnet.ibm.com
Tue May 27 08:57:31 UTC 2014


于 2014年05月19日 21:54, John Ferlan 写道:
>
> On 05/08/2014 05:25 AM, Xu Wang wrote:
>> To test controller device new element <controller type='pci' index='0'
>> model='pci-root'> was introduced into domain xml. But it was not supported
>> until libvirt-1.0.5. Now RHEL-6.5 is using libvirt-0.10.2-29. It could
>> involve regression issue. Hence here I updated it to <controller type='scsi'
>> index='0' model='virtio-scsi'> to test fields of this device.
>>
>> Signed-off-by: Xu Wang <gesaint at linux.vnet.ibm.com>
>> ---
>>   .../libvirt-cim/cimtest/SystemDevice/01_forward.py |    2 +-
>>   .../02_reverse.py                                  |    2 +-
>>   suites/libvirt-cim/lib/XenKvmLib/vxml.py           |    2 +-
>>   3 files changed, 3 insertions(+), 3 deletions(-)
>>
> The patch fails for me in the upstream environment...
>
> Testing KVM hypervisor
> --------------------------------------------------------------------
> SystemDevice - 01_forward.py: FAIL
> ERROR 	- DeviceID mismatch
> ERROR 	- Exception Expected DeviceID: ['test_domain/controller:scsi:0', 'test_domain/controller:usb:0']
>   	  Got: [u'test_domain/controller:pci:0', u'test_domain/controller:scsi:0', u'test_domain/controller:usb:0']
> --------------------------------------------------------------------
> ...
> --------------------------------------------------------------------
> VirtualSystemSettingDataComponent - 02_reverse.py: FAIL
> ERROR 	- Assoc instances don't match expect=10 found=9.
> ERROR 	- Did not find association id=VSSDC_dom/controller:pci:0 in assoc_list
> --------------------------------------------------------------------
>
> What were the failures you saw in the 6.5 environment?
>
> I'm sure we can come to some sort of "middle ground"...
>
> How about the following squashed in (does it work in your
> environment)?:
>
> diff --git a/suites/libvirt-cim/cimtest/SystemDevice/01_forward.py b/suites/libv
> index 052efc1..b2a4bfa 100644
> --- a/suites/libvirt-cim/cimtest/SystemDevice/01_forward.py
> +++ b/suites/libvirt-cim/cimtest/SystemDevice/01_forward.py
> @@ -134,6 +134,10 @@ def main():
>           controller_cn = get_typed_class(virt, "Controller")
>           exp_pllist[controller_cn] = []
>           exp_pllist[controller_cn].append('%s/controller:scsi:0' % test_dom)
> +        # pci-root gets added automagically for us since scsi has to
> +        # hang somewhere
> +        if virsh_version_cmp(libvirt_version, "1.0.5") >= 0:
> +            exp_pllist[controller_cn].append('%s/controller:pci:0' % test_dom)
>           exp_pllist[controller_cn].append('%s/controller:usb:0' % test_dom)
>    
>       try:
>
> and
>
> diff --git a/suites/libvirt-cim/cimtest/VirtualSystemSettingDataComponent/02_rev
> index 9060ae4..33877bf 100644
> --- a/suites/libvirt-cim/cimtest/VirtualSystemSettingDataComponent/02_reverse.py
> +++ b/suites/libvirt-cim/cimtest/VirtualSystemSettingDataComponent/02_reverse.py
> @@ -102,6 +102,10 @@ def assoc_values(ip, assoc_info, virt="Xen"):
>           if curr_cim_rev >= controller_rev:
>               # Add controllers too ... will need a cim/cimtest version check
>               rasd_list.update({"scsi_rasd":"%s/controller:scsi:0" % test_dom})
> +            # pci-root gets added automagically for us since scsi has to
> +            # hang somewhere
> +            if virsh_version_cmp(libvirt_version, "1.0.5") >= 0:
> +                rasd_list.update({"pci_rasd":"%s/controller:pci:0" % test_dom})
>               rasd_list.update({"usb_rasd":"%s/controller:usb:0" % test_dom})
>
>       expect_rasds = len(rasd_list)
>
>
> BTW: I use 1.0.5 only because of your note...
>
> John
I have updated my patch based on your comments. It works fine for RHEL-6.5.
But I am seeking the root cause of several other failed testcases.
--------------------------------------------------------------------
ComputerSystemIndication - 01_created_indication.py: FAIL
ERROR - Waited too long for define indication
ERROR - Exception: Poll for indication Failed
ERROR - Waited too long for start indication
ERROR - Exception: Poll for indication Failed
ERROR - Waited too long for destroy indication
ERROR - Exception: Poll for indication Failed
--------------------------------------------------------------------
--------------------------------------------------------------------
ElementConforms - 01_forward.py: FAIL
ERROR - Exception: 'KVM_ElementConformsToProfile' returned (0) 
'KVM_RegisteredProfile' objects
--------------------------------------------------------------------
ElementConforms - 02_reverse.py: FAIL
ERROR - ElementConformsToProfile assoc failed
Unrecognized CIM status code "100": Cannot connect to local CIM server. 
Connection failed.
--------------------------------------------------------------------
--------------------------------------------------------------------
ElementConforms - 04_ectp_rev_errs.py: FAIL
ERROR - Unexpected rc code 100 and description Unrecognized CIM status 
code "100": Cannot connect to local CIM server. Connection failed.

ERROR - ------ FAILED: INVALID_CCName_Keyname------
ERROR - Unexpected rc code 100 and description Unrecognized CIM status 
code "100": Cannot connect to local CIM server. Connection failed.

ERROR - ------ FAILED: INVALID_CCName_Keyvalue------
ERROR - Unexpected rc code 100 and description Unrecognized CIM status 
code "100": Cannot connect to local CIM server. Connection failed.

ERROR - ------ FAILED: INVALID_Name_Keyname------
ERROR - Unexpected rc code 100 and description Unrecognized CIM status 
code "100": Cannot connect to local CIM server. Connection failed.

ERROR - ------ FAILED: INVALID_Name_Keyvalue------
ERROR - Unexpected rc code 100 and description Unrecognized CIM status 
code "100": Cannot connect to local CIM server. Connection failed.

ERROR - ------ FAILED: INVALID_CCName_Keyname------
ERROR - Unexpected rc code 100 and description Unrecognized CIM status 
code "100": Cannot connect to local CIM server. Connection failed.

ERROR - ------ FAILED: INVALID_CCName_Keyvalue------
ERROR - Unexpected rc code 100 and description Unrecognized CIM status 
code "100": Cannot connect to local CIM server. Connection failed.

ERROR - ------ FAILED: INVALID_Name_Keyname------
ERROR - Unexpected rc code 100 and description Unrecognized CIM status 
code "100": Cannot connect to local CIM server. Connection failed.

ERROR - ------ FAILED: INVALID_Name_Keyvalue------
--------------------------------------------------------------------
--------------------------------------------------------------------
Profile - 02_profile_to_elec.py: FAIL
ERROR - KVM_ComputerSystem with domguest was not returned
--------------------------------------------------------------------
--------------------------------------------------------------------
RASDIndications - 01_guest_states_rasd_ind.py: FAIL
ERROR - Exception: Poll for indication Failed
--------------------------------------------------------------------
RASDIndications - 02_guest_add_mod_rem_rasd_ind.py: FAIL
ERROR - Exception: Poll for indication Failed
--------------------------------------------------------------------
--------------------------------------------------------------------
VirtualSystemSnapshotService - 03_create_snapshot.py: FAIL
ERROR - Exception: CreateSnapshot failed to return a CIM job inst
ERROR - Failed to remove snapshot file for snapshot_vm
--------------------------------------------------------------------
But I still have no idea about them.

Thanks,
Xu Wang
>
>> diff --git a/suites/libvirt-cim/cimtest/SystemDevice/01_forward.py b/suites/libvirt-cim/cimtest/SystemDevice/01_forward.py
>> index f81aff1..052efc1 100644
>> --- a/suites/libvirt-cim/cimtest/SystemDevice/01_forward.py
>> +++ b/suites/libvirt-cim/cimtest/SystemDevice/01_forward.py
>> @@ -133,7 +133,7 @@ def main():
>>       if curr_cim_rev >= controller_rev and virt == 'KVM':
>>           controller_cn = get_typed_class(virt, "Controller")
>>           exp_pllist[controller_cn] = []
>> -        exp_pllist[controller_cn].append('%s/controller:pci:0' % test_dom)
>> +        exp_pllist[controller_cn].append('%s/controller:scsi:0' % test_dom)
>>           exp_pllist[controller_cn].append('%s/controller:usb:0' % test_dom)
>>    
>>       try:
>> diff --git a/suites/libvirt-cim/cimtest/VirtualSystemSettingDataComponent/02_reverse.py b/suites/libvirt-cim/cimtest/VirtualSystemSettingDataComponent/02_reverse.py
>> index a7e6c17..9060ae4 100644
>> --- a/suites/libvirt-cim/cimtest/VirtualSystemSettingDataComponent/02_reverse.py
>> +++ b/suites/libvirt-cim/cimtest/VirtualSystemSettingDataComponent/02_reverse.py
>> @@ -101,7 +101,7 @@ def assoc_values(ip, assoc_info, virt="Xen"):
>>   
>>           if curr_cim_rev >= controller_rev:
>>               # Add controllers too ... will need a cim/cimtest version check
>> -            rasd_list.update({"pci_rasd":"%s/controller:pci:0" % test_dom})
>> +            rasd_list.update({"scsi_rasd":"%s/controller:scsi:0" % test_dom})
>>               rasd_list.update({"usb_rasd":"%s/controller:usb:0" % test_dom})
>>   
>>       expect_rasds = len(rasd_list)
>> diff --git a/suites/libvirt-cim/lib/XenKvmLib/vxml.py b/suites/libvirt-cim/lib/XenKvmLib/vxml.py
>> index 3bea13c..9ea46e4 100644
>> --- a/suites/libvirt-cim/lib/XenKvmLib/vxml.py
>> +++ b/suites/libvirt-cim/lib/XenKvmLib/vxml.py
>> @@ -937,7 +937,7 @@ class KVMXML(VirtXML, VirtCIM):
>>                          is_ipv6_only=None,
>>                          port_num='-1', keymap="en-us", irstype="mouse",
>>                          btype="ps2", vnc_passwd=None,
>> -                       ctltype="pci", ctlindex=0, ctlmodel="pci-root"):
>> +                       ctltype="scsi", ctlindex=0, ctlmodel="virtio-scsi"):
>>                          # Optionally the following works too:
>>                          #ctltype="usb", ctlindex=0, ctlmodel=None):
>>           if not os.path.exists(disk_file_path):
>>




More information about the Libvirt-cim mailing list