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

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

 



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.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

--
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]