Signed-off-by: Hu Tao <hutao(a)cn.fujitsu.com>
---
resize/test-virt-resize.sh | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/resize/test-virt-resize.sh b/resize/test-virt-resize.sh
index 9a1c24f..d80de0e 100755
--- a/resize/test-virt-resize.sh
+++ b/resize/test-virt-resize.sh
@@ -60,3 +60,20 @@ $VG virt-resize -d --debug-gc \
test-virt-resize-1.img test-virt-resize-2.img
rm test-virt-resize-1.img test-virt-resize-2.img
+
+# Test resizing MBR logical partitions
+#
+# This tests resizing and expanding MBR logical partitions, along with
+# a primary partition.
+guestfish -N disk <<EOF
+part-init /dev/sda mbr
+part-add /dev/sda p 64 255
+part-add /dev/sda p 256 1024
+part-add /dev/sda extended 1026 4096
+part-add /dev/sda logical 1028 2048
+part-add /dev/sda logical 2050 4096
+EOF
+truncate -s 1G test2.img
+virt-resize --expand /dev/sda5 --resize /dev/sda6=+1000% --resize /dev/sda1=+200%
test1.img test2.img
+
+rm test1.img test2.img
--
1.9.3