[libvirt] [PATCH v2 1/2] tests: Create full host NUMA topology in more cases

Ján Tomko jtomko at redhat.com
Thu Apr 19 15:18:12 UTC 2018


On Thu, Apr 19, 2018 at 04:19:38PM +0200, Andrea Bolognani wrote:
>vircapstest has code to add a full host NUMA topology, that
>is, one that includes all information about nodes and CPUs
>including IDs; testQemuCapsInit(), which is used to create a
>mock virCapsPtr for QEMU tests, however, just fakes it by
>setting nnumaCell_max to some number.
>
>While the latter approach has served us well so far, we're
>going to need all the information to be filled in soon. In
>order to do that, we can just move the existing code from
>vircapstest to testutils and, with some renaming and
>trivial tweaking, use it as-is.
>
>Interestingly, the NUMA topology generated by the function
>is rigged up so that the NUMA nodes aren't (necessarily)
>numbered starting from 0, which is a nice way to spot
>mistaken assumptions in our codebase.
>
>Signed-off-by: Andrea Bolognani <abologna at redhat.com>
>---
> tests/testutils.c     | 51 +++++++++++++++++++++++++++++++++++++++
> tests/testutils.h     |  2 ++
> tests/testutilsqemu.c |  7 +++++-
> tests/vircapstest.c   | 66 ++++-----------------------------------------------
> 4 files changed, 64 insertions(+), 62 deletions(-)
>

Reviewed-by: Ján Tomko <jtomko at redhat.com>

Jano
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20180419/acc062bd/attachment-0001.sig>


More information about the libvir-list mailing list