[Libvirt-cim] [PATCH] [TEST]Fixing 01_netport.py tc failure

Guo Lian Yun yunguol at cn.ibm.com
Fri Apr 11 02:51:00 UTC 2008


                                                                           
             "Deepti B.                                                    
             Kalakeri"                                                     
             <deeptik at linux.vn                                          To 
             et.ibm.com>               libvirt-cim at redhat.com              
             Sent by:                                                   cc 
             libvirt-cim-bounc                                             
             es at redhat.com                                         Subject 
                                       [Libvirt-cim] [PATCH] [TEST]Fixing  
                                       01_netport.py tc failure            
             2008-04-10 21:44                                              
                                                                           
                                                                           
             Please respond to                                             
                 List for                                                  
              discussion and                                               
              development of                                               
                libvirt CIM                                                
             <libvirt-cim at redh                                             
                  at.com>                                                  
                                                                           
                                                                           







# HG changeset patch
# User Deepti B. Kalakeri <deeptik at linux.vnet.ibm.com>
# Date 1207835007 -19800
# Node ID 0b1dc112438b0362c88891c4a690fd92bf6ca628
# Parent  19ff9c851ed8cb76b74d158a4c439dfa5f4ccb50
[TEST]Fixing 01_netport.py tc failure.

Signed-off-by: Deepti B. Kalakeri <deeptik at linux.vnet.ibm.com>

diff -r 19ff9c851ed8 -r 0b1dc112438b
suites/libvirt-cim/cimtest/NetworkPort/01_netport.py
--- a/suites/libvirt-cim/cimtest/NetworkPort/01_netport.py         Wed Apr
09 18:00:14 2008 +0530
+++ b/suites/libvirt-cim/cimtest/NetworkPort/01_netport.py         Thu Apr
10 19:13:27 2008 +0530
@@ -51,6 +51,7 @@ def main():
 def main():
     options = main.options
     log_param()
+    status = PASS

     vsxml = get_class(options.virt)(test_dom, mac=test_mac)
     vsxml.define(options.ip)
@@ -61,9 +62,7 @@ def main():
                  'SystemName' : test_dom,
                  'SystemCreationClassName' : get_typed_class(options.virt,
"ComputerSystem")
                }
-
     dev = None
-
     try:
         dev = eval('devices.' + get_typed_class(options.virt,
"NetworkPort"))(options.ip, key_list)

@@ -72,12 +71,10 @@ def main():
         vsxml.undefine(options.ip)
         return XFAIL_RC(bug)

-    if dev == None:
+    if devid not in dev.DeviceID :
         logger.error("Error retrieving instance for devid %s" % devid)
         vsxml.undefine(options.ip)
         return FAIL
-
-    status = PASS

     if dev.LinkTechnology != devices.LinkTechnology_Ethernet:
         logger.error("LinkTechnology should be set to `%i' instead of
`%s'" % \
@@ -86,20 +83,17 @@ def main():

     addrs = dev.NetworkAddresses
     if len(addrs) != 1:
-        logger.error("Too many NetworkAddress entries (%i instead of %i)"
% \
-              (len(addrs), 1))
+        logger.error("Too many NetworkAddress entries (%i instead of %i)"
% (len(addrs), 1))
         status = FAIL

     if addrs[0] != test_mac:
-        logger.error("MAC address reported incorrectly (%s instead of %s)"
% \
-              (addrs[0], test_mac))
+        logger.error("MAC address reported incorrectly (%s instead of %s)"
% (addrs[0], test_mac))
         status = FAIL

     if status == FAIL:
         logger.error("Checked interface %s" % test_mac)

     vsxml.undefine(options.ip)
-
     return status

 if __name__ == "__main__":

+1 from me.

_______________________________________________
Libvirt-cim mailing list
Libvirt-cim at redhat.com
https://www.redhat.com/mailman/listinfo/libvirt-cim
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/libvirt-cim/attachments/20080411/a7c8ac03/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: graycol.gif
Type: image/gif
Size: 105 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvirt-cim/attachments/20080411/a7c8ac03/attachment.gif>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pic10539.gif
Type: image/gif
Size: 1255 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvirt-cim/attachments/20080411/a7c8ac03/attachment-0001.gif>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ecblank.gif
Type: image/gif
Size: 45 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvirt-cim/attachments/20080411/a7c8ac03/attachment-0002.gif>


More information about the Libvirt-cim mailing list