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: NAndrea Bolognani <abologna@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
Showing
想要评论请 注册 或 登录