From: tip-bot for Jiri Olsa <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: namhyung@kernel.org, dsahern@gmail.com, tglx@linutronix.de,
jolsa@kernel.org, linux-kernel@vger.kernel.org, hpa@zytor.com,
acme@redhat.com, a.p.zijlstra@chello.nl,
tmricht@linux.vnet.ibm.com, mingo@kernel.org
Subject: [tip:perf/core] perf tests attr: Do not store failed events
Date: Thu, 20 Jul 2017 01:51:11 -0700 [thread overview]
Message-ID: <tip-d78ada4a767a744cad5efa210b8acf57748b91d7@git.kernel.org> (raw)
In-Reply-To: <20170703145030.12903-3-jolsa@kernel.org>
Commit-ID: d78ada4a767a744cad5efa210b8acf57748b91d7
Gitweb: http://git.kernel.org/tip/d78ada4a767a744cad5efa210b8acf57748b91d7
Author: Jiri Olsa <jolsa@kernel.org>
AuthorDate: Mon, 3 Jul 2017 16:50:17 +0200
Committer: Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Tue, 18 Jul 2017 23:14:14 -0300
perf tests attr: Do not store failed events
Do not mess up our temp space with files we don't
need - failed event open attempts.
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Thomas Richter <tmricht@linux.vnet.ibm.com>
Link: http://lkml.kernel.org/r/20170703145030.12903-3-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/tests/attr.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/perf/tests/attr.c b/tools/perf/tests/attr.c
index 0e77b2c..08b1d5c 100644
--- a/tools/perf/tests/attr.c
+++ b/tools/perf/tests/attr.c
@@ -136,7 +136,7 @@ void test_attr__open(struct perf_event_attr *attr, pid_t pid, int cpu,
{
int errno_saved = errno;
- if (store_event(attr, pid, cpu, fd, group_fd, flags)) {
+ if ((fd != -1) && store_event(attr, pid, cpu, fd, group_fd, flags)) {
pr_err("test attr FAILED");
exit(128);
}
next prev parent reply other threads:[~2017-07-20 8:53 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-03 14:50 [PATCH 00/15] perf tools: Fix attr tests Jiri Olsa
2017-07-03 14:50 ` [PATCH 01/15] perf tools: Fix -n option Jiri Olsa
2017-07-03 14:57 ` Arnaldo Carvalho de Melo
2017-07-03 15:16 ` [PATCHv2 " Jiri Olsa
2017-07-03 16:10 ` Arnaldo Carvalho de Melo
2017-07-03 16:22 ` Jiri Olsa
2017-07-03 16:40 ` Arnaldo Carvalho de Melo
2017-07-03 16:58 ` Jiri Olsa
2017-07-03 17:44 ` Arnaldo Carvalho de Melo
2017-07-03 14:50 ` [PATCH 02/15] perf tests attr: Do not store failed events Jiri Olsa
2017-07-20 8:51 ` tip-bot for Jiri Olsa [this message]
2017-07-03 14:50 ` [PATCH 03/15] perf tests attr: Add test_attr__ready function Jiri Olsa
2017-07-20 8:51 ` [tip:perf/core] " tip-bot for Jiri Olsa
2017-07-03 14:50 ` [PATCH 04/15] perf tests attr: Make compare_data global Jiri Olsa
2017-07-20 8:51 ` [tip:perf/core] " tip-bot for Jiri Olsa
2017-07-03 14:50 ` [PATCH 05/15] perf tests attr: Rename compare_data to data_equal Jiri Olsa
2017-07-20 8:52 ` [tip:perf/core] " tip-bot for Jiri Olsa
2017-07-03 14:50 ` [PATCH 06/15] perf tests attr: Add 1s for exclude_kernel and task base bits Jiri Olsa
2017-07-20 8:52 ` [tip:perf/core] " tip-bot for Jiri Olsa
2017-07-03 14:50 ` [PATCH 07/15] perf tests attr: Fix record dwarf test Jiri Olsa
2017-07-20 8:52 ` [tip:perf/core] " tip-bot for Jiri Olsa
2017-07-03 14:50 ` [PATCH 08/15] perf tests attr: Fix no-delay test Jiri Olsa
2017-07-20 8:53 ` [tip:perf/core] " tip-bot for Jiri Olsa
2017-07-03 14:50 ` [PATCH 09/15] perf tests attr: Add proper return values Jiri Olsa
2017-07-20 8:53 ` [tip:perf/core] " tip-bot for Jiri Olsa
2017-07-03 14:50 ` [PATCH 10/15] perf tests attr: Fix cpu test disabled term setup Jiri Olsa
2017-07-20 8:53 ` [tip:perf/core] " tip-bot for Jiri Olsa
2017-07-03 14:50 ` [PATCH 11/15] perf tests attr: Fix sample_period setup Jiri Olsa
2017-07-20 8:54 ` [tip:perf/core] " tip-bot for Jiri Olsa
2017-07-03 14:50 ` [PATCH 12/15] perf tests attr: Fix precise_ip setup Jiri Olsa
2017-07-20 8:54 ` [tip:perf/core] " tip-bot for Jiri Olsa
2017-07-03 14:50 ` [PATCH 13/15] perf tests attr: Fix stat sample_type setup Jiri Olsa
2017-07-20 8:54 ` [tip:perf/core] " tip-bot for Jiri Olsa
2017-07-03 14:50 ` [PATCH 14/15] perf tests attr: Add optional term Jiri Olsa
2017-07-20 8:55 ` [tip:perf/core] " tip-bot for Jiri Olsa
2017-07-03 14:50 ` [PATCH 15/15] perf tests attr: Fix task term values Jiri Olsa
2017-08-09 15:00 ` Jiri Olsa
2017-08-10 7:07 ` Thomas Richter
2017-10-03 16:43 ` [tip:perf/core] " tip-bot for Jiri Olsa
2017-07-17 12:18 ` [PATCH 00/15] perf tools: Fix attr tests Jiri Olsa
2017-07-17 12:51 ` Arnaldo Carvalho de Melo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=tip-d78ada4a767a744cad5efa210b8acf57748b91d7@git.kernel.org \
--to=tipbot@zytor.com \
--cc=a.p.zijlstra@chello.nl \
--cc=acme@redhat.com \
--cc=dsahern@gmail.com \
--cc=hpa@zytor.com \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=namhyung@kernel.org \
--cc=tglx@linutronix.de \
--cc=tmricht@linux.vnet.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).