[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <tip-f95e0818cbd026a8f2277895c65fcc9cc5b28cf6@git.kernel.org>
Date: Sat, 8 Dec 2012 06:50:18 -0800
From: tip-bot for Jiri Olsa <jolsa@...hat.com>
To: linux-tip-commits@...r.kernel.org
Cc: linux-kernel@...r.kernel.org, paulus@...ba.org, acme@...hat.com,
hpa@...or.com, mingo@...nel.org, a.p.zijlstra@...llo.nl,
jolsa@...hat.com, fweisbec@...il.com, tglx@...utronix.de,
cjashfor@...ux.vnet.ibm.com, mingo@...e.hu
Subject: [tip:perf/core] perf tests:
Check for mkstemp return value in dso-data test
Commit-ID: f95e0818cbd026a8f2277895c65fcc9cc5b28cf6
Gitweb: http://git.kernel.org/tip/f95e0818cbd026a8f2277895c65fcc9cc5b28cf6
Author: Jiri Olsa <jolsa@...hat.com>
AuthorDate: Sat, 10 Nov 2012 01:46:52 +0100
Committer: Arnaldo Carvalho de Melo <acme@...hat.com>
CommitDate: Wed, 14 Nov 2012 16:50:30 -0300
perf tests: Check for mkstemp return value in dso-data test
Adding check for mkstemp return error value in dso-data test.
Reported-by: Arnaldo Carvalho de Melo <acme@...hat.com>
Signed-off-by: Jiri Olsa <jolsa@...hat.com>
Cc: Corey Ashford <cjashfor@...ux.vnet.ibm.com>
Cc: Frederic Weisbecker <fweisbec@...il.com>
Cc: Ingo Molnar <mingo@...e.hu>
Cc: Paul Mackerras <paulus@...ba.org>
Cc: Peter Zijlstra <a.p.zijlstra@...llo.nl>
Link: http://lkml.kernel.org/r/1352508412-16914-13-git-send-email-jolsa@redhat.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.com>
---
tools/perf/tests/dso-data.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/tools/perf/tests/dso-data.c b/tools/perf/tests/dso-data.c
index b5198f5..5eaffa2 100644
--- a/tools/perf/tests/dso-data.c
+++ b/tools/perf/tests/dso-data.c
@@ -26,6 +26,10 @@ static char *test_file(int size)
unsigned char *buf;
fd = mkstemp(templ);
+ if (fd < 0) {
+ perror("mkstemp failed");
+ return NULL;
+ }
buf = malloc(size);
if (!buf) {
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists