Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

selftests: ftrace: Fix trigger-mod to run without syscall trace

Since histogram trigger id.syscall depends on CONFIG_FTRACE_SYSCALLS,
a testcase in trigger-modifier test fails if that config is disabled.

Fix this bug by using flexible pattern to check the histogram output.

Link: http://lkml.kernel.org/r/147928402670.22982.15589445159052676877.stgit@devbox

Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>

authored by

Masami Hiramatsu and committed by
Steven Rostedt
780ade55 131c60c3

+1 -1
+1 -1
tools/testing/selftests/ftrace/test.d/trigger/trigger-hist-mod.tc
··· 56 56 57 57 echo 'hist:keys=id.syscall' > events/raw_syscalls/sys_exit/trigger 58 58 for i in `seq 1 10` ; do ( echo "forked" > /dev/null); done 59 - grep "id: sys_" events/raw_syscalls/sys_exit/hist > /dev/null || \ 59 + grep "id: \(unknown_\|sys_\)" events/raw_syscalls/sys_exit/hist > /dev/null || \ 60 60 fail "syscall modifier on raw_syscalls/sys_exit did not work" 61 61 62 62