qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v1 RFC 0/9] Update tests/qemu-iotests cases for


From: Michael Mueller
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

On Thu, 27 Nov 2014 12:27:56 +0100
Kevin Wolf <address@hidden> wrote:

> Am 27.11.2014 um 12:08 hat Michael Mueller geschrieben:
> > On Thu, 27 Nov 2014 10:30:33 +0100
> > Max Reitz <address@hidden> 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 via email to

[Prev in Thread] Current Thread [Next in Thread]