qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@gmail.com>
To: Kevin Wolf <kwolf@redhat.com>
Cc: benoit.canet@irqsave.net, qemu-devel@nongnu.org,
	stefanha@redhat.com, armbru@redhat.com
Subject: Re: [Qemu-devel] [PATCH] block: Validate node-name
Date: Fri, 19 Sep 2014 14:21:48 +0100	[thread overview]
Message-ID: <20140919132148.GA11938@stefanha-thinkpad.redhat.com> (raw)
In-Reply-To: <1410953466-26543-1-git-send-email-kwolf@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 4302 bytes --]

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.
> 
> 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.
> 
> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
> ---
>  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.617967668 +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 compare "$@" "$TEST_IMG" "${TEST_IMG2}"
+134
+qemu-img: Invalid device name
+./048: line 39: 11547 Aborted                 (core dumped) $QEMU_IMG compare "$@" "$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 compare "$@" "$TEST_IMG" "${TEST_IMG2}"
+134
+qemu-img: Invalid device name
+./048: line 39: 11553 Aborted                 (core dumped) $QEMU_IMG compare "$@" "$TEST_IMG" "${TEST_IMG2}"
+134
 === 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 compare "$@" "$TEST_IMG" "${TEST_IMG2}"
+134
 === 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 compare "$@" "$TEST_IMG" "${TEST_IMG2}"
+134
 Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824 
 === IO: pattern 100
 wrote 512/512 bytes at offset 0
@@ -35,6 +41,7 @@
 === 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 compare "$@" "$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.818442477 +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
+======================================================================
+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
+
+======================================================================
+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
 
-OK
+FAILED (failures=2)
Failures: 048 055
Failed 2 of 2 tests

[-- Attachment #2: Type: application/pgp-signature, Size: 473 bytes --]

      parent reply	other threads:[~2014-09-19 13:22 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-17 11:31 [Qemu-devel] [PATCH] block: Validate node-name Kevin Wolf
2014-09-17 11:49 ` Benoît Canet
2014-09-17 12:28   ` Kevin Wolf
2014-09-18  7:50     ` Markus Armbruster
2014-09-17 13:29 ` Benoît Canet
2014-09-19 10:08 ` Stefan Hajnoczi
2014-09-19 13:21 ` Stefan Hajnoczi [this message]

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=20140919132148.GA11938@stefanha-thinkpad.redhat.com \
    --to=stefanha@gmail.com \
    --cc=armbru@redhat.com \
    --cc=benoit.canet@irqsave.net \
    --cc=kwolf@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).