Bug 1257059

Summary: qemu-iotests 099 failed for vmdk
Product: Red Hat Enterprise Linux 7 Reporter: mazhang <mazhang>
Component: qemu-kvm-rhevAssignee: Kevin Wolf <kwolf>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.2CC: huding, juzhang, knoel, kwolf, mazhang, michen, mrezanin, virt-maint, xfu
Target Milestone: rcKeywords: Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: qemu-kvm-rhev-2.3.0-23.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-12-04 16:54:45 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 mazhang 2015-08-26 07:57:23 UTC
Description of problem:
qemu-iotests 099 failed for vmdk

Version-Release number of selected component (if applicable):

Host:
qemu-kvm-rhev-2.3.0-19.el7.x86_64

How reproducible:
1/1

Steps to Reproduce:
1.Download qemu-kvm-rhev-2.3.0-19.el7.src.rpm, test vmdk.

#rpm2cpio qemu-kvm-rhev-2.3.0-19.el7.src.rpm|cpio -iv
#bzip2 -d qemu-2.3.0.tar.bz2 
#tar xvf qemu-2.3.0.tar 
#cd qemu-2.3.0/tests/qemu-iotests/
#export QEMU_PROG=/usr/libexec/qemu-kvm
#./check -vmdk


Actual results:
Test case 099 failed.

QA output created by 099
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=131072
Formatting 'TEST_DIR/t.IMGFMT.compare', fmt=raw size=131072

=== Testing simple filename for blkverify ===

QEMU_PROG: -drive if=none,id=drv0,file=blkverify:TEST_DIR/t.IMGFMT.compare:TEST_DIR/t.IMGFMT: Driver 'blkverify' is not whitelisted

=== Testing filename reconstruction for blkverify ===

QEMU_PROG: -drive if=none,id=drv0,file.driver=blkverify,file.raw.filename=TEST_DIR/t.IMGFMT.compare,file.test.file.filename=TEST_DIR/t.IMGFMT: Driver 'blkverify' is not whitelisted

=== Testing JSON filename for blkdebug ===

QEMU_PROG: -drive if=none,id=drv0,file.driver=blkdebug,file.image.filename=TEST_DIR/t.IMGFMT,file.inject-error.0.event=l1_update: Driver 'IMGFMT' can only be used for read-only devices

=== Testing indirectly enforced JSON filename ===

QEMU_PROG: -drive if=none,id=drv0,file.driver=blkverify,file.raw.filename=TEST_DIR/t.IMGFMT.compare,file.test.file.driver=blkdebug,file.test.file.image.filename=TEST_DIR/t.IMGFMT,file.test.file.inject-error.0.event=l1_update: Driver 'blkverify' is not whitelisted

=== Testing plain filename for blkdebug ===

QEMU_PROG: -drive if=none,id=drv0,file.driver=blkdebug,file.config=TEST_DIR/blkdebug.conf,file.image.filename=TEST_DIR/t.IMGFMT: Driver 'IMGFMT' can only be used for read-only devices

=== Testing plain filename for blkdebug without configuration file ===

QEMU_PROG: -drive if=none,id=drv0,file.driver=blkdebug,file.image.filename=TEST_DIR/t.IMGFMT: Driver 'IMGFMT' can only be used for read-only devices
*** done



Expected results:


Additional info:

Comment 2 Fam Zheng 2015-09-06 08:55:28 UTC
The error "Driver 'blkverify' is not whitelisted" means that you need to compile QEMU locally without excluding blkverify driver. In other words, the iotests doesn't work with the qemu-kvm binary that comes with rpm.

Comment 3 Kevin Wolf 2015-09-07 08:05:39 UTC
The whole point of having a downstream qemu-iotests is testing our RPMs. We
simply need to disable test 099, like we already disabled 071.

This is a trivial one-liner and cannot possibly break anything because it is in
a file that isn't even shipped but only used internally for QA, so I'll send
the patch and move this back to 7.2, so I won't have to look at this again in
the 7.3 cycle.

Comment 4 Miroslav Rezanina 2015-09-15 10:50:47 UTC
Fix included in qemu-kvm-rhev-2.3.0-23.el7

Comment 5 huiqingding 2015-09-18 06:06:25 UTC
Reproduce this bug using the version:
kernel-3.10.0-316.el7.x86_64
qemu-kvm-rhev-2.3.0-22.el7.x86_64

1. download qemu-kvm-rhev-2.3.0-22.el7.src.rpm
2. # rpmbuild -bp --nodeps qemu-kvm-rhev-2.3.0-22.el7.src.rpm
3. # cd /root/rpmbuild/BUILD/qemu-2.3.0/tests/qemu-iotests
4. # export QEMU_PROG=/usr/libexec/qemu-kvm
5. #./check -vmdk

Test case 099 failed:
099         - output mismatch (see 099.out.bad)
--- /root/rpmbuild/BUILD/qemu-2.3.0/tests/qemu-iotests/099.out	2015-04-27 22:08:28.000000000 +0800
+++ 099.out.bad	2015-09-18 13:53:52.828601716 +0800
@@ -4,25 +4,25 @@
 
 === Testing simple filename for blkverify ===
 
-blkverify:TEST_DIR/t.IMGFMT.compare:TEST_DIR/t.IMGFMT
+QEMU_PROG: -drive if=none,id=drv0,file=blkverify:TEST_DIR/t.IMGFMT.compare:TEST_DIR/t.IMGFMT: Driver 'blkverify' is not whitelisted
 
 === Testing filename reconstruction for blkverify ===
 
-blkverify:TEST_DIR/t.IMGFMT.compare:TEST_DIR/t.IMGFMT
+QEMU_PROG: -drive if=none,id=drv0,file.driver=blkverify,file.raw.filename=TEST_DIR/t.IMGFMT.compare,file.test.file.filename=TEST_DIR/t.IMGFMT: Driver 'blkverify' is not whitelisted
 
 === Testing JSON filename for blkdebug ===
 
-json:{"driver": "IMGFMT", "file": {"image": {"driver": "file", "filename": "TEST_DIR/t.IMGFMT"}, "driver": "blkdebug", "inject-error.0.event": "l1_update"}}
+QEMU_PROG: -drive if=none,id=drv0,file.driver=blkdebug,file.image.filename=TEST_DIR/t.IMGFMT,file.inject-error.0.event=l1_update: Driver 'IMGFMT' can only be used for read-only devices
 
 === Testing indirectly enforced JSON filename ===
 
-json:{"driver": "raw", "file": {"test": {"driver": "IMGFMT", "file": {"image": {"driver": "file", "filename": "TEST_DIR/t.IMGFMT"}, "driver": "blkdebug", "inject-error.0.event": "l1_update"}}, "driver": "blkverify", "raw": {"driver": "file", "filename": "TEST_DIR/t.IMGFMT.compare"}}}
+QEMU_PROG: -drive if=none,id=drv0,file.driver=blkverify,file.raw.filename=TEST_DIR/t.IMGFMT.compare,file.test.file.driver=blkdebug,file.test.file.image.filename=TEST_DIR/t.IMGFMT,file.test.file.inject-error.0.event=l1_update: Driver 'blkverify' is not whitelisted
 
 === Testing plain filename for blkdebug ===
 
-blkdebug:TEST_DIR/blkdebug.conf:TEST_DIR/t.IMGFMT
+QEMU_PROG: -drive if=none,id=drv0,file.driver=blkdebug,file.config=TEST_DIR/blkdebug.conf,file.image.filename=TEST_DIR/t.IMGFMT: Driver 'IMGFMT' can only be used for read-only devices
 
 === Testing plain filename for blkdebug without configuration file ===
 
-blkdebug::TEST_DIR/t.IMGFMT
+QEMU_PROG: -drive if=none,id=drv0,file.driver=blkdebug,file.image.filename=TEST_DIR/t.IMGFMT: Driver 'IMGFMT' can only be used for read-only devices
 *** done

Comment 6 huiqingding 2015-09-18 06:08:52 UTC
Verify this bug using the version:
kernel-3.10.0-316.el7.x86_64
qemu-kvm-rhev-2.3.0-23.el7.x86_64

1. download qemu-kvm-rhev-2.3.0-23.el7.src.rpm
2. # rpmbuild -bp --nodeps qemu-kvm-rhev-2.3.0-23.el7.src.rpm
3. # cd /root/rpmbuild/BUILD/qemu-2.3.0/tests/qemu-iotests
4. # export QEMU_PROG=/usr/libexec/qemu-kvm
5. #./check -vmdk
Test case 099 is disabled as following:
094         [not run] not suitable for this image protocol: file
095         [not run] not suitable for this image format: vmdk
097         [not run] not suitable for this image format: vmdk
098         [not run] not suitable for this image format: vmdk
100        
101         [not run] not suitable for this image format: vmdk


Based on the above result, I think this bug has been fixed.

Comment 7 juzhang 2015-09-21 03:02:44 UTC
According to comment5 and comment6, set this issue as verified.

Comment 9 errata-xmlrpc 2015-12-04 16:54:45 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2015-2546.html