Bug 1121586 - solve "qemu-iotests/qemu-io: unrecognized option '--cache'" for vmdk in qemu-iotests suite
Summary: solve "qemu-iotests/qemu-io: unrecognized option '--cache'" for vmdk in qemu-...
Keywords:
Status: CLOSED DUPLICATE of bug 1122410
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: qemu-kvm
Version: 6.5
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Kevin Wolf
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On: 1122410
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-07-21 09:43 UTC by Sibiao Luo
Modified: 2014-07-25 12:56 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-07-25 12:56:06 UTC


Attachments (Terms of Use)

Description Sibiao Luo 2014-07-21 09:43:27 UTC
Description of problem:
Failed 25 of 25 tests if use qemu-iotests suit for vmdk format testing.

Version-Release number of selected component (if applicable):
host info:
# uname -r && rpm -q qemu-kvm-rhev
2.6.32-492.el6.x86_64
qemu-kvm-rhev-0.12.1.2-2.430.el6.x86_64

How reproducible:
100%

Steps to Reproduce:
1.download qemu-iotests suit from upstream.
url = git://git.qemu-project.org/qemu.git
2.configure the environment and test the vmdk format.
qemu-iotests]# ln -s /usr/libexec/qemu-kvm qemu
qemu-iotests]# ln -s /usr/bin/qemu-io .
qemu-iotests]# ln -s /usr/bin/qemu-img .
qemu-iotests]# ./check -vmdk

Actual results:
after step 2, Failed 25 of 25 tests with "+/home/qemu/tests/qemu-iotests/qemu-io: unrecognized option '--cache'"
QEMU          -- /home/qemu/tests/qemu-iotests/qemu
QEMU_IMG      -- /home/qemu/tests/qemu-iotests/qemu-img
QEMU_IO       -- /home/qemu/tests/qemu-iotests/qemu-io 
QEMU_NBD      -- 
IMGFMT        -- vmdk
IMGPROTO      -- file
PLATFORM      -- Linux/x86_64 intel-e5620-12-5 2.6.32-492.el6.x86_64
SOCKET_SCM_HELPER -- 

001         - output mismatch (see 001.out.bad)
--- /home/qemu/tests/qemu-iotests/001.out	2014-07-03 11:16:44.000000000 +0800
+++ 001.out.bad	2014-07-21 16:56:18.741994731 +0800
 -2,14 +2,53 @@
 Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728 
 
 == reading whole image ==
-read 134217728/134217728 bytes at offset 0
-128 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+/home/qemu/tests/qemu-iotests/qemu-io: unrecognized option '--cache'
+Usage: qemu-io [-h] [-V] [-Crsnm] [-c cmd] ... [file]
+QEMU Disk exerciser
+
+  -C, --create         create new file if it doesn't exist
+  -c, --cmd            command to execute
+  -r, --read-only      export read-only
+  -s, --snapshot       use snapshot file
+  -n, --nocache        disable host cache
+  -g, --growable       allow file to grow (only applies to protocols)
+  -m, --misalign       misalign allocations for O_DIRECT
+  -k, --native-aio     use kernel AIO implementation (on Linux only)
+  -h, --help           display this help and exit
+  -V, --version        output version information and exit
+
 
 == rewriting whole image ==
-wrote 134217728/134217728 bytes at offset 0
-128 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+/home/qemu/tests/qemu-iotests/qemu-io: unrecognized option '--cache'
+Usage: qemu-io [-h] [-V] [-Crsnm] [-c cmd] ... [file]
+QEMU Disk exerciser
+
+  -C, --create         create new file if it doesn't exist
+  -c, --cmd            command to execute
+  -r, --read-only      export read-only
+  -s, --snapshot       use snapshot file
+  -n, --nocache        disable host cache
+  -g, --growable       allow file to grow (only applies to protocols)
+  -m, --misalign       misalign allocations for O_DIRECT
+  -k, --native-aio     use kernel AIO implementation (on Linux only)
+  -h, --help           display this help and exit
+  -V, --version        output version information and exit
+
 
 == verify pattern ==
-read 134217728/134217728 bytes at offset 0
-128 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+/home/qemu/tests/qemu-iotests/qemu-io: unrecognized option '--cache'
+Usage: qemu-io [-h] [-V] [-Crsnm] [-c cmd] ... [file]
+QEMU Disk exerciser
+
+  -C, --create         create new file if it doesn't exist
+  -c, --cmd            command to execute
+  -r, --read-only      export read-only
+  -s, --snapshot       use snapshot file
+  -n, --nocache        disable host cache
+  -g, --growable       allow file to grow (only applies to protocols)
+  -m, --misalign       misalign allocations for O_DIRECT
+  -k, --native-aio     use kernel AIO implementation (on Linux only)
+  -h, --help           display this help and exit
+  -V, --version        output version information and exit
+
 *** done
002         - output mismatch (see 002.out.bad)
......

Expected results:
it should work well to test vmdk with qemu-iotests suit.

Additional info:
If i modified it as the http://pastebin.com/B0D2Gxce which looks better now.
    diff -uN /home/kwolf/source/qemu/tests/qemu-iotests/common ./common
    --- /home/kwolf/source/qemu/tests/qemu-iotests/common   2014-07-07 12:57:37.475776354 +0200
    +++ ./common    2014-07-21 11:12:41.599470777 +0200
    @@ -385,7 +385,7 @@
     done
     
     # Set qemu-io cache mode with $CACHEMODE we have
    -QEMU_IO_OPTIONS="$QEMU_IO_OPTIONS --cache $CACHEMODE"
    +QEMU_IO_OPTIONS="$QEMU_IO_OPTIONS -n"
     
     # Set default options for qemu-img create -o if they were not specified
     _set_default_imgopts
    diff -uN /home/kwolf/source/qemu/tests/qemu-iotests/common.rc ./common.rc
    --- /home/kwolf/source/qemu/tests/qemu-iotests/common.rc        2014-07-07 12:57:37.475776354 +0200
    +++ ./common.rc 2014-07-21 11:12:54.402649517 +0200
    @@ -418,7 +418,7 @@
     {
         if $CACHEMODE_IS_DEFAULT; then
             CACHEMODE="$1"
    -        QEMU_IO="$QEMU_IO --cache $1"
    +        QEMU_IO="$QEMU_IO -n"
             return
         fi
     }

Comment 1 Kevin Wolf 2014-07-21 15:40:29 UTC
I've started to do a backport of qemu-iotests to our RHEL 6 git tree, which is
the only way to provide you with a sane tool for testing. Basic things are
working, but now I need to go through each failing test case and figure out why
it doesn't work on RHEL 6. It's a good thing that this ends up being done, but
it likely means that it will still take a while until I can post the patches.

Comment 2 Qunfang Zhang 2014-07-23 08:50:45 UTC
(In reply to Kevin Wolf from comment #1)
> I've started to do a backport of qemu-iotests to our RHEL 6 git tree, which
> is
> the only way to provide you with a sane tool for testing. Basic things are
> working, but now I need to go through each failing test case and figure out
> why
> it doesn't work on RHEL 6. It's a good thing that this ends up being done,
> but
> it likely means that it will still take a while until I can post the patches.

Hi, Kevin

Thanks a lot for your effect!  Just want to confirm with you, when do you think we could get the backport in the internal RHEL6 code?  Asking this is because we are checking whether we could verify the RHEL6.6 bug 1004420 on time.  If we could not get the qemu-iotests before we start push errata, we need to discuss with you whether there's other method to verify bug 1004420. 

Thanks,
Qunfang

Comment 3 Kevin Wolf 2014-07-23 12:03:42 UTC
I am working on it, hoping to complete and send it out still this week. But I
can't promise it with absolute certainty. If you consider using what I have
before it was reviewed, I push the current work to:

git://git.engineering.redhat.com/users/kwolf/qemu-kvm-rhel6.git qemu-iotests

I made sure to fix test 060, which is what you need for bug 1004420, out of
order so that you can use this one already.

Note that I have modified the expected test output for the backport of this
test case. This means that running the test before it has seen review on the
rhvirt-patches list is equivalent to me saying "it's all fine" and only helps
you if you trust that I didn't make a mistake.

Comment 4 Qunfang Zhang 2014-07-24 01:35:21 UTC
Thanks for that, we will have a try with your code first. ;)

Comment 5 Sibiao Luo 2014-07-24 04:13:49 UTC
(In reply to Kevin Wolf from comment #3)
> I am working on it, hoping to complete and send it out still this week. But I
> can't promise it with absolute certainty. If you consider using what I have
> before it was reviewed, I push the current work to:
> 
> git://git.engineering.redhat.com/users/kwolf/qemu-kvm-rhel6.git qemu-iotests
> 
Hi Kevin Wolf, remote HEAD refers to nonexistent ref, unable to checkout.

# git clone git://git.engineering.redhat.com/users/kwolf/qemu-kvm-rhel6.git
Cloning into 'qemu-kvm-rhel6'...
remote: Counting objects: 125780, done.
remote: Compressing objects: 100% (26614/26614), done.
remote: Total 125780 (delta 96981), reused 124953 (delta 96167)
Receiving objects: 100% (125780/125780), 43.03 MiB | 221.00 KiB/s, done.
Resolving deltas: 100% (96981/96981), done.
warning: remote HEAD refers to nonexistent ref, unable to checkout.

> I made sure to fix test 060, which is what you need for bug 1004420, out of
> order so that you can use this one already.
> 
> Note that I have modified the expected test output for the backport of this
> test case. This means that running the test before it has seen review on the
> rhvirt-patches list is equivalent to me saying "it's all fine" and only helps
> you if you trust that I didn't make a mistake.

Comment 6 Fam Zheng 2014-07-24 04:55:46 UTC
Try:

git clone git://git.engineering.redhat.com/users/kwolf/qemu-kvm-rhel6.git -b qemu-iotests

Comment 7 Sibiao Luo 2014-07-24 05:11:31 UTC
(In reply to Fam Zheng from comment #6)
> Try:
> 
> git clone git://git.engineering.redhat.com/users/kwolf/qemu-kvm-rhel6.git -b
> qemu-iotests

Yes, thanks for your pointing out.

Comment 8 Kevin Wolf 2014-07-25 12:56:06 UTC

*** This bug has been marked as a duplicate of bug 1122410 ***


Note You need to log in before you can comment on or make changes to this bug.