Skip to content

Commit 75ec0ba

Browse files
committed
Merge tag 'linux-kselftest-5.7-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest
Pull kselftest updates from Shuah Khan: - ftrace test fixes to check for required filter files and kprobe args. - Kselftest build/cross-build dependency check script to make it easier for test ring admins/users to configure build systems correctly for build/cross-build kselftests. Currently checks library dependencies. - Checks if Kselftests can be built/cross-built on a system running compile test on a trivial C file with LDLIBS specified for each individual test in their Makefiles. - Prints suggested target list for a system filtering out tests failed the build dependency check from the TARGETS in Selftests the main Makefile when optional -p is specified. - Prints pass/fail dependency check for each tests/sub-test. - Prints pass/fail targets and libraries. - Default: runs dependency checks on all tests. - Optional test name can be specified to check dependencies for it. * tag 'linux-kselftest-5.7-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest: selftests/ftrace: Check the first record for kprobe_args_type.tc selftests: add build/cross-build dependency check script selftests/ftrace: Check required filter files before running test
2 parents af4a32a + f0c0d0c commit 75ec0ba

19 files changed

+315
-40
lines changed

tools/testing/selftests/ftrace/test.d/ftrace/fgraph-filter-stack.tc

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,7 @@ if ! grep -q function_graph available_tracers; then
1010
exit_unsupported
1111
fi
1212

13-
if [ ! -f set_ftrace_filter ]; then
14-
echo "set_ftrace_filter not found? Is dynamic ftrace not set?"
15-
exit_unsupported
16-
fi
13+
check_filter_file set_ftrace_filter
1714

1815
do_reset() {
1916
if [ -e /proc/sys/kernel/stack_tracer_enabled ]; then

tools/testing/selftests/ftrace/test.d/ftrace/fgraph-filter.tc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ if ! grep -q function_graph available_tracers; then
99
exit_unsupported
1010
fi
1111

12+
check_filter_file set_ftrace_filter
13+
1214
fail() { # msg
1315
echo $1
1416
exit_fail

tools/testing/selftests/ftrace/test.d/ftrace/func-filter-glob.tc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ if ! grep -q function available_tracers; then
99
exit_unsupported
1010
fi
1111

12+
check_filter_file set_ftrace_filter
13+
1214
disable_tracing
1315
clear_trace
1416

tools/testing/selftests/ftrace/test.d/ftrace/func-filter-notrace-pid.tc

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,7 @@ if [ ! -f set_ftrace_notrace_pid ]; then
1515
exit_unsupported
1616
fi
1717

18-
if [ ! -f set_ftrace_filter ]; then
19-
echo "set_ftrace_filter not found? Is function tracer not set?"
20-
exit_unsupported
21-
fi
18+
check_filter_file set_ftrace_filter
2219

2320
do_function_fork=1
2421

tools/testing/selftests/ftrace/test.d/ftrace/func-filter-pid.tc

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,7 @@ if [ ! -f set_ftrace_pid ]; then
1616
exit_unsupported
1717
fi
1818

19-
if [ ! -f set_ftrace_filter ]; then
20-
echo "set_ftrace_filter not found? Is function tracer not set?"
21-
exit_unsupported
22-
fi
19+
check_filter_file set_ftrace_filter
2320

2421
do_function_fork=1
2522

tools/testing/selftests/ftrace/test.d/ftrace/func-filter-stacktrace.tc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# description: ftrace - stacktrace filter command
44
# flags: instance
55

6-
[ ! -f set_ftrace_filter ] && exit_unsupported
6+
check_filter_file set_ftrace_filter
77

88
echo _do_fork:stacktrace >> set_ftrace_filter
99

tools/testing/selftests/ftrace/test.d/ftrace/func_event_triggers.tc

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,7 @@
1111
#
1212

1313
# The triggers are set within the set_ftrace_filter file
14-
if [ ! -f set_ftrace_filter ]; then
15-
echo "set_ftrace_filter not found? Is dynamic ftrace not set?"
16-
exit_unsupported
17-
fi
14+
check_filter_file set_ftrace_filter
1815

1916
do_reset() {
2017
reset_ftrace_filter

tools/testing/selftests/ftrace/test.d/ftrace/func_mod_trace.tc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# SPDX-License-Identifier: GPL-2.0
33
# description: ftrace - function trace on module
44

5-
[ ! -f set_ftrace_filter ] && exit_unsupported
5+
check_filter_file set_ftrace_filter
66

77
: "mod: allows to filter a non exist function"
88
echo 'non_exist_func:mod:non_exist_module' > set_ftrace_filter

tools/testing/selftests/ftrace/test.d/ftrace/func_profiler.tc

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,7 @@ if ! grep -q function_graph available_tracers; then
1818
exit_unsupported;
1919
fi
2020

21-
if [ ! -f set_ftrace_filter ]; then
22-
echo "set_ftrace_filter not found? Is dynamic ftrace not set?"
23-
exit_unsupported
24-
fi
21+
check_filter_file set_ftrace_filter
2522

2623
if [ ! -f function_profile_enabled ]; then
2724
echo "function_profile_enabled not found, function profiling enabled?"

tools/testing/selftests/ftrace/test.d/ftrace/func_set_ftrace_file.tc

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,7 @@
1010
#
1111

1212
# The triggers are set within the set_ftrace_filter file
13-
if [ ! -f set_ftrace_filter ]; then
14-
echo "set_ftrace_filter not found? Is dynamic ftrace not set?"
15-
exit_unsupported
16-
fi
13+
check_filter_file set_ftrace_filter
1714

1815
fail() { # mesg
1916
echo $1

0 commit comments

Comments
 (0)