Skip to content

Commit

Permalink
selftests/ftrace: Add some missing glob checks
Browse files Browse the repository at this point in the history
[ 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]>
  • Loading branch information
rostedt authored and gregkh committed Apr 26, 2018
1 parent ae9c78a commit c5ce9e5
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@ ftrace_filter_check '*schedule*' '^.*schedule.*$'
# filter by *, end match
ftrace_filter_check 'schedule*' '^schedule.*$'

# filter by *mid*end
ftrace_filter_check '*aw*lock' '.*aw.*lock$'

# filter by start*mid*
ftrace_filter_check 'mutex*try*' '^mutex.*try.*'

# Advanced full-glob matching feature is recently supported.
# Skip the tests if we are sure the kernel does not support it.
if grep -q 'accepts: .* glob-matching-pattern' README ; then
Expand Down

0 comments on commit c5ce9e5

Please sign in to comment.