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,
#include "../perf.h"
#include "util.h"
#include "exec_cmd.h"
+#include "tests.h"
#define ENV "PERF_TEST_ATTR"
return system(cmd);
}
-int test_attr__run(void)
+int test__attr(void)
{
struct stat st;
char path_perf[PATH_MAX];
* 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;
},
{
.desc = "parse events tests",
- .func = parse_events__test,
+ .func = test__parse_events,
},
#if defined(__x86_64__) || defined(__i386__)
{
},
{
.desc = "Test dso data interface",
- .func = dso__test_data,
+ .func = test__dso_data,
},
{
.desc = "roundtrip evsel->name check",
},
{
.desc = "struct perf_event_attr setup",
- .func = test_attr__run,
+ .func = test__attr,
},
{
.func = NULL,
#include "machine.h"
#include "symbol.h"
+#include "tests.h"
#define TEST_ASSERT_VAL(text, cond) \
do { \
},
};
-int dso__test_data(void)
+int test__dso_data(void)
{
struct machine machine;
struct dso *dso;
#include "evlist.h"
#include "sysfs.h"
#include "../../../include/linux/hw_breakpoint.h"
+#include "tests.h"
#define TEST_ASSERT_VAL(text, cond) \
do { \
return ret;
}
-int parse_events__test(void)
+int test__parse_events(void)
{
int ret1, ret2 = 0;
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);
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);
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);