[Libvirt-cim] [PATCH] [TEST] Update 32_start_reboot.py to use cim_() functions

Kaitlin Rupert kaitlin at linux.vnet.ibm.com
Tue Jan 6 17:55:46 UTC 2009


>> @@ -606,7 +610,7 @@
>>               def cim_reboot(self, server, req_time=const.TIME, 
>> poll_time=30):          return self.cim_state_change(server, 
>> const.CIM_REBOOT, -                                     req_time, 
>> poll_time) +                                     req_time, poll_time, 
>> const.CIM_ENABLE)   
> The test case gives a false positive. The following are the log messages 
> which means the tc is suppose to fail.
> 
> Tue, 06 Jan 2009 01:10:14:TEST LOG:INFO - ====32_start_reboot.py Log====
> Tue, 06 Jan 2009 01:10:17:TEST LOG:ERROR - Unable to check guest state
> Tue, 06 Jan 2009 01:10:17:TEST LOG:ERROR - Exception: Wrong guest instance
> Tue, 06 Jan 2009 01:10:18:TEST LOG:ERROR - Unable to check guest state
> Tue, 06 Jan 2009 01:10:18:TEST LOG:ERROR - Exception: EnabledState is 9, 
> expected 2.
> 
> But, the test case gives a PASS message on the console.
> 

When you reboot a guest, the will be paused briefly before being 
restarted.  When cim_state_change(), it calls check_guest_state() in a 
loop to verify the guest reaches the appropriate state.

check_guest_state() prints an error message if the state is not in the 
expected state.

I could change these from error messages to info messages.  But 
check_guest_state() would still need to return an error in this case 
(even though the test doesn't report an error because the guest really 
is rebooted in this case).
-- 
Kaitlin Rupert
IBM Linux Technology Center
kaitlin at linux.vnet.ibm.com




More information about the Libvirt-cim mailing list