summaryrefslogtreecommitdiff
path: root/tools/perf/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/tests')
-rw-r--r--tools/perf/tests/attr.c3
-rw-r--r--tools/perf/tests/builtin-test.c34
-rw-r--r--tools/perf/tests/dso-data.c3
-rw-r--r--tools/perf/tests/parse-events.c3
-rw-r--r--tools/perf/tests/tests.h3
5 files changed, 16 insertions, 30 deletions
diff --git a/tools/perf/tests/attr.c b/tools/perf/tests/attr.c
index 6e2feee8db2a..25638a986257 100644
--- a/tools/perf/tests/attr.c
+++ b/tools/perf/tests/attr.c
@@ -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];
diff --git a/tools/perf/tests/builtin-test.c b/tools/perf/tests/builtin-test.c
index d3b95e04b7a3..186f67535494 100644
--- a/tools/perf/tests/builtin-test.c
+++ b/tools/perf/tests/builtin-test.c
@@ -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,
diff --git a/tools/perf/tests/dso-data.c b/tools/perf/tests/dso-data.c
index 0cd42fc9bc13..b5198f52c24a 100644
--- a/tools/perf/tests/dso-data.c
+++ b/tools/perf/tests/dso-data.c
@@ -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;
diff --git a/tools/perf/tests/parse-events.c b/tools/perf/tests/parse-events.c
index b49c2eebff33..f2a82d0158c0 100644
--- a/tools/perf/tests/parse-events.c
+++ b/tools/perf/tests/parse-events.c
@@ -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;
diff --git a/tools/perf/tests/tests.h b/tools/perf/tests/tests.h
index 88a55dfa99d0..fc121edab016 100644
--- a/tools/perf/tests/tests.h
+++ b/tools/perf/tests/tests.h
@@ -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);