On Thu, May 12, 2016 at 14:36:22 +0200, Michal Privoznik wrote:
The intent is that this library is going to be called every time
to check if we are not touching anything outside srcdir or
builddir.
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
cfg.mk | 2 +-
tests/Makefile.am | 13 +++-
tests/testutils.c | 9 +++
tests/testutils.h | 10 +--
tests/vircgroupmock.c | 15 ++---
tests/virpcimock.c | 14 ++--
tests/virtestmock.c | 175 ++++++++++++++++++++++++++++++++++++++++++++++++++
7 files changed, 210 insertions(+), 28 deletions(-)
create mode 100644 tests/virtestmock.c
[...]
diff --git a/tests/testutils.c b/tests/testutils.c
index 79d0763..595b64d 100644
--- a/tests/testutils.c
+++ b/tests/testutils.c
[...]
@@ -842,6 +845,12 @@ int virtTestMain(int argc,
char *oomstr;
#endif
+#ifdef __linux__
+ VIRT_TEST_PRELOAD(TEST_MOCK);
So I was thinking about it a bit. I think we should pre-load this only
conditionally on a ENV var which will enable it.
This is due to the fact that the checker is not always run and still
requires the test suite to be re-run. (at least how make check-access is
implemented).
As this will be experimental for a while until we fix the tests or add
more stuff to the whitelist I think that would be a good compromise to
have this in the tree and not breaking anything.
With that I think this series can be ACKed.
Peter