From: Masami Hiramatsu <mhiramat@kernel.org>
To: Liu Yiding <yidingx.liu@intel.com>
Cc: Tom Zanussi <tom.zanussi@linux.intel.com>,
linux-kselftest@vger.kernel.org, "Li,
Philip" <philip.li@intel.com>
Subject: Re: kprobe/kprobe_syntax_errors.tc faild on dash due to sh I/O error
Date: Fri, 1 May 2020 10:46:53 +0900 [thread overview]
Message-ID: <20200501104653.9f467442d424a010d5ca05fb@kernel.org> (raw)
In-Reply-To: <8efd4de6-dfaa-f94b-2119-40af5cc2898e@intel.com>
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>
parent reply other threads:[~2020-05-01 1:46 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <8efd4de6-dfaa-f94b-2119-40af5cc2898e@intel.com>]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200501104653.9f467442d424a010d5ca05fb@kernel.org \
--to=mhiramat@kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=philip.li@intel.com \
--cc=tom.zanussi@linux.intel.com \
--cc=yidingx.liu@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).