From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56262) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XUy8V-0002J8-Ha for qemu-devel@nongnu.org; Fri, 19 Sep 2014 09:22:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XUy8M-0002yI-HC for qemu-devel@nongnu.org; Fri, 19 Sep 2014 09:22:07 -0400 Received: from mail-we0-x229.google.com ([2a00:1450:400c:c03::229]:58494) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XUy8M-0002vo-7T for qemu-devel@nongnu.org; Fri, 19 Sep 2014 09:21:58 -0400 Received: by mail-we0-f169.google.com with SMTP id w61so2479258wes.28 for ; Fri, 19 Sep 2014 06:21:52 -0700 (PDT) Date: Fri, 19 Sep 2014 14:21:48 +0100 From: Stefan Hajnoczi Message-ID: <20140919132148.GA11938@stefanha-thinkpad.redhat.com> References: <1410953466-26543-1-git-send-email-kwolf@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="FCuugMFkClbJLl1L" Content-Disposition: inline In-Reply-To: <1410953466-26543-1-git-send-email-kwolf@redhat.com> Subject: Re: [Qemu-devel] [PATCH] block: Validate node-name List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf Cc: benoit.canet@irqsave.net, qemu-devel@nongnu.org, stefanha@redhat.com, armbru@redhat.com --FCuugMFkClbJLl1L Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Sep 17, 2014 at 01:31:06PM +0200, Kevin Wolf wrote: > The device_name of a BlockDriverState is currently checked because it is > always used as a QemuOpts ID and qemu_opts_create() checks whether such > IDs are wellformed. >=20 > node-name is supposed to share the same namespace, but it isn't checked > currently. This patch adds explicit checks both for device_name and > node-name so that the same rules will still apply even if QemuOpts won't > be used any more at some point. >=20 > Signed-off-by: Kevin Wolf > --- > block.c | 16 +++++++++++++--- > include/qemu/option.h | 1 + > util/qemu-option.c | 4 ++-- > 3 files changed, 16 insertions(+), 5 deletions(-) This patch breaks qemu-iotests 048 and 055. Please fix and resend, I have dropped it from the block branch: 048 3s ... - output mismatch (see 048.out.bad) --- /home/stefanha/qemu/tests/qemu-iotests/048.out 2014-09-16 16:37:56.6179= 67668 +0100 +++ 048.out.bad 2014-09-19 14:19:44.428753385 +0100 @@ -9,25 +9,31 @@ 4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) wrote 4096/4096 bytes at offset 536576 4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) -Images are identical. -0 -0 +qemu-img: Invalid device name +./048: line 39: 11542 Aborted (core dumped) $QEMU_IMG comp= are "$@" "$TEST_IMG" "${TEST_IMG2}" +134 +qemu-img: Invalid device name +./048: line 39: 11547 Aborted (core dumped) $QEMU_IMG comp= are "$@" "$TEST_IMG" "${TEST_IMG2}" +134 Image resized. -Warning: Image size mismatch! -Images are identical. -0 -Strict mode: Image size mismatch! -1 +qemu-img: Invalid device name +./048: line 39: 11551 Aborted (core dumped) $QEMU_IMG comp= are "$@" "$TEST_IMG" "${TEST_IMG2}" +134 +qemu-img: Invalid device name +./048: line 39: 11553 Aborted (core dumped) $QEMU_IMG comp= are "$@" "$TEST_IMG" "${TEST_IMG2}" +134 =3D=3D=3D IO: pattern 67 wrote 4096/4096 bytes at offset 1228800 4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) -Content mismatch at offset 1228800! -1 +qemu-img: Invalid device name +./048: line 39: 11563 Aborted (core dumped) $QEMU_IMG comp= are "$@" "$TEST_IMG" "${TEST_IMG2}" +134 =3D=3D=3D IO: pattern 123 wrote 4096/4096 bytes at offset 0 4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) -Content mismatch at offset 0! -1 +qemu-img: Invalid device name +./048: line 39: 11573 Aborted (core dumped) $QEMU_IMG comp= are "$@" "$TEST_IMG" "${TEST_IMG2}" +134 Formatting 'TEST_DIR/t.IMGFMT', fmt=3DIMGFMT size=3D1073741824=20 =3D=3D=3D IO: pattern 100 wrote 512/512 bytes at offset 0 @@ -35,6 +41,7 @@ =3D=3D=3D IO: pattern 101 wrote 512/512 bytes at offset 512 512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) -Content mismatch at offset 512! -1 +qemu-img: Invalid device name +./048: line 39: 11596 Aborted (core dumped) $QEMU_IMG comp= are "$@" "$TEST_IMG" "${TEST_IMG2}" +134 Cleanup 055 9s ... [failed, exit status 1] - output mismatch (see 055.out.bad) --- /home/stefanha/qemu/tests/qemu-iotests/055.out 2014-03-14 08:29:48.8184= 42477 +0000 +++ 055.out.bad 2014-09-19 14:19:51.739791191 +0100 @@ -1,5 +1,23 @@ -.............. +qemu-img: Invalid device name +qemu-img: Invalid device name +.......F.....F +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D +FAIL: test_pause (__main__.TestSingleDrive) +---------------------------------------------------------------------- +Traceback (most recent call last): + File "055", line 90, in test_pause + 'target image does not match source after backup') +AssertionError: target image does not match source after backup + +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D +FAIL: test_pause (__main__.TestSingleTransaction) +---------------------------------------------------------------------- +Traceback (most recent call last): + File "055", line 252, in test_pause + 'target image does not match source after backup') +AssertionError: target image does not match source after backup + ---------------------------------------------------------------------- Ran 14 tests =20 -OK +FAILED (failures=3D2) Failures: 048 055 Failed 2 of 2 tests --FCuugMFkClbJLl1L Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJUHC3sAAoJEJykq7OBq3PIRaEIALF7DkT+IZDKWib8b1ltnIbG XnhMZ/SGXlEHFhARc6t5iG5oyjpmstwfiNh1nQvrxoO477XHPh8SuaIo/T+nPvTa OzCejdLiE2xHWQaFutQMxtmFysL1F9Dr/eOM0wuwRrnAHUTEdOCqyTfKVnOeYXK1 KI9hEVn5cJeh68eUGwUBStMu5YDsK5OyfSdZlgDy/Vp8EfOjv3cM6oslp2uzDPF7 3bC9T/YTimaYJqBahOJG/8DoWzdefyVrOXuSndo8v2+SHK0CD3p3pkf3RAjcasi/ hdkuQNpueHdINZPWAfVPCo6fpF60OQ16wkmp52xD8rLnAmta4rZil6bVR3QyVSg= =2ZKx -----END PGP SIGNATURE----- --FCuugMFkClbJLl1L--