On 11/05/14 18:07, Michal Privoznik wrote: > And yet again one fix of 90286418. The problem is, if libvirt is > built with NUMA disabled (--without-numad --without-numactl), the > testsuite doesn't count on that and some tests fail. This is > because the virNumaNodesetIsAvailable() function is taken from > another section of virnuma.c which contains functions stubs for > case NUMA is disabled at build time. And the function basically > yields an error. However, we want our testsuite to be > deterministic and hence we ought to mock the function. > > Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx> > --- > tests/qemuxml2argvmock.c | 9 +++++++++ > 1 file changed, 9 insertions(+) > > diff --git a/tests/qemuxml2argvmock.c b/tests/qemuxml2argvmock.c > index 7218747..7b8bdd6 100644 > --- a/tests/qemuxml2argvmock.c > +++ b/tests/qemuxml2argvmock.c > @@ -39,3 +39,12 @@ virNumaGetMaxNode(void) > > return maxnodesNum; > } > + > +bool > +virNumaNodesetIsAvailable(virDomainNumatunePtr numatune) > +{ > + int maxGuestNode = virDomainNumatuneSpecifiedMaxNode(numatune); > + int maxHostNode = virNumaGetMaxNode(); > + > + return maxGuestNode <= maxHostNode; > +} > The reason the function needs to be in the conditionally compiled section is that the function uses the NUMA_NUM_NODES macro. The rest of the used symbols has a stub and/or is already mocked. So we need to mock this too unfortunately. ACK Peter
Attachment:
signature.asc
Description: OpenPGP digital signature
-- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list