Skip to content

Commit

Permalink
resize: Fix --output-format flag (RHBZ#798196).
Browse files Browse the repository at this point in the history
Update the test to use the --format and --output-format flags.
  • Loading branch information
rwmjones committed Feb 28, 2012
1 parent a93d4a9 commit 88ba4da
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion resize/resize.ml
Expand Up @@ -98,7 +98,7 @@ let infile, outfile, align_first, alignment, copy_boot_loader,
"--dryrun", Arg.Set dryrun, " -\"-";
"--dry-run", Arg.Set dryrun, " -\"-";
"--ntfsresize-force", Arg.Set ntfsresize_force, " Force ntfsresize";
"--output-format", Arg.Set_string format, "format Format of output disk";
"--output-format", Arg.Set_string output_format, "format Format of output disk";
"-q", Arg.Set quiet, " Don't print the summary";
"--quiet", Arg.Set quiet, " -\"-";
"--resize", Arg.String (add resizes), "part=size Resize partition";
Expand Down
11 changes: 9 additions & 2 deletions resize/test-virt-resize.sh
Expand Up @@ -27,7 +27,11 @@ set -e
../fish/guestfish -N bootrootlv:/dev/VG/LV:ext2:ext4:400M:32M:gpt </dev/null

qemu-img create -f qcow2 test2.img 500M
$VG ./virt-resize -d --debug-gc --expand /dev/sda2 --lv-expand /dev/VG/LV test1.img test2.img
$VG ./virt-resize -d --debug-gc \
--expand /dev/sda2 \
--lv-expand /dev/VG/LV \
--format raw --output-format qcow2 \
test1.img test2.img

# Test shrinking in a semi-realistic scenario. Although the disk
# image created above contains no data, we will nevertheless use
Expand All @@ -42,6 +46,9 @@ fsck ext4 /dev/VG/LV
EOF

rm -f test2.img; truncate -s 300M test2.img
$VG ./virt-resize -d --debug-gc --shrink /dev/sda2 test1.img test2.img
$VG ./virt-resize -d --debug-gc \
--shrink /dev/sda2 \
--format raw --output-format raw \
test1.img test2.img

rm -f test1.img test2.img

0 comments on commit 88ba4da

Please sign in to comment.