]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit
UBUNTU: SAUCE: selftests/ftrace: Use printf instead of echo in kprobe syntax error...
authorSeth Forshee <seth.forshee@canonical.com>
Tue, 3 Mar 2020 22:24:54 +0000 (16:24 -0600)
committerSeth Forshee <seth.forshee@canonical.com>
Wed, 4 Mar 2020 16:16:15 +0000 (10:16 -0600)
commitcb03d653851873fe6b55ad79b17420ba01792df0
treedff43d60eb0315422a25ff39fcf3eebcbbdda316
parentabdf57046c145165987cf2e7a95f1d7ab5892183
UBUNTU: SAUCE: selftests/ftrace: Use printf instead of echo in kprobe syntax error tests

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@canonical.com>
tools/testing/selftests/ftrace/test.d/functions
tools/testing/selftests/ftrace/test.d/kprobe/kprobe_syntax_errors.tc