Re: [PATCH] Make ABI stability issue easier to debug

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

 



On Wed, Mar 12, 2014 at 10:05:56 -0600, Eric Blake wrote:
> On 03/12/2014 09:52 AM, Jiri Denemark wrote:
> > When ABI stability check fails, we only log the error message describing
> > the incompatibility. Let's log both XMLs in case of an error to make it
> > easier to analyze where and why the stability check failed.
> > 
> > Signed-off-by: Jiri Denemark <jdenemar@xxxxxxxxxx>
> > ---
> >  src/conf/domain_conf.c | 125 ++++++++++++++++++++++++++++---------------------
> >  1 file changed, 72 insertions(+), 53 deletions(-)
> 
> 
> >      if (!virDomainPanicCheckABIStability(src->panic, dst->panic))
> > -        return false;
> > +        goto error;
> >  
> >      return true;
> > +
> > +error:
> > +    err = virSaveLastError();
> > +
> > +    strSrc = virDomainDefFormat(src, 0);
> > +    strDst = virDomainDefFormat(dst, 0);
> > +    VIR_DEBUG("XMLs that failed stability check were: src=\"%s\", dst=\"%s\"",
> > +              NULLSTR(strSrc), NULLSTR(strDst));
> 
> Of course, the log filters have to be turned higher to allow debug
> output; which means we may not see this information on bug reports until
> we tell a person to rerun their test.  But the idea makes sense, and
> doesn't hurt the normal path of compatible API.
> 
> ACK.

Pushed, thanks.

Jirka

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]