qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Michael Mueller <mimu@linux.vnet.ibm.com>
To: Kevin Wolf <kwolf@redhat.com>
Cc: Mao Chuan Li <maochuan@linux.vnet.ibm.com>,
	Alexander Graf <agraf@suse.de>,
	qemu-devel@nongnu.org,
	Christian Borntraeger <borntraeger@de.ibm.com>,
	Stefan Hajnoczi <stefanha@redhat.com>,
	Cornelia Huck <cornelia.huck@de.ibm.com>,
	Max Reitz <mreitz@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v1 RFC 0/9] Update tests/qemu-iotests cases for multi-platform support
Date: Thu, 27 Nov 2014 14:34:35 +0100	[thread overview]
Message-ID: <20141127143435.68c06408@bee> (raw)
In-Reply-To: <20141127112756.GE3792@noname.redhat.com>

On Thu, 27 Nov 2014 12:27:56 +0100
Kevin Wolf <kwolf@redhat.com> wrote:

> Am 27.11.2014 um 12:08 hat Michael Mueller geschrieben:
> > On Thu, 27 Nov 2014 10:30:33 +0100
> > Max Reitz <mreitz@redhat.com> wrote:
> > 
> > > On 2014-11-13 at 11:36, Mao Chuan Li wrote:
> > > > Currently the qemu-iotest framework is focused on the x86 platform. The suite should be
> > > > usable by other platforms as well. To enable multi-platform usage, this patch set enhances
> > > > the framework scripts to address this. By using the default machine type of the platform
> > > > one can add specific output files if it deviates from the default. Secondly, single test
> > > > cases can be adjusted as well when e.g. devices have different names or are not supported
> > > > at all.
> > > >
> > > > Mao Chuan Li (9):
> > > >    qemu-iotests: run qemu with -nodefaults
> > > >    qemu-iotests: qemu machine type support
> > > >    qemu-iotests: add core_pattern access functions
> > > >    qemu-iotests: fix test 039
> > > 
> > > >    qemu-iotests: s390x: fix test 071
> > > >    qemu-iotests: s390x: fix test 087
> > > 
> > > To me, the main difference between the current test output and the new 
> > > s390-specific seems to be lines about CD and floppy disk; due to patch 
> > > 1, they are gone from x86 as well, though. Therefore, we don't need 
> > > special s390 output, but need to apply the changes directly to 071.out 
> > > and 087.out.
> > 
> > perfect, that's fully in our interest.
> > 
> > > 
> > > Furthermore, after patch 1, tests 067 and 091 fail for me on x86, too. I 
> > > don't know why 091 fails, but 067 fails because CD and floppy are 
> > > missing from the block-query result and the DEVICE_TRAY_MOVED events are 
> > > missing from QMP output in general (which is completely fine, we just 
> > > need to adjust the reference output accordingly).
> > > 
> > > Max
> > > 
> > > >    qemu-iotests: s390x: fix test 041
> > > >    qemu-iotests: s390x: fix test 055
> > > >    qemu-iotests: s390x: fix test 051
> > > 
> > 
> > We have two more test 060 and 082 that fail with the following difference to
> > the reference output. We analyzed it and it turns out that the size on disk is
> > file system dependent. In our case it ran on a s390/ext3. Thus we think comparing
> > the size on disk should be filtered. With other file system like ext4 or tmpfs we
> > get also 196K. We don't want to enforce a specific file system to be used.    
> > 
> > 060         - output mismatch (see 060.out.bad)
> > --- /home/mimu/prog/qemu/tests/qemu-iotests/060.out	2014-11-07 09:34:09.106410738 +0100
> > +++ 060.out.bad	2014-11-27 11:32:43.342907638 +0100
> > @@ -14,7 +14,7 @@
> >  image: TEST_DIR/t.qcow2
> >  file format: qcow2
> >  virtual size: 64M (67108864 bytes)
> > -disk size: 196K
> > +disk size: 200K
> >  cluster_size: 65536
> >  Format specific information:
> >      compat: 1.1
> > 
> > Would this be excaptable with replacing the out file
> > 
> > diff --git a/tests/qemu-iotests/060 b/tests/qemu-iotests/060
> > index 9772d36..3f608ed 100755
> > --- a/tests/qemu-iotests/060
> > +++ b/tests/qemu-iotests/060
> > @@ -77,7 +77,7 @@ $QEMU_IO -c "$OPEN_RW" -c "write -P 0x2a 0 512" | _filter_qemu_io
> >  $PYTHON qcow2.py "$TEST_IMG" dump-header | grep incompatible_features
> >  
> >  # This information should be available through qemu-img info
> > -$QEMU_IMG info "$TEST_IMG" | _filter_testdir
> > +$QEMU_IMG info "$TEST_IMG" | _filter_testdir | _filter_disk_size
> 
> _img_info already filters the size out. The reason why it isn't used
> here is that it also filters all of the format specific information out.
> We could probably make that part optional and then reuse it here.
> 
> Kevin

I'm not sure if this is the better solution then because one has to use a
new global variable to provide the parameter:

diff --git a/tests/qemu-iotests/060 b/tests/qemu-iotests/060
index 3f608ed..5978336 100755
--- a/tests/qemu-iotests/060
+++ b/tests/qemu-iotests/060
@@ -77,7 +77,7 @@ $QEMU_IO -c "$OPEN_RW" -c "write -P 0x2a 0 512" | _filter_qemu_io
 $PYTHON qcow2.py "$TEST_IMG" dump-header | grep incompatible_features
 
 # This information should be available through qemu-img info
-$QEMU_IMG info "$TEST_IMG" | _filter_testdir | _filter_disk_size
+args=ups _img_info | _filter_testdir
 
 # Try to open the image R/W (which should fail)
 $QEMU_IO -c "$OPEN_RW" -c "read 0 512" 2>&1 | _filter_qemu_io \
diff --git a/tests/qemu-iotests/common.rc b/tests/qemu-iotests/common.rc
index 87edf36..418c36f 100644
--- a/tests/qemu-iotests/common.rc
+++ b/tests/qemu-iotests/common.rc
@@ -213,6 +213,11 @@ _check_test_img()
 
 _img_info()
 {
+    if [ -n "$args" ]; then
+       $QEMU_IMG info "$@" "$TEST_IMG" 2>&1 | \
+            sed -e "/^disk size:/ D"
+       return
+    fi
     discard=0
     regex_json_spec_start='^ *"format-specific": \{'
     $QEMU_IMG info "$@" "$TEST_IMG" 2>&1 | \


> 

  reply	other threads:[~2014-11-27 13:34 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-13 10:36 [Qemu-devel] [PATCH v1 RFC 0/9] Update tests/qemu-iotests cases for multi-platform support Mao Chuan Li
2014-11-13 10:36 ` [Qemu-devel] [PATCH v1 RFC 1/9] qemu-iotests: run qemu with -nodefaults Mao Chuan Li
2014-11-13 10:36 ` [Qemu-devel] [PATCH v1 RFC 2/9] qemu-iotests: qemu machine type support Mao Chuan Li
2014-11-13 10:36 ` [Qemu-devel] [PATCH v1 RFC 3/9] qemu-iotests: add core_pattern access functions Mao Chuan Li
2014-11-13 10:36 ` [Qemu-devel] [PATCH v1 RFC 4/9] qemu-iotests: fix test 039 Mao Chuan Li
2014-11-13 15:54   ` Max Reitz
2014-11-25 18:07   ` Michael Mueller
2014-11-13 10:36 ` [Qemu-devel] [PATCH v1 RFC 5/9] qemu-iotests: s390x: fix test 071 Mao Chuan Li
2014-11-13 10:36 ` [Qemu-devel] [PATCH v1 RFC 6/9] qemu-iotests: s390x: fix test 087 Mao Chuan Li
2014-11-13 10:36 ` [Qemu-devel] [PATCH v1 RFC 7/9] qemu-iotests: s390x: fix test 041 Mao Chuan Li
2014-11-13 10:37 ` [Qemu-devel] [PATCH v1 RFC 8/9] qemu-iotests: s390x: fix test 055 Mao Chuan Li
2014-11-13 10:37 ` [Qemu-devel] [PATCH v1 RFC 9/9] qemu-iotests: s390x: fix test 051 Mao Chuan Li
2014-11-27  9:30 ` [Qemu-devel] [PATCH v1 RFC 0/9] Update tests/qemu-iotests cases for multi-platform support Max Reitz
2014-11-27  9:45   ` Max Reitz
2014-11-27 11:08   ` Michael Mueller
2014-11-27 11:27     ` Kevin Wolf
2014-11-27 13:34       ` Michael Mueller [this message]
2014-11-27 14:03         ` Kevin Wolf
2014-11-27 14:09           ` Kevin Wolf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20141127143435.68c06408@bee \
    --to=mimu@linux.vnet.ibm.com \
    --cc=agraf@suse.de \
    --cc=borntraeger@de.ibm.com \
    --cc=cornelia.huck@de.ibm.com \
    --cc=kwolf@redhat.com \
    --cc=maochuan@linux.vnet.ibm.com \
    --cc=mreitz@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).