]> git.ipfire.org Git - thirdparty/libvirt.git/commit
tests: Introduce qemucapabilitiestest
authorMichal Privoznik <mprivozn@redhat.com>
Thu, 19 Sep 2013 11:44:41 +0000 (13:44 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Tue, 1 Oct 2013 09:13:36 +0000 (11:13 +0200)
commit63857eb4a0ce6334091069a54c0b8eb11ad5a5e2
treefb36ffba3f271c2b8c4eb2e5a2dc29076a0d5b5a
parentbd958586ec5c4a5905114f2bab9cedd958ef5a2f
tests: Introduce qemucapabilitiestest

This test is there to ensure that our capabilities detection code isn't
broken somehow.

How to gather test data:

Firstly, the data is split into two separate files. The former (with
suffix .replies) contains all the qemu replies. This is very fragile as
introducing a new device can mean yet another monitor command and hence
edit of this file in the future. But there's no better way of doing
this. To get this data simply turn on debug logs and copy all the
QEMU_MONITOR_IO_PROCESS lines. But be careful to not copy incomplete
ones (yeah, we report some incomplete lines too). Long story short, at
the libvirtd startup, a dummy qemu is spawn to get all the capabilities.

The latter (with suffix .caps) contains capabilities XML. Just start a
domain and copy the corresponding part from its state XML file.
Including <qemuCaps> tag.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
.gitignore
tests/Makefile.am
tests/qemucapabilitiesdata/caps_1.5.3-1.caps [new file with mode: 0644]
tests/qemucapabilitiesdata/caps_1.5.3-1.replies [new file with mode: 0644]
tests/qemucapabilitiestest.c [new file with mode: 0644]