From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34387) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fVYaf-0000zj-N8 for qemu-devel@nongnu.org; Wed, 20 Jun 2018 04:35:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fVYac-0001J0-JB for qemu-devel@nongnu.org; Wed, 20 Jun 2018 04:35:45 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:59522 helo=mx1.redhat.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fVYac-0001In-EU for qemu-devel@nongnu.org; Wed, 20 Jun 2018 04:35:42 -0400 From: Markus Armbruster References: <20180620073223.31964-1-peterx@redhat.com> <20180620073223.31964-5-peterx@redhat.com> Date: Wed, 20 Jun 2018 10:35:40 +0200 In-Reply-To: <20180620073223.31964-5-peterx@redhat.com> (Peter Xu's message of "Wed, 20 Jun 2018 15:32:20 +0800") Message-ID: <87bmc5zwgz.fsf@dusky.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH v5 4/7] tests: iotests: drop some stderr line List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Xu Cc: qemu-devel@nongnu.org, Kevin Wolf , Peter Maydell , Thomas Huth , Fam Zheng , Eric Auger , John Snow , Max Reitz , Christian Borntraeger , "Dr . David Alan Gilbert" , Stefan Hajnoczi , =?utf-8?Q?Marc-Andr=C3=A9?= Lureau Peter Xu writes: > In my Out-Of-Band test, "check -qcow2 060" fail with this (the output is > manually changed due to line width requirement): I think the output is no longer wrapped. Can drop the parenthesis when I apply. > --- /home/peterx/git/qemu/tests/qemu-iotests/060.out > +++ /home/peterx/git/qemu/bin/tests/qemu-iotests/060.out.bad > @@ -427,8 +427,8 @@ > QMP_VERSION > {"return": {}} > qcow2: Image is corrupt: L2 table offset 0x2a2a2a00 unaligned (L1 > index: 0); further non-fatal corruption events will be suppressed > -{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "BLOCK_IMAGE_CORRUPTED", "data": {"device": "", "msg": "L2 table offset 0x2a2a2a0 > 0 unaligned (L1 index: 0)", "node-name": "drive", "fatal": false}} > read failed: Input/output error > +{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "BLOCK_IMAGE_CORRUPTED", "data": {"device": "", "msg": "L2 table offset 0x2a2a2a0 > 0 unaligned (L1 index: 0)", "node-name": "drive", "fatal": false}} > {"return": ""} > {"return": {}} > {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, > "event": "SHUTDOWN", "data": {"guest": false}} > > The order of the event and the in/out error line is swapped. I didn't > dig up the reason, but AFAIU what we want to verify is the event rather > than stderr. Let's drop the stderr line directly for this test. > > Signed-off-by: Peter Xu Max, may I have your R-by? > --- > tests/qemu-iotests/060 | 10 +++++++++- > tests/qemu-iotests/060.out | 1 - > 2 files changed, 9 insertions(+), 2 deletions(-) > > diff --git a/tests/qemu-iotests/060 b/tests/qemu-iotests/060 > index 7bdf609f3f..74ad371885 100755 > --- a/tests/qemu-iotests/060 > +++ b/tests/qemu-iotests/060 > @@ -33,6 +33,14 @@ _cleanup() > } > trap "_cleanup; exit \$status" 0 1 2 3 15 > > +# Sometimes the error line might be dumped before/after an event > +# randomly. Mask it out for specific test that may trigger this > +# uncertainty for current test for now. > +_filter_io_error() > +{ > + sed '/Input\/output error/d' > +} > + > # get standard environment, filters and checks > . ./common.rc > . ./common.filter > @@ -464,7 +472,7 @@ echo "{'execute': 'qmp_capabilities'} > }}" \ > -incoming exec:'cat /dev/null' \ > 2>&1 \ > - | _filter_qmp | _filter_qemu_io > + | _filter_qmp | _filter_qemu_io | _filter_io_error > > echo > # Image should not have been marked corrupt > diff --git a/tests/qemu-iotests/060.out b/tests/qemu-iotests/060.out > index bff023d889..d67c6234a4 100644 > --- a/tests/qemu-iotests/060.out > +++ b/tests/qemu-iotests/060.out > @@ -428,7 +428,6 @@ QMP_VERSION > {"return": {}} > qcow2: Image is corrupt: L2 table offset 0x2a2a2a00 unaligned (L1 index: 0); further non-fatal corruption events will be suppressed > {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "BLOCK_IMAGE_CORRUPTED", "data": {"device": "", "msg": "L2 table offset 0x2a2a2a00 unaligned (L1 index: 0)", "node-name": "drive", "fatal": false}} > -read failed: Input/output error > {"return": ""} > {"return": {}} > {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false}}