* Re: kprobe/kprobe_syntax_errors.tc faild on dash due to sh I/O error
[not found] <8efd4de6-dfaa-f94b-2119-40af5cc2898e@intel.com>
@ 2020-05-01 1:46 ` Masami Hiramatsu
0 siblings, 0 replies; only message in thread
From: Masami Hiramatsu @ 2020-05-01 1:46 UTC (permalink / raw)
To: Liu Yiding; +Cc: Tom Zanussi, linux-kselftest, Li, Philip
Hi Liu,
On Wed, 29 Apr 2020 15:13:20 +0800
Liu Yiding <yidingx.liu@intel.com> wrote:
> Hi, all.
>
>
> I met a funny error when i run kprobe_syntax_errors
>
> ```
>
> root@vm-snb-35
> /usr/src/linux-selftests-x86_64-rhel-7.6-kselftests-ae83d0b416db002fe95601e7f97f64b59514d936/tools/testing/selftests/ftrace#
> ./ftracetest -vvv test.d/kprobe/kprobe_syntax_errors.tc [snip] + expr 13
> + 0 + test 13 -eq 13 + echo p:kprobes/testevent _do_fork abcd=\1 sh:
> echo: I/O error
>
> ```
>
> This error only happend on dash, use bash run this test is ok.
>
> backslash ('\1') will be transferred into empty in dash.
Oops, good catch! I found that came from the built-in echo command
behavior.
Bash's echo doesn't interpret the backslash escape, but dash's
POSIX-compliant echo does.
----<dash>----
$ a='\1'
$ b=`echo $a`
$ test "$a" = "$b" && echo "same!" || echo "different"
different
----<bash>----
$ a='\1'
$ b=`echo $a`
$ test "$a" = "$b" && echo "same!" || echo "different"
same!
OK, I'll fix it.
Thank you!
--
Masami Hiramatsu <mhiramat@kernel.org>
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-05-01 1:46 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <8efd4de6-dfaa-f94b-2119-40af5cc2898e@intel.com>
2020-05-01 1:46 ` kprobe/kprobe_syntax_errors.tc faild on dash due to sh I/O error Masami Hiramatsu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).