diff options
author | Steven Rostedt (VMware) <rostedt@goodmis.org> | 2018-02-06 17:19:03 -0500 |
---|---|---|
committer | Steven Rostedt (VMware) <rostedt@goodmis.org> | 2018-02-08 10:13:28 -0500 |
commit | 97fe22adf33f06519bfdf7dad33bcd562e366c8f (patch) | |
tree | b0ae76021df0c889ba69ecb1bef395a99427619d /tools/testing | |
parent | 0787ce336075ac0fa2d356de4e3c2a2488e851a6 (diff) | |
download | op-kernel-dev-97fe22adf33f06519bfdf7dad33bcd562e366c8f.zip op-kernel-dev-97fe22adf33f06519bfdf7dad33bcd562e366c8f.tar.gz |
selftests/ftrace: Add some missing glob checks
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/20180127170748.GF13338@ZenIV.linux.org.uk
Cc: Shuah Khan <shuah@kernel.org>
Acked-by: Masami Hiramatsu <mhiramat@kernel.org>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Diffstat (limited to 'tools/testing')
-rw-r--r-- | tools/testing/selftests/ftrace/test.d/ftrace/func-filter-glob.tc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/testing/selftests/ftrace/test.d/ftrace/func-filter-glob.tc b/tools/testing/selftests/ftrace/test.d/ftrace/func-filter-glob.tc index 589d52b..27a54a1 100644 --- a/tools/testing/selftests/ftrace/test.d/ftrace/func-filter-glob.tc +++ b/tools/testing/selftests/ftrace/test.d/ftrace/func-filter-glob.tc @@ -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 |