diff options
author | Steven Rostedt <srostedt@redhat.com> | 2013-01-22 23:35:11 -0500 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2013-01-22 23:35:11 -0500 |
commit | 05cbbf643b8eea1be21082c53cdb856d1dc6d765 (patch) | |
tree | 74d3484ab036aa7d50473562bb995d6a6ab95b74 /kernel/trace | |
parent | 34600f0e9c33c9cd48ae87448205f51332b7d5a0 (diff) |
tracing: Fix selftest function recursion accounting
The test that checks function recursion does things differently
if the arch does not support all ftrace features. But that really
doesn't make a difference with how the test runs, and either way
the count variable should be 2 at the end.
Currently the test wrongly fails for archs that don't support all
the ftrace features.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'kernel/trace')
-rw-r--r-- | kernel/trace/trace_selftest.c | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/kernel/trace/trace_selftest.c b/kernel/trace/trace_selftest.c index 6c62d58d8e87..adb008a0136f 100644 --- a/kernel/trace/trace_selftest.c +++ b/kernel/trace/trace_selftest.c | |||
@@ -452,7 +452,6 @@ trace_selftest_function_recursion(void) | |||
452 | char *func_name; | 452 | char *func_name; |
453 | int len; | 453 | int len; |
454 | int ret; | 454 | int ret; |
455 | int cnt; | ||
456 | 455 | ||
457 | /* The previous test PASSED */ | 456 | /* The previous test PASSED */ |
458 | pr_cont("PASSED\n"); | 457 | pr_cont("PASSED\n"); |
@@ -510,19 +509,10 @@ trace_selftest_function_recursion(void) | |||
510 | 509 | ||
511 | unregister_ftrace_function(&test_recsafe_probe); | 510 | unregister_ftrace_function(&test_recsafe_probe); |
512 | 511 | ||
513 | /* | ||
514 | * If arch supports all ftrace features, and no other task | ||
515 | * was on the list, we should be fine. | ||
516 | */ | ||
517 | if (!ftrace_nr_registered_ops() && !FTRACE_FORCE_LIST_FUNC) | ||
518 | cnt = 2; /* Should have recursed */ | ||
519 | else | ||
520 | cnt = 1; | ||
521 | |||
522 | ret = -1; | 512 | ret = -1; |
523 | if (trace_selftest_recursion_cnt != cnt) { | 513 | if (trace_selftest_recursion_cnt != 2) { |
524 | pr_cont("*callback not called expected %d times (%d)* ", | 514 | pr_cont("*callback not called expected 2 times (%d)* ", |
525 | cnt, trace_selftest_recursion_cnt); | 515 | trace_selftest_recursion_cnt); |
526 | goto out; | 516 | goto out; |
527 | } | 517 | } |
528 | 518 | ||