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 <[email protected]>
Cc: Andrew Morton <[email protected]>
Cc: Linus Torvalds <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
  • Loading branch information
pebolle 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.