perf tests: Final cleanup for builtin-test move
authorJiri Olsa <jolsa@redhat.com>
Sat, 10 Nov 2012 00:46:51 +0000 (01:46 +0100)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 14 Nov 2012 19:50:24 +0000 (16:50 -0300)
Final function renames to match test__* style and include cleanup.

Signed-off-by: Jiri Olsa <jolsa@redhat.com>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1352508412-16914-12-git-send-email-jolsa@redhat.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/perf.h
tools/perf/tests/attr.c
tools/perf/tests/builtin-test.c
tools/perf/tests/dso-data.c
tools/perf/tests/parse-events.c
tools/perf/tests/tests.h
tools/perf/util/parse-events.h
tools/perf/util/symbol.h

index 054182e41dca23b6492309aa488a7dacee11bb00..00472646b3bf4ab176dbbc4546575b1b6bbc4922 100644 (file)
@@ -178,7 +178,6 @@ extern bool test_attr__enabled;
 void test_attr__init(void);
 void test_attr__open(struct perf_event_attr *attr, pid_t pid, int cpu,
                     int fd, int group_fd, unsigned long flags);
-int  test_attr__run(void);
 
 static inline int
 sys_perf_event_open(struct perf_event_attr *attr,
index 6e2feee8db2a207662f87cb33484c43f10c3d3bd..25638a986257a58ef664f5d68b39833987988406 100644 (file)
@@ -27,6 +27,7 @@
 #include "../perf.h"
 #include "util.h"
 #include "exec_cmd.h"
+#include "tests.h"
 
 #define ENV "PERF_TEST_ATTR"
 
@@ -151,7 +152,7 @@ static int run_dir(const char *d, const char *perf)
        return system(cmd);
 }
 
-int test_attr__run(void)
+int test__attr(void)
 {
        struct stat st;
        char path_perf[PATH_MAX];
index d3b95e04b7a3e6918b6798ff6760e73562b01a97..186f675354945cac0e870502e450cec1e9a38a63 100644 (file)
@@ -4,31 +4,11 @@
  * Builtin regression testing command: ever growing number of sanity tests
  */
 #include "builtin.h"
-
-#include "util/cache.h"
-#include "util/color.h"
-#include "util/debug.h"
-#include "util/debugfs.h"
-#include "util/evlist.h"
-#include "util/machine.h"
-#include "util/parse-options.h"
-#include "util/parse-events.h"
-#include "util/symbol.h"
-#include "util/thread_map.h"
-#include "util/pmu.h"
-#include "event-parse.h"
-#include "../../include/linux/hw_breakpoint.h"
-
-#include <sys/mman.h>
-
-#include "util/cpumap.h"
-#include "util/evsel.h"
-#include <sys/types.h>
-
 #include "tests.h"
-
-#include <sched.h>
-
+#include "debug.h"
+#include "color.h"
+#include "parse-options.h"
+#include "symbol.h"
 
 static struct test {
        const char *desc;
@@ -52,7 +32,7 @@ static struct test {
        },
        {
                .desc = "parse events tests",
-               .func = parse_events__test,
+               .func = test__parse_events,
        },
 #if defined(__x86_64__) || defined(__i386__)
        {
@@ -70,7 +50,7 @@ static struct test {
        },
        {
                .desc = "Test dso data interface",
-               .func = dso__test_data,
+               .func = test__dso_data,
        },
        {
                .desc = "roundtrip evsel->name check",
@@ -86,7 +66,7 @@ static struct test {
        },
        {
                .desc = "struct perf_event_attr setup",
-               .func = test_attr__run,
+               .func = test__attr,
        },
        {
                .func = NULL,
index 0cd42fc9bc135ae15cb00f8dea840b78959c9f72..b5198f52c24a5c1ee3f50f3b824a370c6522a94e 100644 (file)
@@ -8,6 +8,7 @@
 
 #include "machine.h"
 #include "symbol.h"
+#include "tests.h"
 
 #define TEST_ASSERT_VAL(text, cond) \
 do { \
@@ -95,7 +96,7 @@ struct test_data_offset offsets[] = {
        },
 };
 
-int dso__test_data(void)
+int test__dso_data(void)
 {
        struct machine machine;
        struct dso *dso;
index b49c2eebff33984454db6f349e16437c6c7f62e8..f2a82d0158c0b261bd5533ce0b227788824365df 100644 (file)
@@ -4,6 +4,7 @@
 #include "evlist.h"
 #include "sysfs.h"
 #include "../../../include/linux/hw_breakpoint.h"
+#include "tests.h"
 
 #define TEST_ASSERT_VAL(text, cond) \
 do { \
@@ -1086,7 +1087,7 @@ static int test_pmu_events(void)
        return ret;
 }
 
-int parse_events__test(void)
+int test__parse_events(void)
 {
        int ret1, ret2 = 0;
 
index 88a55dfa99d064c24755ed3112d21511d53b7f34..fc121edab0168abc7b5ecd8597ddc97c392c3e7a 100644 (file)
@@ -12,6 +12,9 @@ int test__perf_evsel__roundtrip_name_test(void);
 int test__perf_evsel__tp_sched_test(void);
 int test__syscall_open_tp_fields(void);
 int test__pmu(void);
+int test__attr(void);
+int test__dso_data(void);
+int test__parse_events(void);
 
 /* Util */
 int trace_event__id(const char *evname);
index ac9a6aacf2f53d54abbf02f17130ab42fc924dbc..f6399373d67d8f7ad2622f48d42fc43fe86513da 100644 (file)
@@ -99,7 +99,6 @@ void parse_events__set_leader(char *name, struct list_head *list);
 void parse_events_update_lists(struct list_head *list_event,
                               struct list_head *list_all);
 void parse_events_error(void *data, void *scanner, char const *msg);
-int parse_events__test(void);
 
 void print_events(const char *event_glob, bool name_only);
 void print_events_type(u8 type);
index 04ccf29620809e1be1078ddfdbdd9a705ec886f3..de68f98b236d42231ce5e1307367adeb45d9351e 100644 (file)
@@ -224,7 +224,6 @@ size_t symbol__fprintf_symname(const struct symbol *sym, FILE *fp);
 size_t symbol__fprintf(struct symbol *sym, FILE *fp);
 bool symbol_type__is_a(char symbol_type, enum map_type map_type);
 
-int dso__test_data(void);
 int dso__load_sym(struct dso *dso, struct map *map, struct symsrc *syms_ss,
                  struct symsrc *runtime_ss, symbol_filter_t filter,
                  int kmodule);