Skip to content

Commit c5ce9e5

Browse files
rostedtgregkh
authored andcommitted
selftests/ftrace: Add some missing glob checks
[ Upstream commit 97fe22a ] Al Viro discovered a bug in the glob ftrace filtering code where "*a*b" is treated the same as "a*b", and functions that would be selected by "*a*b" but not "a*b" are not selected with "*a*b". Add tests for patterns "*a*b" and "a*b*" to the glob selftest. Link: http://lkml.kernel.org/r/[email protected] Cc: Shuah Khan <[email protected]> Acked-by: Masami Hiramatsu <[email protected]> Signed-off-by: Steven Rostedt (VMware) <[email protected]> Signed-off-by: Sasha Levin <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent ae9c78a commit c5ce9e5

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,12 @@ ftrace_filter_check '*schedule*' '^.*schedule.*$'
2929
# filter by *, end match
3030
ftrace_filter_check 'schedule*' '^schedule.*$'
3131

32+
# filter by *mid*end
33+
ftrace_filter_check '*aw*lock' '.*aw.*lock$'
34+
35+
# filter by start*mid*
36+
ftrace_filter_check 'mutex*try*' '^mutex.*try.*'
37+
3238
# Advanced full-glob matching feature is recently supported.
3339
# Skip the tests if we are sure the kernel does not support it.
3440
if grep -q 'accepts: .* glob-matching-pattern' README ; then

0 commit comments

Comments
 (0)