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

Cole Robinson posted 4 patches 5 years, 1 month ago
Test syntax-check passed
Failed in applying to current master (apply log)
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%)
[libvirt] [PATCH 0/4] libxl: override HAVE_PVUSB in test suite
Posted by Cole Robinson 5 years, 1 month ago
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
Re: [libvirt] [PATCH 0/4] libxl: override HAVE_PVUSB in test suite
Posted by Ján Tomko 5 years, 1 month ago
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