perf tests: Make TEST_ASSERT_VAL global
authorJiri Olsa <[email protected]>
Fri, 7 Jun 2013 13:37:03 +0000 (15:37 +0200)
committerArnaldo Carvalho de Melo <[email protected]>
Fri, 12 Jul 2013 16:45:52 +0000 (13:45 -0300)
Making TEST_ASSERT_VAL global as it's used in multiple objects.

Signed-off-by: Jiri Olsa <[email protected]>
Cc: Andi Kleen <[email protected]>
Cc: Corey Ashford <[email protected]>
Cc: David Ahern <[email protected]>
Cc: Frederic Weisbecker <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Paul Mackerras <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
tools/perf/tests/dso-data.c
tools/perf/tests/parse-events.c
tools/perf/tests/tests.h

index 5eaffa2de9c5816399a2b455f25857fec46a9613..dffe0551acaa717add54e96bfb864c8fbf6cf2d6 100644 (file)
 #include "symbol.h"
 #include "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)
-
 static char *test_file(int size)
 {
        static char buf_templ[] = "/tmp/test-XXXXXX";
index 0275bab4ea9e83e95cf76d7408dc3649a5ccee4d..ad950f57d85bb50d16c8f98f1147953ba3dcf108 100644 (file)
@@ -7,14 +7,6 @@
 #include "tests.h"
 #include <linux/hw_breakpoint.h>
 
-#define TEST_ASSERT_VAL(text, cond) \
-do { \
-       if (!(cond)) { \
-               pr_debug("FAILED %s:%d %s\n", __FILE__, __LINE__, text); \
-               return -1; \
-       } \
-} while (0)
-
 #define PERF_TP_SAMPLE_TYPE (PERF_SAMPLE_RAW | PERF_SAMPLE_TIME | \
                             PERF_SAMPLE_CPU | PERF_SAMPLE_PERIOD)
 
index dd7feae2d37b83248fa8279891953503a69d3aec..07a92f9c67123d578c8069a3a24f8090b6cd9ce1 100644 (file)
@@ -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,