v2v: test-v2v-conversion-of.sh: basic check for libvirt XML

Use virt-xml-validate to check that the libvirt XML is actually valid,
at least regarding its schema.
This commit is contained in:
Pino Toscano
2019-03-26 14:22:38 +01:00
parent 831f3c06b9
commit c0a78ea844

View File

@@ -81,10 +81,13 @@ EOF
virt-v2v --debug-gc -i libvirtxml "$xml" -o local -os "$os"
# Test the libvirt XML metadata and a disk was created.
# XXX We should check the XML.
test -f "$os/$guestname.xml"
test -f "$os/$guestname-sda"
# Test the libvirt XML is valid.
# XXX This does not check bits depending on the QEMU version.
virt-xml-validate "$os/$guestname.xml"
# Test the disk has a similar size to the original.
size_before="$(du $disk | awk '{print $1}')"
size_after="$(du $os/$guestname-sda | awk '{print $1}')"