From: Richard W.M. Jones Date: Mon, 27 Sep 2010 16:06:14 +0000 (+0100) Subject: Add test for virt-resize. X-Git-Tag: 1.5.21~2 X-Git-Url: http://git.annexia.org/?a=commitdiff_plain;h=c6c030b64bab98602363485cb62a9e1d847d570e;p=libguestfs.git Add test for virt-resize. This tests a number of things which have caused problems for us: - resizing PVs and LV content - handling GPT format disks - using qcow2 as a target disk format - shrinking disk images Note that the disk content is empty (not a real VM), but this is adequate since all we want to test are the operations and calculations done by virt-resize. We are not interested here in whether e2fsprogs and LVM actually works. --- diff --git a/tools/Makefile.am b/tools/Makefile.am index ab14fe0..b92243c 100644 --- a/tools/Makefile.am +++ b/tools/Makefile.am @@ -86,6 +86,7 @@ TESTS = test-virt-cat.sh \ test-virt-list-filesystems.sh \ test-virt-ls.sh \ test-virt-make-fs.sh \ + test-virt-resize.sh \ test-virt-tar.sh endif diff --git a/tools/test-virt-resize.sh b/tools/test-virt-resize.sh new file mode 100755 index 0000000..75d5147 --- /dev/null +++ b/tools/test-virt-resize.sh @@ -0,0 +1,31 @@ +#!/bin/bash - + +export LANG=C +set -e + +# Test expanding. +# +# This exercises a number of interesting codepaths including resizing +# LV content, handling GPT, and using qcow2 as a target. + +../fish/guestfish -N bootrootlv:/dev/VG/LV:ext2:ext4:400M:32M:gpt