[Libvirt-cim] [PATCH] [TEST] #4 Fix ECTP 01_forward.py to support system with multiple networks defined

Kaitlin Rupert kaitlin at linux.vnet.ibm.com
Thu Nov 13 23:06:24 UTC 2008


>> +
>> +            if len(assoc_info) < 1:
>> +                ret_val, linux_cs = check_sblim(server, virt)
>> +                if ret_val != PASS:
>> +                    status = FAIL
>> +                    raise Exception(" '%s' returned (%d) '%s' 
>> objects" % \
>> +                                    (len(assoc_info), reg_classname))
>> +                else:
>> +                    status = XFAIL_RC(bug_sblim)
>> +                    raise Exception("Known failure")
>> +
>> +            for inst in assoc_info:
>> +                status, verify_ectp_list = verify_fields(inst, 
>> verify_ectp_list)
>> +                if status != PASS:
>> +                    raise Exception("Failed to verify instance") +
>> +        if status == PASS:
>> +            for k, l in verify_ectp_list.iteritems():
>> +                if len(l) != 0:
>> +                    status = FAIL
>> +                    raise Exception("%s items weren't returned: %s" % 
>> (k, l))
>> +
>> +    except Exception, detail:
>> +        logger.error("Exception: %s" % detail)
>> +        if status == PASS:
>> +            status = FAIL
>>   
> No need to check status == PASS here, can directly assign status = FAIL.
> otherwise looks good , +1 for me.

I did this because if an XFAIL is thrown, we overwrite the failure type 
as FAIL.  But I agree - it's an ugly way of preserving the XFAIL status.

I'll resend with a fix for this.

-- 
Kaitlin Rupert
IBM Linux Technology Center
kaitlin at linux.vnet.ibm.com




More information about the Libvirt-cim mailing list