On 5/25/20 3:59 AM, Masami Hiramatsu wrote:
Hi Shuah,
Could you pick this to kselftest-next?
Thank you,
On Mon, 11 May 2020 22:36:27 +0900
Masami Hiramatsu wrote:
Since the built-in echo has different behavior in POSIX shell
(dash) and bash, kprobe_syntax_errors.tc can fail on dash which
in
Hi Shuah,
Could you pick this to kselftest-next?
Thank you,
On Mon, 11 May 2020 22:36:27 +0900
Masami Hiramatsu wrote:
> 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.
>
On Mon, 11 May 2020 14:59:20 +
David Laight wrote:
> > > echo "Test command: $command"
> > > echo > error_log
> > > -(! echo "$command" >> "$3" ) 2> /dev/null
> > > +(! printf "%s" "$command" >> "$3" ) 2> /dev/null
>
> WTF is the (! for ??
> The (...) is a subshell.
> And
> > +pos=$(printf "%s" "${2%^*}" | wc -c) # error position
> > +command=$(printf "%s" "$2" | tr -d ^)
You may want to put all the $(...) inside "" to avoid field splitting
(not relevant to a shell assignment with modern shells) and
filename globbing.
> > echo "Test command: $command"
On Mon, 11 May 2020 13:46:35 +
David Laight wrote:
> From: Masami Hiramatsu
> > Sent: 11 May 2020 14:38
> >
> > Hi Andreas and David,
> >
> > OK, what about this fix?
>
> No idea what it is trying to do or why.
> Just a way of avoiding the differences between SYSV and BSD /bin/echo.
>
> I
On Mon, 11 May 2020 15:42:10 +0200
Andreas Schwab wrote:
> On Mai 11 2020, Masami Hiramatsu wrote:
>
> > -(! echo "$command" >> "$3" ) 2> /dev/null
> > +(! printf "%s" "$command" >> "$3" ) 2> /dev/null
>
> printf %s does not print a newline, you need printf '%s\n' for that.
Actually, f
From: Masami Hiramatsu
> Sent: 11 May 2020 14:38
>
> Hi Andreas and David,
>
> OK, what about this fix?
No idea what it is trying to do or why.
Just a way of avoiding the differences between SYSV and BSD /bin/echo.
IIRC Posix allows both behaviours (and probably others).
David
-
Regis
On Mai 11 2020, Masami Hiramatsu wrote:
> -(! echo "$command" >> "$3" ) 2> /dev/null
> +(! printf "%s" "$command" >> "$3" ) 2> /dev/null
printf %s does not print a newline, you need printf '%s\n' for that.
Andreas.
--
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 7578 EB4
Hi Andreas and David,
OK, what about this fix?
On Mon, 11 May 2020 22:36:27 +0900
Masami Hiramatsu wrote:
> 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 thi
9 matches
Mail list logo