qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Richard W.M. Jones" <rjones@redhat.com>
To: Kevin Wolf <kwolf@redhat.com>
Cc: "Daniel P. Berrangé" <berrange@redhat.com>,
	"Eric Blake" <eblake@redhat.com>,
	qemu-devel@nongnu.org, qemu-block@nongnu.org,
	"Max Reitz" <mreitz@redhat.com>
Subject: Re: [Qemu-devel] [PATCH RFC] qemu-io: Prefer stderr for error messages
Date: Thu, 13 Dec 2018 16:02:07 +0000	[thread overview]
Message-ID: <20181213160207.GJ27120@redhat.com> (raw)
In-Reply-To: <20181213142210.GE5427@linux.fritz.box>

On Thu, Dec 13, 2018 at 03:22:10PM +0100, Kevin Wolf wrote:
> Am 13.12.2018 um 11:11 hat Daniel P. Berrangé geschrieben:
> > On Wed, Dec 12, 2018 at 04:04:10PM -0600, Eric Blake wrote:
> > > When a qemu-io command fails, it's best if the failure message
> > > goes to stderr rather than stdout.
> > > 
> > > Reported-by: Richard W.M. Jones <rjones@redhat.com>
> > > Signed-off-by: Eric Blake <eblake@redhat.com>
> > > ---
> > > 
> > > RFC because at least iotest 60 (found by -qcow2 -g quick) breaks due
> > > to reordering of output lines, and I'd rather know if we like this
> > > idea before bothering to revisit all affected iotests (including
> > > discovering if other slower ones have similar problems).
> > 
> > I think the change is correct. Error messages should never go to stdout.
> 
> I'm not sure about this, to be honest. qemu-io is first and foremost an
> interactive program, and spreading output across two streams, one
> buffered and one unbuffered, in an interactive program feels like it has
> to result in surprises.

Just for the record we're using qemu-io extensively for testing
nbdkit, and it's always used non-interactively (ie. ‘qemu-io -c’).
The bug (if it is such) was found because I was using qemu-io to test
for expected errors.

https://github.com/libguestfs/nbdkit/search?q=qemu-io

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-p2v converts physical machines to virtual machines.  Boot with a
live CD or over the network (PXE) and turn machines into KVM guests.
http://libguestfs.org/virt-v2v

  reply	other threads:[~2018-12-13 16:02 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-12 22:04 [Qemu-devel] [PATCH RFC] qemu-io: Prefer stderr for error messages Eric Blake
2018-12-12 22:11 ` Richard W.M. Jones
2018-12-12 23:52 ` [Qemu-devel] [Qemu-block] " Nir Soffer
2018-12-13  1:26   ` Eric Blake
2018-12-13 10:47   ` Daniel P. Berrangé
2018-12-13 14:05     ` Kevin Wolf
2018-12-13 14:23       ` Eric Blake
2018-12-13 14:34         ` Kevin Wolf
2018-12-13 17:44       ` Nir Soffer
2018-12-13 21:27         ` Eric Blake
2018-12-13 22:13           ` Nir Soffer
2018-12-13 17:15     ` Nir Soffer
2018-12-13 10:11 ` [Qemu-devel] " Daniel P. Berrangé
2018-12-13 14:22   ` Kevin Wolf
2018-12-13 16:02     ` Richard W.M. Jones [this message]
2018-12-13 12:21 ` Wainer dos Santos Moschetta
2018-12-13 14:04   ` Eric Blake
2018-12-13 14:38 ` Kevin Wolf

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=20181213160207.GJ27120@redhat.com \
    --to=rjones@redhat.com \
    --cc=berrange@redhat.com \
    --cc=eblake@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    /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).