[libvirt] Entering freeze for libvirt-3.5.0

Daniel P. Berrange berrange at redhat.com
Tue Jul 4 16:32:03 UTC 2017


On Tue, Jul 04, 2017 at 12:21:21PM +0100, Daniel P. Berrange wrote:
> On Tue, Jul 04, 2017 at 01:03:52PM +0200, Andrea Bolognani wrote:
> > On Sat, 2017-07-01 at 14:18 +0400, Roman Bogorodskiy wrote:
> > > > qemuxml2argvtest fails consistently in my FreeBSD guest.
> > > 
> > > I guess that's caused by clang inlining functions that are mocked
> > > (specifically, some numa related stuff); I think that was discussed
> > > several times already. Anyway, it should work fine with '-O0' in CFLAGS.
> > 
> > Well, would you look at that. It does indeed work flawlessly
> > when compiled without optimizations! :O
> > 
> > I'm not sure if that would be considered a reasonable
> > compromise to get the test suite running on FreeBSD in the
> > context of CI, though. I think it working reliably without
> > messing with CFLAGS would be a requirement; others might
> > disagree.
> 
> Hmm, I thought I fixed that problem when I introduce this patch:
> 
>   commit 728cacc8abed2b8de39e7b96fa42fde6850ec23a
>   Author: Daniel P. Berrange <berrange at redhat.com>
>   Date:   Fri Apr 7 15:07:49 2017 +0100
> 
>     annotate all mocked functions with noinline
> 
> 
> This made us annotate all mocked functions with noinline, which was
> sufficient to make CLang builds pass tests on Ubuntu VMs.

So I did some debugging and this is wierder than I can imagine possible.

I put a printf statement  in virNumaGetMaxNode in qemuxml2argvmock.c
to print out the return value.

I also put a printf statement in virNumaNodeIsAvailable in virnuma.c
(in the non-NUMACTL conditional block), that prints out the return
value received from virNumaGetMaxNode

The first printf displays 7, while the second printf displays -1

So we're definitely calling our mock override, but the return
value is getting mangled when seen by the caller, which is a
giant wtf to me.

Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|




More information about the libvir-list mailing list