From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58811) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZzoUL-0007Lp-PA for qemu-devel@nongnu.org; Fri, 20 Nov 2015 11:24:43 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZzoUK-0000Ch-23 for qemu-devel@nongnu.org; Fri, 20 Nov 2015 11:24:41 -0500 Received: from mx1.redhat.com ([209.132.183.28]:39272) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZzoUJ-0000Ca-QC for qemu-devel@nongnu.org; Fri, 20 Nov 2015 11:24:40 -0500 References: <1446604018-14025-1-git-send-email-tubo@linux.vnet.ibm.com> <1446604018-14025-3-git-send-email-tubo@linux.vnet.ibm.com> <564CACB1.5020806@redhat.com> <564D7A04.7090402@linux.vnet.ibm.com> From: Max Reitz Message-ID: <564F493C.3030501@redhat.com> Date: Fri, 20 Nov 2015 17:24:28 +0100 MIME-Version: 1.0 In-Reply-To: <564D7A04.7090402@linux.vnet.ibm.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="T6up9qjsTP4lUkajwi0SXtFH2bsI7WNOl" Subject: Re: [Qemu-devel] [PATCH v2 2/4] qemu-iotests: s390x: fix test 051 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: tu bo , qemu-devel@nongnu.org Cc: kwolf@redhat.com, silbe@linux.vnet.ibm.com, armbru@redhat.com, mimu@linux.vnet.ibm.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --T6up9qjsTP4lUkajwi0SXtFH2bsI7WNOl Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 19.11.2015 08:28, tu bo wrote: > Hi Max: >=20 > On 11/19/2015 12:52 AM, Max Reitz wrote: >> On 04.11.2015 03:26, Bo Tu wrote: >>> The tests for device type "ide_cd" should only be tested for the pc >>> platform. >>> The default device id of hard disk on the s390 platform differs to th= at >>> of the x86 platform. A new variable device_id is defined and "virtio0= " >>> set for the s390 platform. A x86 platform specific output file is als= o >>> needed. >>> Warning message expected for s390x when drive without device. >>> >>> Reviewed-by: Sascha Silbe >>> Signed-off-by: Bo Tu >>> --- >>> tests/qemu-iotests/051 | 99 ++++++---- >>> tests/qemu-iotests/051.out | 143 +++----------- >>> tests/qemu-iotests/051.pc.out | 422 >>> ++++++++++++++++++++++++++++++++++++++++++ >>> 3 files changed, 515 insertions(+), 149 deletions(-) >>> create mode 100644 tests/qemu-iotests/051.pc.out >>> >> >> [...] >> >>> diff --git a/tests/qemu-iotests/051.out b/tests/qemu-iotests/051.out >>> index 7765aa0..d17c969 100644 >>> --- a/tests/qemu-iotests/051.out >>> +++ b/tests/qemu-iotests/051.out >> >> [...] >> >>> @@ -109,20 +109,23 @@ QEMU X.Y.Z monitor - type 'help' for more >>> information >>> >>> Testing: -drive if=3Dfloppy >>> QEMU X.Y.Z monitor - type 'help' for more information >>> -(qemu) q=1B[K=1B[Dqu=1B[K=1B[D=1B[Dqui=1B[K=1B[D=1B[D=1B[Dquit=1B[K >>> +(qemu) Warning: Orphaned drive without device: >>> id=3Dfloppy0,file=3D,if=3Dfloppy,bus=3D0,unit=3D0 >>> +q=1B[K=1B[Dqu=1B[K=1B[D=1B[Dqui=1B[K=1B[D=1B[D=1B[Dquit=1B[K >> >> I'd still like these warnings to be filtered out (as I wrote in my rep= ly >> to the original RFC's v4, and as was done in later versions of that RF= C >> (the _filter_orphan function e.g. in >> http://lists.nongnu.org/archive/html/qemu-devel/2015-05/msg04816.html)= =2E >> >=20 > I did more investigation about this. > "Warning: Orphaned drive without device:.*" is expected for s390x, whe= n > we define a drive without device, also this drive is not default > and interface is not "none". Please refer line 228,229 in blockdev.c: > 218 bool drive_check_orphaned(void) > 219 { > 220 BlockBackend *blk; > 221 DriveInfo *dinfo; > 222 bool rs =3D false; > 223 > 224 for (blk =3D blk_next(NULL); blk; blk =3D blk_next(blk)) { > 225 dinfo =3D blk_legacy_dinfo(blk); > 226 /* If dinfo->bdrv->dev is NULL, it has no device > attached. */ > 227 /* Unless this is a default drive, this may be an > oversight. */ > 228 if (!blk_get_attached_dev(blk) && !dinfo->is_default &&= > 229 dinfo->type !=3D IF_NONE) { > 230 fprintf(stderr, "Warning: Orphaned drive without > device: " > 231 "id=3D%s,file=3D%s,if=3D%s,bus=3D%d,unit=3D= %d\n", > 232 blk_name(blk), blk_bs(blk)->filename, > if_name[dinfo->type], > 233 dinfo->bus, dinfo->unit); > 234 rs =3D true; > 235 } > 236 } >=20 > For example, "run_qemu -drive if=3Dscsi" will generate orphan warning= > message for s390x, but "run_qemu -drive if=3Dvirtio" will not generat= e > orphan warning message, since virtio is a default drive. >=20 > so I removed _filter_orphan() in common.filter, and added orphan > warning message(ie: for the output of "run_qemu -drive if=3Dscsi") in > output file for s390x. thanks OK, so it is expected for s390x; however, this is strictly speaking not the output file for s390x but for any platform but PC. That's why I'd rather not have it in this =E2=80=9Cgeneric=E2=80=9D reference output. This patch already assumes that the iotests only support s390 and PC (hunk @@ -251,28 +273,37 @@ in 051 adds a case statement which knows only these two cases). Therefore, I would be fine with renaming this reference output file to "051.s390.out" with a copy "051.s390-ccw-virtio.out" and just removing the generic "051.out". Then you can keep the warnings in. (Or you filter the warnings out and keep it as "051.out".) Max --T6up9qjsTP4lUkajwi0SXtFH2bsI7WNOl Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJWT0k9AAoJEDuxQgLoOKytJjUH/0avu2hEaI2sSYmIhXHyu0IC mA4qjdkB/m89Uc8hRz7iqjXWXXDSODCInd2lzC5urq1elmrOgE+3ylTtyEmwctno 5Tq33egelELOPgGuKBImD1jEv4/V4Eg7YHlcGfF7W41ahJ0pjE/LqwyZ9fLjyki6 IhCi4+d6a5MN/O6R7/xdECk4d6oEghJBTk3He996TPfYffZvo44npI41yOI6Mm/H ce+GNk/htsjPqwoqKN9ceGTsAALkbfjhx7Nxwj2XmHQjXF/Nod85llV3g3Lk9F99 ZypuHXwlkx0S3RShnnidhZcrNEWxjOApjUaINS8BABs4W9bbdrT9bnMFdv7kiv4= =XRRs -----END PGP SIGNATURE----- --T6up9qjsTP4lUkajwi0SXtFH2bsI7WNOl--