Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 312326
b: refs/heads/master
c: ebf124f
h: refs/heads/master
v: v3
  • Loading branch information
Jiri Olsa authored and Arnaldo Carvalho de Melo committed Jul 4, 2012
1 parent d34a8fa commit 6bb1b3b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 20 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 17d7a1123f0f6d532830152564cc812cc73db2f3
refs/heads/master: ebf124ffab59e9e1c6179347fe95fe5baf32dcd7
29 changes: 10 additions & 19 deletions trunk/tools/perf/util/parse-events-test.c
Original file line number Diff line number Diff line change
Expand Up @@ -634,8 +634,6 @@ static struct test__event_st test__events[] = {
},
};

#define TEST__EVENTS_CNT (sizeof(test__events) / sizeof(struct test__event_st))

static struct test__event_st test__events_pmu[] = {
[0] = {
.name = "cpu/config=10,config1,config2=3,period=1000/u",
Expand All @@ -647,9 +645,6 @@ static struct test__event_st test__events_pmu[] = {
},
};

#define TEST__EVENTS_PMU_CNT (sizeof(test__events_pmu) / \
sizeof(struct test__event_st))

struct test__term {
const char *str;
__u32 type;
Expand Down Expand Up @@ -765,21 +760,17 @@ int parse_events__test(void)
{
int ret;

do {
ret = test_events(test__events, TEST__EVENTS_CNT);
if (ret)
break;

if (test_pmu()) {
ret = test_events(test__events_pmu,
TEST__EVENTS_PMU_CNT);
if (ret)
break;
}
#define TEST_EVENTS(tests) \
do { \
ret = test_events(tests, ARRAY_SIZE(tests)); \
if (ret) \
return ret; \
} while (0)

ret = test_terms(test__terms, TEST__TERMS_CNT);
TEST_EVENTS(test__events);

} while (0);
if (test_pmu())
TEST_EVENTS(test__events_pmu);

return ret;
return test_terms(test__terms, ARRAY_SIZE(test__terms));
}

0 comments on commit 6bb1b3b

Please sign in to comment.