selftests/ftrace: Add some missing glob checks

"Linux Kernel Mailing List" <[email protected]>
Newsgroups gmane.linux.kernel.commits.head
Message-ID <[email protected]>
Web:        https://git.kernel.org/torvalds/c/97fe22adf33f06519bfdf7dad33bcd562e366c8f
Commit:     97fe22adf33f06519bfdf7dad33bcd562e366c8f
Parent:     0787ce336075ac0fa2d356de4e3c2a2488e851a6
Refname:    refs/heads/master
Author:     Steven Rostedt (VMware) <[email protected]>
AuthorDate: Tue Feb 6 17:19:03 2018 -0500
Committer:  Steven Rostedt (VMware) <[email protected]>
CommitDate: Thu Feb 8 10:13:28 2018 -0500

    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/[email protected]
    
    Cc: Shuah Khan <[email protected]>
    Acked-by: Masami Hiramatsu <[email protected]>
    Signed-off-by: Steven Rostedt (VMware) <[email protected]>
---
 tools/testing/selftests/ftrace/test.d/ftrace/func-filter-glob.tc | 6 ++++++
 1 file changed, 6 insertions(+)

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 589d52b211b7..27a54a17da65 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
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.