[Libvirt-cim] [PATCH] [TEST] Add -d to duplicate error output to stderr
Kaitlin Rupert
kaitlin at linux.vnet.ibm.com
Tue Apr 15 00:21:17 UTC 2008
Zhengang Li wrote:
> Kaitlin Rupert wrote:
>
>>>>> def do_try():
>>>>> try:
>>>>> + log_param(options.debug)
>>>> log_param() is invoked here. It doesn't hurt to leave the invoke in
>>>> every test cases. But we don't have to add that in future test cases.
>>>>
>>> Excellent - do_try() just gets better in my book. ;)
>>>
>>> Would like to see some review comments on this patch. I have no
>>> complaints, but I'm interested in hearing whether people think this
>>> is useful.
>>>
>>> Thanks!
>>>
>>
>> Ah.. my mistake.. I didn't notice this at first. Including
>> log_param() in both the test case itself and do_try() causes the
>> messages to be written to the log twice.
> How about this:
> def log_param(debug=None):
> if debug == None:
> return
> else:
> original log_param() body
>
> This way, we don't have to worry about twice logging, and give us time
> to remove the log_param() in the testcases.
> And after all log_param() is removed from the testcases, we can revert
> the log_param() to the state without a 'debug==None' check.
Sorry Zhengang, I thought I'd responded to this already. Yes, I think
this is a good approach. Can you modify your original patch and resend?
Also, can you add a FIXME comment as well? I am keeping track of such
FIXME issues, but adding the comment makes it easier to search for later on.
Thanks!
--
Kaitlin Rupert
IBM Linux Technology Center
kaitlin at linux.vnet.ibm.com
More information about the Libvirt-cim
mailing list