[libvirt] [PATCH v4 0/8] tests: Introduce global mock library

Michal Privoznik mprivozn at redhat.com
Fri May 13 12:32:01 UTC 2016


diff to v3:
- Well, I've found out that we have virmock.h that can be used
  just for what Peter suggested earlier: have LOAD_SYM shared. To
  my surprise, we already have a macro just for that =
  VIR_MOCK_REAL_INIT.

- As agreed in v3, this feature is yet not enabled by default,
  but only if a env var is set. In order to do that, I have to
  write (hackish?) patch 5/8.

Michal Privoznik (8):
  virpcimock: Adapt to virmock.h
  vircgroupmock: Adapt to virmock.h
  nssmock: Adapt to virmock.h
  securityselinuxhelper: Adapt to virmock.h
  virmock.h: Introduce VIR_MOCK_CALL_STAT
  tests: Introduce global mock library
  virtestmock: Print invalid file accesses into a file
  tests: Introduce check-file-access.pl

 .gitignore                      |   1 +
 HACKING                         |  10 ++
 Makefile.am                     |   3 +
 cfg.mk                          |   2 +-
 docs/hacking.html.in            |  13 +++
 tests/Makefile.am               |  28 ++++-
 tests/check-file-access.pl      | 104 ++++++++++++++++++
 tests/file_access_whitelist.txt |  23 ++++
 tests/nssmock.c                 |  27 ++---
 tests/securityselinuxhelper.c   |  80 ++++++--------
 tests/testutils.c               |  30 ++++--
 tests/testutils.h               |  10 +-
 tests/vircgroupmock.c           |  83 ++++++---------
 tests/virmock.h                 |  33 ++++++
 tests/virpcimock.c              |  96 +++++++----------
 tests/virtestmock.c             | 226 ++++++++++++++++++++++++++++++++++++++++
 16 files changed, 583 insertions(+), 186 deletions(-)
 create mode 100755 tests/check-file-access.pl
 create mode 100644 tests/file_access_whitelist.txt
 create mode 100644 tests/virtestmock.c

-- 
2.8.1




More information about the libvir-list mailing list