Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1508623

[PATCH 2/2] x86: use stderr if insn sanity test fails

From Paul Bolle <pebolle@tiscali.nl>
Newsgroups linux.kernel
Subject [PATCH 2/2] x86: use stderr if insn sanity test fails
Date 2016-10-25 23:00 +0200
Message-ID <swgZb-2cL-7@gated-at.bofh.it> (permalink)
References <swgZb-2cL-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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>
---
 arch/x86/tools/insn_sanity.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/x86/tools/insn_sanity.c b/arch/x86/tools/insn_sanity.c
index ba70ff232917..1972565ab106 100644
--- a/arch/x86/tools/insn_sanity.c
+++ b/arch/x86/tools/insn_sanity.c
@@ -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,
-- 
2.7.4

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/2] x86: use stdout for success and stdout for failure Paul Bolle <pebolle@tiscali.nl> - 2016-10-25 23:00 +0200
  [PATCH 2/2] x86: use stderr if insn sanity test fails Paul Bolle <pebolle@tiscali.nl> - 2016-10-25 23:00 +0200
    [tip:x86/asm] x86/decoder: Use stderr if insn sanity test fails tip-bot for Paul Bolle <tipbot@zytor.com> - 2016-10-26 09:00 +0200
  [PATCH 1/2] x86: use stdout if insn decoder test is successful Paul Bolle <pebolle@tiscali.nl> - 2016-10-25 23:00 +0200
    [tip:x86/asm] x86/decoder: Use stdout if insn decoder test is  successful tip-bot for Paul Bolle <tipbot@zytor.com> - 2016-10-26 09:00 +0200

csiph-web