Re: [Autotest] [KVM-AUTOTEST PATCH 3/7] [RFC] Introduce exception context strings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jan 03, 2011 at 05:26:20PM -0200, Eduardo Habkost wrote:
> On Mon, Jan 03, 2011 at 08:34:07PM +0200, Michael Goldish wrote:
> > +# Exception context information:
> > +# ------------------------------
> > +# Every function can have some context string associated with it.
> > +# The context string can be changed by calling context(str) and cleared by
> > +# calling context() with no parameters.
> > +# get_context() joins the current context strings of all functions in the
> > +# provided traceback.  The result is a brief description of what the test was
> > +# doing in the provided traceback (which should be the traceback of a caught
> > +# exception).
> 
> I am sure people will eventually forget to call context() to clear
> previous context calls, and people won't notice until an actual error is
> raised on another section.
> 

I am looking further at the code, now. Does the stack and traceback
tricks mean that the effects of a context("foo") call will be lost as
soon as we return from a function?

I would say this is a bad idea for a conventional API, but I think it
may be acceptable considering that the purpose of those tricks is to
make function tracebacks easier to understand.

-- 
Eduardo
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux