]> git.ipfire.org Git - thirdparty/libvirt.git/commit
tests: Create full host NUMA topology in more cases
authorAndrea Bolognani <abologna@redhat.com>
Tue, 10 Apr 2018 15:42:14 +0000 (17:42 +0200)
committerAndrea Bolognani <abologna@redhat.com>
Thu, 19 Apr 2018 15:57:52 +0000 (17:57 +0200)
commit4fe4ffdbdf67161cb570b8378e03b8af2855028e
treed99dcde98e61425a77e27c39cfe04147b92ad324
parent888aa4b6b9db65e3db273341e79846d8aaa12de1
tests: Create full host NUMA topology in more cases

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@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
tests/testutils.c
tests/testutils.h
tests/testutilsqemu.c
tests/vircapstest.c