From: Daniel Vetter Subject: Re: [PATCH 1/5] tests: Don't use stderr for informational messages Date: Fri, 13 Jun 2014 16:24:48 +0200 Message-ID: <20140613142448.GP5821@phenom.ffwll.local> References: <1402667255-15770-1-git-send-email-daniel.vetter@ffwll.ch> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-wi0-f176.google.com (mail-wi0-f176.google.com [209.85.212.176]) by gabe.freedesktop.org (Postfix) with ESMTP id 5F7166E2FF for ; Fri, 13 Jun 2014 07:24:54 -0700 (PDT) Received: by mail-wi0-f176.google.com with SMTP id n3so989676wiv.15 for ; Fri, 13 Jun 2014 07:24:53 -0700 (PDT) Content-Disposition: inline In-Reply-To: <1402667255-15770-1-git-send-email-daniel.vetter@ffwll.ch> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: Intel Graphics Development Cc: Daniel Vetter List-Id: intel-gfx@lists.freedesktop.org On Fri, Jun 13, 2014 at 03:47:31PM +0200, Daniel Vetter wrote: > These should go to stdout instead. The next patch will clean this up > with cocci, so no change from fprintf(stdout, to printf( here. > > Signed-off-by: Daniel Vetter > --- > lib/igt.cocci | 1 + > tests/gem_stress.c | 2 +- > tests/testdisplay.c | 34 +++++++++++++++++----------------- > 3 files changed, 19 insertions(+), 18 deletions(-) > > diff --git a/lib/igt.cocci b/lib/igt.cocci > index 78ef9a5c0767..a5f7c2dbfbce 100644 > --- a/lib/igt.cocci > +++ b/lib/igt.cocci > @@ -1,3 +1,4 @@ > +// Replace open-coded augmented igt_assert/skip/require with macro versions > @@ > expression Ec; > expression list[n] Ep; > diff --git a/tests/gem_stress.c b/tests/gem_stress.c > index e6a6ce693feb..a9a205abc16b 100644 > --- a/tests/gem_stress.c > +++ b/tests/gem_stress.c > @@ -924,7 +924,7 @@ int main(int argc, char **argv) > > fan_in_and_check(); > > - fprintf(stderr, "num failed tiles %u, max incoherent bytes %zd\n", > + fprintf(stdou, "num failed tiles %u, max incoherent bytes %zd\n", Ville spotted an s/stdou/stdout/ here, fixed up locally and re-run igt.cocci. -Daniel > stats.num_failed, stats.max_failed_reads*sizeof(uint32_t)); > > intel_batchbuffer_free(batch); > diff --git a/tests/testdisplay.c b/tests/testdisplay.c > index 125e7d2f0e7d..9ed3ff66708c 100644 > --- a/tests/testdisplay.c > +++ b/tests/testdisplay.c > @@ -675,22 +675,22 @@ static char optstr[] = "3hiaf:s:d:p:mrto:j:"; > > static void __attribute__((noreturn)) usage(char *name) > { > - fprintf(stderr, "usage: %s [-hiasdpmtf]\n", name); > - fprintf(stderr, "\t-i\tdump info\n"); > - fprintf(stderr, "\t-a\ttest all modes\n"); > - fprintf(stderr, "\t-s\t\tsleep between each mode test\n"); > - fprintf(stderr, "\t-d\t\tbit depth of scanout buffer\n"); > - fprintf(stderr, "\t-p\t,, test overlay plane\n"); > - fprintf(stderr, "\t-m\ttest the preferred mode\n"); > - fprintf(stderr, "\t-3\ttest all 3D modes\n"); > - fprintf(stderr, "\t-t\tuse a tiled framebuffer\n"); > - fprintf(stderr, "\t-j\tdo dpms off, optional arg to select dpms leve (1-3)\n"); > - fprintf(stderr, "\t-r\tprint a QR code on the screen whose content is \"pass\" for the automatic test\n"); > - fprintf(stderr, "\t-o\t,\tonly test specified mode on the specified display\n"); > - fprintf(stderr, "\t-f\t,,,,,\n"); > - fprintf(stderr, "\t\t,,,\n"); > - fprintf(stderr, "\t\ttest force mode\n"); > - fprintf(stderr, "\tDefault is to test all modes.\n"); > + fprintf(stdout, "usage: %s [-hiasdpmtf]\n", name); > + fprintf(stdout, "\t-i\tdump info\n"); > + fprintf(stdout, "\t-a\ttest all modes\n"); > + fprintf(stdout, "\t-s\t\tsleep between each mode test\n"); > + fprintf(stdout, "\t-d\t\tbit depth of scanout buffer\n"); > + fprintf(stdout, "\t-p\t,, test overlay plane\n"); > + fprintf(stdout, "\t-m\ttest the preferred mode\n"); > + fprintf(stdout, "\t-3\ttest all 3D modes\n"); > + fprintf(stdout, "\t-t\tuse a tiled framebuffer\n"); > + fprintf(stdout, "\t-j\tdo dpms off, optional arg to select dpms leve (1-3)\n"); > + fprintf(stdout, "\t-r\tprint a QR code on the screen whose content is \"pass\" for the automatic test\n"); > + fprintf(stdout, "\t-o\t,\tonly test specified mode on the specified display\n"); > + fprintf(stdout, "\t-f\t,,,,,\n"); > + fprintf(stdout, "\t\t,,,\n"); > + fprintf(stdout, "\t\ttest force mode\n"); > + fprintf(stdout, "\tDefault is to test all modes.\n"); > exit(0); > } > > @@ -797,7 +797,7 @@ int main(int argc, char **argv) > break; > case 'd': > depth = atoi(optarg); > - fprintf(stderr, "using depth %d\n", depth); > + fprintf(stdout, "using depth %d\n", depth); > break; > case 'p': > if (sscanf(optarg, "%d,%d,%d,%d,%d,%d", &plane_width, > -- > 2.0.0 > -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch