summaryrefslogtreecommitdiffstats
path: root/tools/perf/tests/tests.h
diff options
context:
space:
mode:
authorJiri Olsa <jolsa@redhat.com>2013-06-07 15:37:03 +0200
committerArnaldo Carvalho de Melo <acme@redhat.com>2013-07-12 13:45:52 -0300
commit450ac18d8f8076f0c522af1afb8519614a3b32f5 (patch)
tree1e5740504753077f49be14274747a66c44efc66a /tools/perf/tests/tests.h
parent5888a8c26e5f8e76334d579637f9ed55036cec5a (diff)
downloadblackbird-op-linux-450ac18d8f8076f0c522af1afb8519614a3b32f5.tar.gz
blackbird-op-linux-450ac18d8f8076f0c522af1afb8519614a3b32f5.zip
perf tests: Make TEST_ASSERT_VAL global
Making TEST_ASSERT_VAL global as it's used in multiple objects. Signed-off-by: Jiri Olsa <jolsa@redhat.com> Cc: Andi Kleen <ak@linux.intel.com> Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com> Cc: David Ahern <dsahern@gmail.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Link: http://lkml.kernel.org/r/1370612223-19188-3-git-send-email-jolsa@redhat.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/tests/tests.h')
-rw-r--r--tools/perf/tests/tests.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/tools/perf/tests/tests.h b/tools/perf/tests/tests.h
index dd7feae2d37b..07a92f9c6712 100644
--- a/tools/perf/tests/tests.h
+++ b/tools/perf/tests/tests.h
@@ -1,6 +1,14 @@
#ifndef TESTS_H
#define TESTS_H
+#define TEST_ASSERT_VAL(text, cond) \
+do { \
+ if (!(cond)) { \
+ pr_debug("FAILED %s:%d %s\n", __FILE__, __LINE__, text); \
+ return -1; \
+ } \
+} while (0)
+
enum {
TEST_OK = 0,
TEST_FAIL = -1,
OpenPOWER on IntegriCloud