x86/decoder: Use stderr if insn sanity test fails
authorPaul Bolle <pebolle@tiscali.nl>
Tue, 25 Oct 2016 20:56:05 +0000 (22:56 +0200)
committerIngo Molnar <mingo@kernel.org>
Wed, 26 Oct 2016 06:41:06 +0000 (08:41 +0200)
If the instruction sanity test fails, it prints a "Failure" message to
stdout. Make this program behave like the rest of the build and print
that message to stderr.

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/1477428965-20548-3-git-send-email-pebolle@tiscali.nl
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/x86/tools/insn_sanity.c

index ba70ff2329176f0569847c4cd09053761376ccc1..1972565ab10665725bf01029fb81d3a9d92fcba8 100644 (file)
@@ -269,7 +269,8 @@ int main(int argc, char **argv)
                insns++;
        }
 
-       fprintf(stdout, "%s: %s: decoded and checked %d %s instructions with %d errors (seed:0x%x)\n",
+       fprintf((errors) ? stderr : stdout,
+               "%s: %s: decoded and checked %d %s instructions with %d errors (seed:0x%x)\n",
                prog,
                (errors) ? "Failure" : "Success",
                insns,