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

Deepti B Kalakeri deeptik at linux.vnet.ibm.com
Thu Jan 8 06:45:47 UTC 2009



Kaitlin Rupert wrote:
>> I get your point here, but still it left me confused as to why I am 
>> getting the Error Messages.
>> It would be good to change the Error messages to Info messages 
>> whenever appropriate.
>> We can use the timeout period to decide whether it is time to print 
>> an error message in case the guest info is not found or the states 
>> are not yet properly.
>> Any thoughts ??
>>
>
> Using the timeout won't work because it is check_guest_state() that is 
> printing the error messages, not cim_state_change(). I'm going to 
> submit a patch that changes the log message from error to info.
>
>
What I was thinking is to supply the timeout param and maintain a static 
like variable( that is present in C) and use this static like variable 
to compare in check_guest_state().
We can achieve the static behaviour in python by declaring a global 
variable in the check_guest_state() function. But, I think using globals 
is highly discouraged ?
> The test case should be responsible for printing its own error message 
> in the case of a failure, so changing this to info messages shouldn't 
> be too problematic.
>
> The only problem it causes is that when you run with -debug, the info 
> messages won't print to the terminal, so you'll have to check the 
> individual log to see why the test failed.
I think it is better to leave this as it is for now. Since someone might 
forget to ON the --debug option to see the log messages.
Any thoughts ??

-- 
Thanks and Regards,
Deepti B. Kalakeri
IBM Linux Technology Center
deeptik at linux.vnet.ibm.com




More information about the Libvirt-cim mailing list