selftests/ftrace: Use printf for backslash included command
authorMasami Hiramatsu <mhiramat@kernel.org>
Mon, 11 May 2020 13:36:27 +0000 (22:36 +0900)
committerShuah Khan <skhan@linuxfoundation.org>
Thu, 28 May 2020 16:13:18 +0000 (10:13 -0600)
commit8e923a2168afd221ea26e3d9716f21e9578b5c4d
tree1a6086aa8ba770367572fbca777e146ed7aa2b74
parent558ae0355a91c7d28fdf4c0011bee6ebb5118632
selftests/ftrace: Use printf for backslash included command

Since the built-in echo has different behavior in POSIX shell
(dash) and bash, kprobe_syntax_errors.tc can fail on dash which
interpret backslash escape automatically.

To fix this issue, we explicitly use printf "%s" (not interpret
backslash escapes) if the command string can include backslash.

Reported-by: Liu Yiding <yidingx.liu@intel.com>
Suggested-by: Xiao Yang <yangx.jy@cn.fujitsu.com>
Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
tools/testing/selftests/ftrace/test.d/functions
tools/testing/selftests/ftrace/test.d/kprobe/kprobe_syntax_errors.tc