Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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: 86dd6c04ef9f ("sched/balancing: Rename scheduler_tick() => sched_tick()")
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>

authored by

Steven Rostedt (Google) and committed by
Shuah Khan
c049acee 99338cc1

+8 -1
+8 -1
tools/testing/selftests/ftrace/test.d/ftrace/func_set_ftrace_file.tc
··· 19 19 20 20 FILTER=set_ftrace_filter 21 21 FUNC1="schedule" 22 - FUNC2="sched_tick" 22 + if grep '^sched_tick\b' available_filter_functions; then 23 + FUNC2="sched_tick" 24 + elif grep '^scheduler_tick\b' available_filter_functions; then 25 + FUNC2="scheduler_tick" 26 + else 27 + exit_unresolved 28 + fi 29 + 23 30 24 31 ALL_FUNCS="#### all functions enabled ####" 25 32