Skip to content

Commit

Permalink
x86/decoder: Use stderr if insn sanity test fails
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Paul Bolle authored and Ingo Molnar committed Oct 26, 2016
1 parent bdcc18b commit bb12d67
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion arch/x86/tools/insn_sanity.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit bb12d67

Please sign in to comment.