mirror of
https://github.com/torvalds/linux.git
synced 2026-06-01 02:53:36 +02:00
selftests/ftrace: Fix test to handle both old and new kernels
The function "scheduler_tick" was renamed to "sched_tick" and a selftest
that used that function for testing function trace filtering used that
function as part of the test.
But the change causes it to fail when run on older kernels. As tests
should not fail on older kernels, add a check to see which name is
available before testing.
Fixes: 86dd6c04ef ("sched/balancing: Rename scheduler_tick() => sched_tick()")
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
This commit is contained in:
parent
99338cc1e4
commit
c049acee3c
|
|
@ -19,7 +19,14 @@ fail() { # mesg
|
|||
|
||||
FILTER=set_ftrace_filter
|
||||
FUNC1="schedule"
|
||||
FUNC2="sched_tick"
|
||||
if grep '^sched_tick\b' available_filter_functions; then
|
||||
FUNC2="sched_tick"
|
||||
elif grep '^scheduler_tick\b' available_filter_functions; then
|
||||
FUNC2="scheduler_tick"
|
||||
else
|
||||
exit_unresolved
|
||||
fi
|
||||
|
||||
|
||||
ALL_FUNCS="#### all functions enabled ####"
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user