3 # virt-resize does not work on 32 bit because of limitations in Perl
4 # so short-circuit this test on a 32 bit host.
5 perl -e 'exit 1 if ~1 == 4294967294' || {
6 echo "$0: Skipping this test on 32 bit."
15 # This exercises a number of interesting codepaths including resizing
16 # LV content, handling GPT, and using qcow2 as a target.
18 ../fish/guestfish -N bootrootlv:/dev/VG/LV:ext2:ext4:400M:32M:gpt </dev/null
20 qemu-img create -f qcow2 test2.img 500M
21 ./virt-resize -d --expand /dev/sda2 --lv-expand /dev/VG/LV test1.img test2.img
23 # Test shrinking in a semi-realistic scenario. Although the disk
24 # image created above contains no data, we will nevertheless use
25 # similar operations to ones that might be used by a real admin.
27 ../fish/guestfish -a test1.img <<EOF
29 resize2fs-size /dev/VG/LV 190M
30 lvresize /dev/VG/LV 190
31 pvresize-size /dev/sda2 200M
35 rm -f test2.img; truncate -s 300M test2.img
36 ./virt-resize -d --shrink /dev/sda2 test1.img test2.img
38 rm -f test1.img test2.img