[PATCH v2] selftests/ftrace: Use printf instead of echo in kprobe syntax error tests

Seth Forshee seth.forshee at canonical.com
Wed Mar 4 22:16:30 UTC 2020


On Wed, Mar 04, 2020 at 04:08:37PM -0600, Seth Forshee wrote:
> Test cases which use echo to write strings containing backslashes
> fail with some shells, as echo's treatment of backslashes in
> strings varies between shell implementations. Use printf instead,
> as it should behave consistently across different shells. This
> requires adjustments to the strings to escape \ and % characters.
> ftrace_errlog_check() must also re-escape these characters after
> processing them to remove ^ characters.
> 
> Signed-off-by: Seth Forshee <seth.forshee at canonical.com>

Sorry, something strange seems to have happened with my scripting which
caused this to be sent to the wrong mailing list. I will resened.




More information about the kernel-team mailing list