]> git.ipfire.org Git - thirdparty/libvirt.git/commit
Introduce a new set of helper macros for mocking symbols
authorDaniel P. Berrange <berrange@redhat.com>
Tue, 11 Mar 2014 17:48:10 +0000 (17:48 +0000)
committerDaniel P. Berrange <berrange@redhat.com>
Tue, 8 Apr 2014 10:03:54 +0000 (11:03 +0100)
commit442ba493516fde76f505729e797739b821e6bf8e
tree31feaac46f7a64b2c58028586ba5c026baa5a43b
parent79bef03a2ca8a8fd570f3f8bfd4aa35c68527f4a
Introduce a new set of helper macros for mocking symbols

Introduce virmock.h which provides some macros to assist in
creation of LD_PRELOAD overrides. When these are used, the
LD_PRELOAD code simply has some stubs which forward to a
wrapper function inside the main test case. This means that
logic for the test no longer has to be split between the
virXXXtest.c and virXXXmock.c files. It will also make it
possible to provide some common reusable modules for mocking
code like DBus.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
tests/Makefile.am
tests/virmock.h [new file with mode: 0644]