qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Emilio G. Cota" <cota@braap.org>
To: Alistair Francis <alistair.francis@xilinx.com>
Cc: qemu-devel@nongnu.org, qemu-block@nongnu.org,
	"Michael S. Tsirkin" <mst@redhat.com>,
	armbru@redhat.com, "Dr. David Alan Gilbert" <dgilbert@redhat.com>,
	Gerd Hoffmann <kraxel@redhat.com>,
	Igor Mammedov <imammedo@redhat.com>,
	alistair23@gmail.com
Subject: Re: [Qemu-devel] [PATCH v1 2/8] tests: Replace fprintf(stderr, "*\n" with error_report()
Date: Mon, 25 Sep 2017 20:55:20 -0400	[thread overview]
Message-ID: <20170926005520.GA7906@flamenco> (raw)
In-Reply-To: <50c325943b1547813567efe6a11fb44644494d70.1506384414.git.alistair.francis@xilinx.com>

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.

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).

> diff --git a/tests/check-qlit b/tests/check-qlit
> new file mode 100755
> index 0000000000000000000000000000000000000000..950429524e3eb07e6daed1fe01caad0f5d554809
> GIT binary patch
> literal 272776
> zcmeEvdwf*Ywf~vPB$){zGeCghJ;($So{10*LNEgfoIs*MKvBRDLV(l&F`3b5QKOS6

? I don't know what this is, I don't seem to have this binary in my
checked out tree.

(snips thousands of lines)

> diff --git a/tests/qht-bench.c b/tests/qht-bench.c
> index 11c1cec766..2637d601a9 100644
> --- a/tests/qht-bench.c
> +++ b/tests/qht-bench.c
> @@ -5,6 +5,7 @@
>   *   See the COPYING file in the top-level directory.
>   */
>  #include "qemu/osdep.h"
> +#include "qemu/error-report.h"
>  #include "qemu/processor.h"
>  #include "qemu/atomic.h"
>  #include "qemu/qht.h"
> @@ -89,7 +90,7 @@ static const char commands_string[] =
>  static void usage_complete(int argc, 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);

Same as above: this removes the necessary trailing \n.

>      exit(-1);
>  }
>  
> @@ -328,7 +329,7 @@ static void htable_init(void)
>              retries++;
>          }
>      }
> -    fprintf(stderr, " populated after %zu retries\n", retries);
> +    error_report(" populated after %zu retries", retries);
>  }

ditto -- I'd rather keep fprintf(stderr) here, it's less confusing.

Thanks,

		Emilio

  reply	other threads:[~2017-09-26  0:55 UTC|newest]

Thread overview: 27+ 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 13:32   ` Eric Blake
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-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 [this message]
2017-09-26 14:03     ` Eric Blake
2017-09-27 23:08     ` Alistair Francis
2017-09-28 17:53       ` Emilio G. Cota
2017-09-26  0:08 ` [Qemu-devel] [PATCH v1 3/8] hw: " Alistair Francis
2017-09-26  3:51   ` Thomas Huth
2017-09-27 22:41     ` Alistair Francis
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=20170926005520.GA7906@flamenco \
    --to=cota@braap.org \
    --cc=alistair.francis@xilinx.com \
    --cc=alistair23@gmail.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 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).