Bug 992943

Summary: qemu-img resize can execute successfully even input invalid syntax
Product: Red Hat Enterprise Linux 6 Reporter: juzhang <juzhang>
Component: qemu-kvmAssignee: Kevin Wolf <kwolf>
Status: CLOSED WONTFIX QA Contact: Virtualization Bugs <virt-bugs>
Severity: low Docs Contact:
Priority: low    
Version: 6.5CC: acathrow, bsarathy, juzhang, kwolf, michen, mkenneth, qzhang, sluo, virt-maint
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-09-18 09:22:59 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description juzhang 2013-08-05 09:07:35 UTC
Description of problem:
qemu-img resize can execute successfully even input invalid syntax

Version-Release number of selected component (if applicable):
qemu-img-rhev-0.12.1.2-2.381.el6.x86_64

How reproducible:
100%

Steps to Reproduce:
1.Create 10G raw iamge
#qemu-img create -f raw 10G.raw 10G
Formatting '10G.raw', fmt=raw size=10737418240
2.Check the raw image
#qemu-img info 10G.raw
image: 10G.raw
file format: raw
virtual size: 10G (10737418240 bytes)
disk size: 0
3.Enlarge 20G by using qemu-img resize but using wrong invalid syntax
#qemu-img resize 10G.raw + 20G
Image resized.
4. Recheck the raw image
#qemu-img info 10G.raw
image: 10G.raw
file format: raw
virtual size: 10G (10737418240 bytes)
disk size: 0


Actual results:
The image size still keeps 10G.
#qemu-img info 10G.raw
image: 10G.raw
file format: raw
virtual size: 10G (10737418240 bytes)
disk size: 0


Expected results:
It should error out if hit invalid syntax


Additional info:
From QE POV, It's ok to close this bug as wont fix if develop think this scenario is pretty rare to end user or no harm to the end user. Set this bug as low and low

Comment 2 Ademar Reis 2013-08-12 22:34:04 UTC
Kevin: WONTFIX for RHEL6, but probably worth fixing upstream. I'll leave it open until you check it.

Comment 3 Kevin Wolf 2013-09-18 09:22:59 UTC
This is fixed in upstream and RHEL 7. As per comment 2, we're not going to
include the fix in RHEL 6, so I'm closing the bug now.