[libvirt] [PATCH 22/23] tests: Add virnumamock
Michal Privoznik
mprivozn at redhat.com
Mon Mar 27 07:58:01 UTC 2017
On 24.03.2017 20:00, Martin Kletzander wrote:
> All mocked functions are related to numactl/virNuma and rely only on
> virsysfs, so the paths they touch can be nicely controlled. And
> because it is so nicely self-contained NUMA mock, it is named
> numamock (instead of naming it after the test that will use it first).
I'd also mention that we need the top level API mock, because some APIs
might call libnuma API directly, e.g. virNumaIsAvailable(),
virNumaGetMaxNode(), and so on. It took me a while to realize why you're
not mocking just where src/util/virnuma gets the info from.
>
> Signed-off-by: Martin Kletzander <mkletzan at redhat.com>
> ---
> tests/Makefile.am | 7 ++
> tests/virnumamock.c | 191 ++++++++++++++++++++++++++++++++++++++++++++++++++++
> 2 files changed, 198 insertions(+)
> create mode 100644 tests/virnumamock.c
Michal
More information about the libvir-list
mailing list