mbox series

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

Message ID cover.1549665763.git.crobinso@redhat.com
Headers show
Series libxl: override HAVE_PVUSB in test suite | expand

Message

Cole Robinson Feb. 8, 2019, 10:47 p.m. UTC
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

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Comments

Ján Tomko Feb. 11, 2019, 9:20 a.m. UTC | #1
On Fri, Feb 08, 2019 at 05:47:09PM -0500, Cole Robinson wrote:
>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%)

>


Reviewed-by: Ján Tomko <jtomko@redhat.com>


Jano
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list