All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Emilio G. Cota" <cota@braap.org>
To: Alistair Francis <alistair.francis@xilinx.com>
Cc: "qemu-devel@nongnu.org Developers" <qemu-devel@nongnu.org>,
	qemu-block@nongnu.org, "Michael S. Tsirkin" <mst@redhat.com>,
	Markus Armbruster <armbru@redhat.com>,
	"Dr. David Alan Gilbert" <dgilbert@redhat.com>,
	Gerd Hoffmann <kraxel@redhat.com>,
	Igor Mammedov <imammedo@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v1 2/8] tests: Replace fprintf(stderr, "*\n" with error_report()
Date: Thu, 28 Sep 2017 13:53:51 -0400	[thread overview]
Message-ID: <20170928175351.GA14777@flamenco> (raw)
In-Reply-To: <CAKmqyKP7b0OP35ctzOmkCwPH4sHQFZAKtyTRgPTYN0iSXkgsaw@mail.gmail.com>

On Wed, Sep 27, 2017 at 16:08:50 -0700, Alistair Francis wrote:
> On Mon, Sep 25, 2017 at 5:55 PM, Emilio G. Cota <cota@braap.org> wrote:
> > On Mon, Sep 25, 2017 at 17:08:48 -0700, Alistair Francis wrote:
> >> diff --git a/tests/atomic_add-bench.c b/tests/atomic_add-bench.c
> >> index caa1e8e689..41ba1600c0 100644
> >> --- a/tests/atomic_add-bench.c
> >> +++ b/tests/atomic_add-bench.c
> >> @@ -29,7 +29,7 @@ static const char commands_string[] =
> >>  static void usage_complete(char *argv[])
> >>  {
> >>      fprintf(stderr, "Usage: %s [options]\n", argv[0]);
> >> -    fprintf(stderr, "options:\n%s\n", commands_string);
> >> +    fprintf(stderr, "options:\n%s", commands_string);
> >>  }
> >
> > We do want that trailing \n, unless we move it to commands_string.
> 
> Yeah, this was a mistake. It should have swapped to error_report().
> 
> >
> > Also, I think using error_report here would be confusing -- this is a standalone
> > test program with as little QEMU-specific knowledge as possible (QemuThreads
> > are used for portability); using error_report here is confusing (this is not
> > an error).
> 
> Do you mean in all tests/ sub directory or just a few certain cases?

I was talking specifically about tests/atomic-add-bench and tests/qht-bench,
because I know those well. I don't have a good grasp on everything that's under tests/,
but I presume there are similar cases there too -- that is, standalone programs
where QEMU monitor and/or any other QEMU-specific form of logging makes no sense,
and therefore fprintf(stderr) is the right thing to do.

Thanks,

		Emilio

  reply	other threads:[~2017-09-28 17:54 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-26  0:08 [Qemu-devel] [PATCH v1 0/8] Remove some of the fprintf(stderr, "* Alistair Francis
2017-09-26  0:08 ` [Qemu-devel] [PATCH v1 1/8] Replace all occurances of __FUNCTION__ with __func__ Alistair Francis
2017-09-26  0:08   ` Alistair Francis
2017-09-26 13:32   ` [Qemu-devel] " Eric Blake
2017-09-26 13:32   ` Eric Blake
2017-09-27 22:59     ` Alistair Francis
2017-09-27 22:59     ` Alistair Francis
2017-09-27 23:47     ` [Qemu-devel] [Qemu-arm] " Peter Maydell
2017-09-28 22:37       ` Alistair Francis
2017-09-28 22:37         ` [Qemu-arm] [Qemu-devel] " Alistair Francis
2017-09-27 23:47     ` Peter Maydell
2017-09-26  0:08 ` [Qemu-devel] [PATCH v1 2/8] tests: Replace fprintf(stderr, "*\n" with error_report() Alistair Francis
2017-09-26  0:55   ` Emilio G. Cota
2017-09-26 14:03     ` Eric Blake
2017-09-27 23:08     ` Alistair Francis
2017-09-28 17:53       ` Emilio G. Cota [this message]
2017-09-26  0:08 ` [Qemu-devel] [PATCH v1 3/8] hw: " Alistair Francis
2017-09-26  0:08   ` Alistair Francis
2017-09-26  3:51   ` [Qemu-devel] " Thomas Huth
2017-09-27 22:41     ` Alistair Francis
2017-09-27 22:41       ` Alistair Francis
2017-09-26  3:51   ` Thomas Huth
2017-09-26  0:08 ` [Qemu-devel] [PATCH v1 4/8] block: " Alistair Francis
2017-09-26  0:09 ` [Qemu-devel] [PATCH v1 5/8] util: " Alistair Francis
2017-09-26  0:09 ` [Qemu-devel] [PATCH v1 6/8] ui: " Alistair Francis
2017-09-26  0:09 ` [Qemu-devel] [PATCH v1 7/8] tcg: " Alistair Francis
2017-09-26 15:05   ` Richard Henderson
2017-09-26  0:09 ` [Qemu-devel] [PATCH v1 8/8] target: " Alistair Francis
2017-09-26  4:08   ` Thomas Huth
2017-09-29 18:12     ` Alistair Francis
2017-09-26 15:21   ` Richard Henderson
2017-09-26  0:27 ` [Qemu-devel] [PATCH v1 0/8] Remove some of the fprintf(stderr, "* no-reply
2017-09-26  0:42 ` no-reply
2017-09-26  9:05 ` Stefan Hajnoczi
2017-09-26 16:47   ` Alistair Francis

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=20170928175351.GA14777@flamenco \
    --to=cota@braap.org \
    --cc=alistair.francis@xilinx.com \
    --cc=armbru@redhat.com \
    --cc=dgilbert@redhat.com \
    --cc=imammedo@redhat.com \
    --cc=kraxel@redhat.com \
    --cc=mst@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.