[libvirt] [PATCH 0/2] bhyve: add xml2args unittest

Roman Bogorodskiy bogorodskiy at gmail.com
Thu Mar 20 17:28:24 UTC 2014


Add testing for xml -> args generation. It's largely based on the
similar test for qemu. As it's my first experience with unit testing
in libvirt and in unit testing in C in general, I'm not sure I haven't
miss some important pieces, but it works as expected for me.

I'm also not sure about the license headers: some tests have them, 
some don't, so I decided not to add them for now. 

Roman Bogorodskiy (2):
  Move virBhyveTapGetRealDeviceName to virnetdevtap
  bhyve: add xml2args unittest

 src/bhyve/bhyve_command.c                          |  70 +---------
 src/libvirt_private.syms                           |   1 +
 src/util/virnetdevtap.c                            |  78 +++++++++++
 src/util/virnetdevtap.h                            |   3 +
 tests/Makefile.am                                  |  25 ++++
 .../bhyvexml2argvdata/bhyvexml2argv-acpiapic.args  |   2 +
 tests/bhyvexml2argvdata/bhyvexml2argv-acpiapic.xml |  24 ++++
 tests/bhyvexml2argvdata/bhyvexml2argv-base.args    |   2 +
 tests/bhyvexml2argvdata/bhyvexml2argv-base.xml     |  20 +++
 .../bhyvexml2argv-disk-virtio.args                 |   2 +
 .../bhyvexml2argv-disk-virtio.xml                  |  20 +++
 tests/bhyvexml2argvmock.c                          |  38 +++++
 tests/bhyvexml2argvtest.c                          | 154 +++++++++++++++++++++
 13 files changed, 370 insertions(+), 69 deletions(-)
 create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-acpiapic.args
 create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-acpiapic.xml
 create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-base.args
 create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-base.xml
 create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-disk-virtio.args
 create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-disk-virtio.xml
 create mode 100644 tests/bhyvexml2argvmock.c
 create mode 100644 tests/bhyvexml2argvtest.c

-- 
1.8.4.2




More information about the libvir-list mailing list