Inactive hide details for "Deepti B. Kalakeri" <deeptik@linux.vnet.ibm.com>"Deepti B. Kalakeri" <deeptik@linux.vnet.ibm.com>


          "Deepti B. Kalakeri" <deeptik@linux.vnet.ibm.com>
          Sent by: libvirt-cim-bounces@redhat.com

          2008-04-10 21:44
          Please respond to
          List for discussion and development of libvirt CIM <libvirt-cim@redhat.com>


To

libvirt-cim@redhat.com

cc


Subject

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

# HG changeset patch
# User Deepti B. Kalakeri <deeptik@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@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@redhat.com
https://www.redhat.com/mailman/listinfo/libvirt-cim