lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Sat, 23 Mar 2019 08:14:17 -0500
From:   Tom Zanussi <zanussi@...nel.org>
To:     Masami Hiramatsu <mhiramat@...nel.org>
Cc:     rostedt@...dmis.org, tglx@...utronix.de, namhyung@...nel.org,
        bigeasy@...utronix.de, joel@...lfernandes.org,
        linux-kernel@...r.kernel.org, linux-rt-users@...r.kernel.org
Subject: Re: [PATCH v4 11/11] selftests/ftrace: Change stderr redirection
 for probe error_log testcase

Hi Masami,

On Sat, 2019-03-23 at 19:28 +0900, Masami Hiramatsu wrote:
> On Fri, 22 Mar 2019 10:34:37 -0500
> Tom Zanussi <zanussi@...nel.org> wrote:
> 
> > From: Tom Zanussi <tom.zanussi@...ux.intel.com>
> > 
> > On my system, /bin/sh is symlinked to dash, which doesn't
> > understand
> > the >& syntax, so the kprobe and uprobe error cases fail, with this
> > in
> > the log:
> > 
> > ./ftracetest: 26:
> > tools/testing/selftests/ftrace/test.d/kprobe/kprobe_syntax_errors.t
> > c:
> > Syntax error: Bad fd number
> > 
> > Changing >& to 2> does work though, and should work in any shell.
> 
> Ah, I missed this patch.
> 
> This looks good to me.
> 
> Acked-by: Masami Hiramatsu <mhiramat@...nel.org>
> 

OK, thanks, will merge it with the original testcase.

> BTW, where is my checkbashisms testcase ...

Haha, yeah, seems to be a problem with recent testcases.

Tom

> 
> > 
> > Signed-off-by: Tom Zanussi <tom.zanussi@...ux.intel.com>
> > ---
> >  tools/testing/selftests/ftrace/test.d/kprobe/kprobe_syntax_errors.
> > tc | 2 +-
> >  tools/testing/selftests/ftrace/test.d/kprobe/uprobe_syntax_errors.
> > tc | 2 +-
> >  2 files changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git
> > a/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_syntax_errors
> > .tc
> > b/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_syntax_errors
> > .tc
> > index 281665b1348c..7eb577b1d222 100644
> > ---
> > a/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_syntax_errors
> > .tc
> > +++
> > b/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_syntax_errors
> > .tc
> > @@ -11,7 +11,7 @@ pos=$(echo -n "${1%^*}" | wc -c) # error position
> >  command=$(echo "$1" | tr -d ^)
> >  echo "Test command: $command"
> >  echo > error_log
> > -(! echo "$command" > kprobe_events ) >& /dev/null
> > +(! echo "$command" > kprobe_events ) 2> /dev/null
> >  grep "trace_kprobe: error:" -A 3 error_log
> >  N=$(tail -n 1 error_log | wc -c)
> >  # "  Command: " and "^\n" => 13
> > diff --git
> > a/tools/testing/selftests/ftrace/test.d/kprobe/uprobe_syntax_errors
> > .tc
> > b/tools/testing/selftests/ftrace/test.d/kprobe/uprobe_syntax_errors
> > .tc
> > index 957011300bb7..ec7389b7934b 100644
> > ---
> > a/tools/testing/selftests/ftrace/test.d/kprobe/uprobe_syntax_errors
> > .tc
> > +++
> > b/tools/testing/selftests/ftrace/test.d/kprobe/uprobe_syntax_errors
> > .tc
> > @@ -11,7 +11,7 @@ pos=$(echo -n "${1%^*}" | wc -c) # error position
> >  command=$(echo "$1" | tr -d ^)
> >  echo "Test command: $command"
> >  echo > error_log
> > -(! echo "$command" > uprobe_events ) >& /dev/null
> > +(! echo "$command" > uprobe_events ) 2> /dev/null
> >  grep "trace_uprobe: error:" -A 3 error_log
> >  N=$(tail -n 1 error_log | wc -c)
> >  # "  Command: " and "^\n" => 13
> > -- 
> > 2.14.1
> > 
> 
> 

Powered by blists - more mailing lists