From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964876AbcALKMX (ORCPT ); Tue, 12 Jan 2016 05:12:23 -0500 Received: from terminus.zytor.com ([198.137.202.10]:56611 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964849AbcALKMS (ORCPT ); Tue, 12 Jan 2016 05:12:18 -0500 Date: Tue, 12 Jan 2016 02:11:53 -0800 From: tip-bot for Wang Nan Message-ID: Cc: masami.hiramatsu.pt@hitachi.com, mingo@kernel.org, tglx@linutronix.de, jolsa@kernel.org, hpa@zytor.com, lizefan@huawei.com, acme@redhat.com, linux-kernel@vger.kernel.org, wangnan0@huawei.com, namhyung@kernel.org Reply-To: linux-kernel@vger.kernel.org, wangnan0@huawei.com, namhyung@kernel.org, lizefan@huawei.com, acme@redhat.com, hpa@zytor.com, jolsa@kernel.org, tglx@linutronix.de, mingo@kernel.org, masami.hiramatsu.pt@hitachi.com In-Reply-To: <1452520124-2073-13-git-send-email-wangnan0@huawei.com> References: <1452520124-2073-13-git-send-email-wangnan0@huawei.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:perf/urgent] perf test: Reset err after using it hold errcode in hist testcases Git-Commit-ID: b0500c169b4069e40f03391c7280cd6eaf849e49 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: b0500c169b4069e40f03391c7280cd6eaf849e49 Gitweb: http://git.kernel.org/tip/b0500c169b4069e40f03391c7280cd6eaf849e49 Author: Wang Nan AuthorDate: Mon, 11 Jan 2016 13:48:03 +0000 Committer: Arnaldo Carvalho de Melo CommitDate: Mon, 11 Jan 2016 19:22:22 -0300 perf test: Reset err after using it hold errcode in hist testcases All hists test cases forget to reset err after using it to hold an error code. If error occure in setup_fake_machine() it incorrectly return TEST_OK. This patch fixes it. Suggested-and-Acked-by: Namhyung Kim Signed-off-by: Wang Nan Cc: Jiri Olsa Cc: Masami Hiramatsu Cc: Zefan Li Cc: pi3orama@163.com Link: http://lkml.kernel.org/r/1452520124-2073-13-git-send-email-wangnan0@huawei.com Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/tests/hists_cumulate.c | 1 + tools/perf/tests/hists_filter.c | 1 + tools/perf/tests/hists_link.c | 1 + tools/perf/tests/hists_output.c | 1 + 4 files changed, 4 insertions(+) diff --git a/tools/perf/tests/hists_cumulate.c b/tools/perf/tests/hists_cumulate.c index e360892..5e6a86e 100644 --- a/tools/perf/tests/hists_cumulate.c +++ b/tools/perf/tests/hists_cumulate.c @@ -706,6 +706,7 @@ int test__hists_cumulate(int subtest __maybe_unused) err = parse_events(evlist, "cpu-clock", NULL); if (err) goto out; + err = TEST_FAIL; machines__init(&machines); diff --git a/tools/perf/tests/hists_filter.c b/tools/perf/tests/hists_filter.c index 2a784be..351a424 100644 --- a/tools/perf/tests/hists_filter.c +++ b/tools/perf/tests/hists_filter.c @@ -120,6 +120,7 @@ int test__hists_filter(int subtest __maybe_unused) err = parse_events(evlist, "task-clock", NULL); if (err) goto out; + err = TEST_FAIL; /* default sort order (comm,dso,sym) will be used */ if (setup_sorting(NULL) < 0) diff --git a/tools/perf/tests/hists_link.c b/tools/perf/tests/hists_link.c index c764d69..64b257d 100644 --- a/tools/perf/tests/hists_link.c +++ b/tools/perf/tests/hists_link.c @@ -293,6 +293,7 @@ int test__hists_link(int subtest __maybe_unused) if (err) goto out; + err = TEST_FAIL; /* default sort order (comm,dso,sym) will be used */ if (setup_sorting(NULL) < 0) goto out; diff --git a/tools/perf/tests/hists_output.c b/tools/perf/tests/hists_output.c index ebe6cd4..b231265 100644 --- a/tools/perf/tests/hists_output.c +++ b/tools/perf/tests/hists_output.c @@ -597,6 +597,7 @@ int test__hists_output(int subtest __maybe_unused) err = parse_events(evlist, "cpu-clock", NULL); if (err) goto out; + err = TEST_FAIL; machines__init(&machines);