Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 349936
b: refs/heads/master
c: f4c1ea5
h: refs/heads/master
v: v3
  • Loading branch information
Jiri Olsa authored and Arnaldo Carvalho de Melo committed Jan 24, 2013
1 parent a5c13d4 commit 3204151
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 4 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: 20914ce5b9e1ef4a35f1f09a2c9c8fb8eb1c4d86
refs/heads/master: f4c1ea5f2a6b9e1c0aaa874ffb25fe4a4f9f1a3f
15 changes: 12 additions & 3 deletions trunk/tools/perf/tests/builtin-test.c
Original file line number Diff line number Diff line change
Expand Up @@ -129,10 +129,19 @@ static int __cmd_test(int argc, const char *argv[])
pr_debug("\n--- start ---\n");
err = tests[curr].func();
pr_debug("---- end ----\n%s:", tests[curr].desc);
if (err)
color_fprintf(stderr, PERF_COLOR_RED, " FAILED!\n");
else

switch (err) {
case TEST_OK:
pr_info(" Ok\n");
break;
case TEST_SKIP:
color_fprintf(stderr, PERF_COLOR_YELLOW, " Skip\n");
break;
case TEST_FAIL:
default:
color_fprintf(stderr, PERF_COLOR_RED, " FAILED!\n");
break;
}
}

return 0;
Expand Down
6 changes: 6 additions & 0 deletions trunk/tools/perf/tests/tests.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
#ifndef TESTS_H
#define TESTS_H

enum {
TEST_OK = 0,
TEST_FAIL = -1,
TEST_SKIP = -2,
};

/* Tests */
int test__vmlinux_matches_kallsyms(void);
int test__open_syscall_event(void);
Expand Down

0 comments on commit 3204151

Please sign in to comment.