[libvirt] [PATCH 0/4] libxl: override HAVE_PVUSB in test suite

Cole Robinson crobinso at redhat.com
Fri Feb 8 22:47:09 UTC 2019


There's two different domain capabilities test cases for libxl,
depending on whether host libxl supports PVUSB or not. This causes
pain when extending domain capabilities XML, because at least one
file always needs to be updated by hand.

This series adds a wrapper function for checking PVUSB, and adjusts
the libxl driver to use it when building domaincapabilities output.
We then mock the new function in the test suite to always return
true, and ditch the !PVUSB test cases

Cole Robinson (4):
  tests: Rename virmocklibxl.c -> libxlmock.c
  tests: Create a shared library with libxl driver
  libxl: Break out libxlCapsHasPVUSB
  tests: domcaps: Remove dependency on libxl PVUSB support

 src/libxl/libxl_capabilities.c                | 16 +++-
 src/libxl/libxl_capabilities.h                |  1 +
 tests/Makefile.am                             | 22 +++---
 tests/domaincapsmock.c                        | 11 +++
 .../domaincapsschemadata/libxl-xenfv-usb.xml  | 78 -------------------
 tests/domaincapsschemadata/libxl-xenfv.xml    |  1 +
 .../domaincapsschemadata/libxl-xenpv-usb.xml  | 68 ----------------
 tests/domaincapsschemadata/libxl-xenpv.xml    |  1 +
 tests/domaincapstest.c                        | 12 +--
 tests/{virmocklibxl.c => libxlmock.c}         |  2 +-
 tests/libxlxml2domconfigtest.c                |  2 +-
 11 files changed, 43 insertions(+), 171 deletions(-)
 delete mode 100644 tests/domaincapsschemadata/libxl-xenfv-usb.xml
 delete mode 100644 tests/domaincapsschemadata/libxl-xenpv-usb.xml
 rename tests/{virmocklibxl.c => libxlmock.c} (98%)

-- 
2.20.1




More information about the libvir-list mailing list