Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 323723
b: refs/heads/master
c: 9bfbbc6
h: refs/heads/master
i:
  323721: d381250
  323719: 8b11c09
v: v3
  • Loading branch information
Robert Richter authored and Arnaldo Carvalho de Melo committed Aug 22, 2012
1 parent 6a2ea84 commit 0251451
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 11 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: d45a3e00687bb52a20d9256d3d1068eea271013f
refs/heads/master: 9bfbbc6d1e6b4d055860231e232b807911bf8325
24 changes: 14 additions & 10 deletions trunk/tools/perf/util/parse-events-test.c
Original file line number Diff line number Diff line change
Expand Up @@ -948,19 +948,19 @@ static int test_event(struct test__event_st *e)

static int test_events(struct test__event_st *events, unsigned cnt)
{
int ret = 0;
int ret1, ret2 = 0;
unsigned i;

for (i = 0; i < cnt; i++) {
struct test__event_st *e = &events[i];

pr_debug("running test %d '%s'\n", i, e->name);
ret = test_event(e);
if (ret)
break;
ret1 = test_event(e);
if (ret1)
ret2 = ret1;
}

return ret;
return ret2;
}

static int test_term(struct test__term *t)
Expand Down Expand Up @@ -1021,19 +1021,23 @@ static int test_pmu(void)

int parse_events__test(void)
{
int ret;
int ret1, ret2 = 0;

#define TEST_EVENTS(tests) \
do { \
ret = test_events(tests, ARRAY_SIZE(tests)); \
if (ret) \
return ret; \
ret1 = test_events(tests, ARRAY_SIZE(tests)); \
if (!ret2) \
ret2 = ret1; \
} while (0)

TEST_EVENTS(test__events);

if (test_pmu())
TEST_EVENTS(test__events_pmu);

return test_terms(test__terms, ARRAY_SIZE(test__terms));
ret1 = test_terms(test__terms, ARRAY_SIZE(test__terms));
if (!ret2)
ret2 = ret1;

return ret2;
}

0 comments on commit 0251451

Please sign in to comment.