On 01/17/2014 08:31 AM, Francesco Romani wrote:
the test is loosely inspired from qemucapabilitiestest
and qemuxml2xmltest.
Added a new test instead of extending an existing one because
the feature being tested don't really fits nicely in any
s/don't/doesn't/ s/fits/fit/
existing place.
---
.gitignore | 1 +
tests/Makefile.am | 10 +-
tests/qemucaps2xmldata/all_1.6.0-1.caps | 142 ++++++++++++++
tests/qemucaps2xmldata/all_1.6.0-1.xml | 51 +++++
tests/qemucaps2xmldata/nodisksnapshot_1.6.0-1.caps | 141 +++++++++++++
tests/qemucaps2xmldata/nodisksnapshot_1.6.0-1.xml | 51 +++++
tests/qemucaps2xmltest.c | 217 +++++++++++++++++++++
7 files changed, 612 insertions(+), 1 deletion(-)
create mode 100644 tests/qemucaps2xmldata/all_1.6.0-1.caps
create mode 100644 tests/qemucaps2xmldata/all_1.6.0-1.xml
create mode 100644 tests/qemucaps2xmldata/nodisksnapshot_1.6.0-1.caps
create mode 100644 tests/qemucaps2xmldata/nodisksnapshot_1.6.0-1.xml
create mode 100644 tests/qemucaps2xmltest.c
Fails 'make check' for me:
$ make -C tests check TESTS=qemucaps2xmltest \
VERBOSE=yes VIR_TEST_DEBUG=1
...
TEST: qemucaps2xmltest
1) all_1.6.0-1 ...
Offset 393
Expect [6</machine>
<machine>none</machine>
<machine canonical='pc-i440fx-1.6'>pc</machine>
<machine>pc-i440fx-1.5</machine>
<machine>pc-i440fx-1.4</machine>
...
Actual [7</machine>
<machine>none</machine>
<machine canonical='pc-i440fx-1.7'>pc</machine>
<machine>pc-i440fx-1.6</machine>
<machine>pc-i440fx-1.5</machine>
which means you wrote the test by probing the installed qemu, instead of
our testsuite helper binary, and my installed qemu 1.7 differs from your
setup of 1.6. That has to be fixed before this can be applied.
+++ b/tests/qemucaps2xmltest.c
@@ -0,0 +1,217 @@
+/*
+
+ virQEMUCapsCacheAdd(cache, "kvm", qemuCaps);
+ virQEMUCapsCacheAdd(cache, "qemu", qemuCaps);
+ virQEMUCapsCacheAdd(cache, "qemu-system-x86_64", qemuCaps);
+ virQEMUCapsCacheAdd(cache, "qemu-system-i386", qemuCaps);
+ virQEMUCapsCacheAdd(cache, "/usr/bin/qemu-system-x86_64", qemuCaps);
+ virQEMUCapsCacheAdd(cache, "/usr/bin/qemu-system-i386", qemuCaps);
Is this where the testsuite ended up probing the installed file system
instead of using only data from the testsuite?
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library
http://libvirt.org