Pino Toscano
2019-Mar-26 13:24 UTC
[Libguestfs] [PATCH 1/3] v2v: tests: add debian-9 and fedora-29 for test-v2v-conversion-of
Test the newer versions of these distros. --- v2v/Makefile.am | 2 ++ 1 file changed, 2 insertions(+) diff --git a/v2v/Makefile.am b/v2v/Makefile.am index 53c137fc6..39511022e 100644 --- a/v2v/Makefile.am +++ b/v2v/Makefile.am @@ -530,8 +530,10 @@ real_guests_scripts = \ test-v2v-conversion-of-debian-6.sh \ test-v2v-conversion-of-debian-7.sh \ test-v2v-conversion-of-debian-8.sh \ + test-v2v-conversion-of-debian-9.sh \ test-v2v-conversion-of-fedora-20.sh \ test-v2v-conversion-of-fedora-23.sh \ + test-v2v-conversion-of-fedora-29.sh \ test-v2v-conversion-of-opensuse-13.1.sh \ test-v2v-conversion-of-opensuse-13.2.sh \ test-v2v-conversion-of-opensuse-42.1.sh \ -- 2.20.1
Pino Toscano
2019-Mar-26 13:24 UTC
[Libguestfs] [PATCH 2/3] v2v: test-v2v-conversion-of.sh: update the guest
Make sure the create guest is always up-to-date: this way it is possible
to test the conversion even taking into account the latest upgrades
available.
---
v2v/test-v2v-conversion-of.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/v2v/test-v2v-conversion-of.sh b/v2v/test-v2v-conversion-of.sh
index 29c1eb4bb..48d7ce88d 100755
--- a/v2v/test-v2v-conversion-of.sh
+++ b/v2v/test-v2v-conversion-of.sh
@@ -57,7 +57,7 @@ case "$guestname" in
esac
# Build a guest (using virt-builder).
-virt-builder "$guestname" --quiet -o "$disk"
"${extra[@]}"
+virt-builder "$guestname" --quiet -o "$disk"
"${extra[@]}" --update
# Create some minimal test metadata.
cat > "$xml" <<EOF
--
2.20.1
Pino Toscano
2019-Mar-26 13:24 UTC
[Libguestfs] [PATCH 3/3] 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.
---
v2v/test-v2v-conversion-of.sh | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/v2v/test-v2v-conversion-of.sh b/v2v/test-v2v-conversion-of.sh
index 48d7ce88d..c9a595b34 100755
--- a/v2v/test-v2v-conversion-of.sh
+++ b/v2v/test-v2v-conversion-of.sh
@@ -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}')"
--
2.20.1
Richard W.M. Jones
2019-Mar-26 13:47 UTC
Re: [Libguestfs] [PATCH 2/3] v2v: test-v2v-conversion-of.sh: update the guest
On Tue, Mar 26, 2019 at 02:24:15PM +0100, Pino Toscano wrote:> Make sure the create guest is always up-to-date: this way it is possible > to test the conversion even taking into account the latest upgrades > available. > --- > v2v/test-v2v-conversion-of.sh | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/v2v/test-v2v-conversion-of.sh b/v2v/test-v2v-conversion-of.sh > index 29c1eb4bb..48d7ce88d 100755 > --- a/v2v/test-v2v-conversion-of.sh > +++ b/v2v/test-v2v-conversion-of.sh > @@ -57,7 +57,7 @@ case "$guestname" in > esac > > # Build a guest (using virt-builder). > -virt-builder "$guestname" --quiet -o "$disk" "${extra[@]}" > +virt-builder "$guestname" --quiet -o "$disk" "${extra[@]}" --update > > # Create some minimal test metadata. > cat > "$xml" <<EOF > -- > 2.20.1ACK series. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-top is 'top' for virtual machines. Tiny program with many powerful monitoring features, net stats, disk stats, logging, etc. http://people.redhat.com/~rjones/virt-top
Maybe Matching Threads
- [PATCH 1/3] v2v: tests: add debian-9 and fedora-29 for test-v2v-conversion-of
- [PATCH v2 3/3] v2v: tests: test paths for installation of linux guest tools
- Re: [PATCH] v2v: -o json: add a simple test for it
- [PATCH] v2v: -o json: add a simple test for it
- Re: [PATCH 3/3] v2v: add -o json output mode