[lkml]   [2018]   [Apr]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[PATCH 4.14 152/183] selftests/ftrace: Add some missing glob checks
4.14-stable review patch.  If anyone has any objections, please let me know.


From: "Steven Rostedt (VMware)" <>

[ Upstream commit 97fe22adf33f06519bfdf7dad33bcd562e366c8f ]

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.


Cc: Shuah Khan <>
Acked-by: Masami Hiramatsu <>
Signed-off-by: Steven Rostedt (VMware) <>
Signed-off-by: Sasha Levin <>
Signed-off-by: Greg Kroah-Hartman <>
tools/testing/selftests/ftrace/test.d/ftrace/ | 6 ++++++
1 file changed, 6 insertions(+)

--- a/tools/testing/selftests/ftrace/test.d/ftrace/
+++ b/tools/testing/selftests/ftrace/test.d/ftrace/
@@ -29,6 +29,12 @@ ftrace_filter_check '*schedule*' '^.*sch
# 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

 \ /
  Last update: 2018-04-25 12:46    [W:0.291 / U:1.864 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site