Re: [PATCH 22/23] tests: Add virnumamock

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---
 tests/Makefile.am   |   7 ++
 tests/virnumamock.c | 191 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 198 insertions(+)
 create mode 100644 tests/virnumamock.c

Michal

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]
  Powered by Linux