From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756515Ab1LERoG (ORCPT ); Mon, 5 Dec 2011 12:44:06 -0500 Received: from terminus.zytor.com ([198.137.202.10]:58774 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756443Ab1LERnv (ORCPT ); Mon, 5 Dec 2011 12:43:51 -0500 Date: Mon, 5 Dec 2011 09:43:32 -0800 From: tip-bot for Masami Hiramatsu Message-ID: Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@redhat.com, masami.hiramatsu.pt@hitachi.com, tglx@linutronix.de, mingo@elte.hu Reply-To: mingo@redhat.com, hpa@zytor.com, linux-kernel@vger.kernel.org, masami.hiramatsu.pt@hitachi.com, tglx@linutronix.de, mingo@elte.hu In-Reply-To: <20111205120550.15475.70149.stgit@cloud> References: <20111205120550.15475.70149.stgit@cloud> To: linux-tip-commits@vger.kernel.org Subject: [tip:perf/core] x86/tools: Fix insn_sanity message outputs Git-Commit-ID: e70825fc51e149366ab5659bd36beb73aad187a0 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.6 (terminus.zytor.com [127.0.0.1]); Mon, 05 Dec 2011 09:43:38 -0800 (PST) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: e70825fc51e149366ab5659bd36beb73aad187a0 Gitweb: http://git.kernel.org/tip/e70825fc51e149366ab5659bd36beb73aad187a0 Author: Masami Hiramatsu AuthorDate: Mon, 5 Dec 2011 21:05:50 +0900 Committer: Ingo Molnar CommitDate: Mon, 5 Dec 2011 14:53:19 +0100 x86/tools: Fix insn_sanity message outputs Fix x86 instruction decoder test to dump all error messages to stderr and others to stdout. Signed-off-by: Masami Hiramatsu Cc: "H. Peter Anvin" Cc: yrl.pp-manager.tt@hitachi.com Link: http://lkml.kernel.org/r/20111205120550.15475.70149.stgit@cloud Signed-off-by: Ingo Molnar --- arch/x86/tools/insn_sanity.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86/tools/insn_sanity.c b/arch/x86/tools/insn_sanity.c index 2025603..b6720d6 100644 --- a/arch/x86/tools/insn_sanity.c +++ b/arch/x86/tools/insn_sanity.c @@ -102,7 +102,7 @@ static void dump_stream(FILE *fp, const char *msg, unsigned long nr_iter, fprintf(fp, "%s:\n", msg); - dump_insn(stderr, insn); + dump_insn(fp, insn); fprintf(fp, "You can reproduce this with below command(s);\n"); @@ -260,7 +260,7 @@ int main(int argc, char **argv) if (insn.next_byte <= insn.kaddr || insn.kaddr + MAX_INSN_SIZE < insn.next_byte) { /* Access out-of-range memory */ - dump_stream(stdout, "Error: Found an access violation", i, insn_buf, &insn); + dump_stream(stderr, "Error: Found an access violation", i, insn_buf, &insn); errors++; } else if (verbose && !insn_complete(&insn)) dump_stream(stdout, "Info: Found an undecodable input", i, insn_buf, &insn);