[libvirt] [PATCH 0/3] Improve support for mocking APIs in tests

Daniel P. Berrange berrange at redhat.com
Fri Mar 21 11:31:19 UTC 2014


This short series introduces some helpers for mocking tests,
provides a generic DBus mock helper using them and switches
the systemd test to use these helpers. This will remove much
code duplication in a later firewall test.

Daniel P. Berrange (3):
  Introduce a new set of helper macros for mocking symbols
  Create a re-usable DBus LD_PRELOAD mock library
  Switch systemd test to use generic dbus mock

 tests/Makefile.am      |  23 +++--
 tests/virmock.h        | 264 +++++++++++++++++++++++++++++++++++++++++++++++++
 tests/virmockdbus.c    |  64 ++++++++++++
 tests/virsystemdmock.c | 132 -------------------------
 tests/virsystemdtest.c |  86 +++++++++++++++-
 5 files changed, 422 insertions(+), 147 deletions(-)
 create mode 100644 tests/virmock.h
 create mode 100644 tests/virmockdbus.c
 delete mode 100644 tests/virsystemdmock.c

-- 
1.8.5.3




More information about the libvir-list mailing list