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  linux-cve-announce  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]
Message-ID: <1553346669.2307.8.camel@kernel.org>
Date:   Sat, 23 Mar 2019 08:11:09 -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 06/11] selftests/ftrace: Add error_log testcase for
 probe errors

Hi Masami,

On Sat, 2019-03-23 at 19:22 +0900, Masami Hiramatsu wrote:
> On Fri, 22 Mar 2019 10:34:32 -0500
> Tom Zanussi <zanussi@...nel.org> wrote:
> 
> > From: Masami Hiramatsu <mhiramat@...nel.org>
> > 
> > Add error_log testcase for error logs on probe events.
> > This tests most of error cases and checks the error position
> > is correct.
> > 
> > Signed-off-by: Masami Hiramatsu <mhiramat@...nel.org>
> > ---
> >  .../ftrace/test.d/kprobe/kprobe_syntax_errors.tc   | 93
> > ++++++++++++++++++++++
> >  .../ftrace/test.d/kprobe/uprobe_syntax_errors.tc   | 31 ++++++++
> >  2 files changed, 124 insertions(+)
> >  create mode 100644
> > tools/testing/selftests/ftrace/test.d/kprobe/kprobe_syntax_errors.t
> > c
> >  create mode 100644
> > tools/testing/selftests/ftrace/test.d/kprobe/uprobe_syntax_errors.t
> > c
> > 
> > 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
> > new file mode 100644
> > index 000000000000..281665b1348c
> > --- /dev/null
> > +++
> > b/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_syntax_errors
> > .tc
> > @@ -0,0 +1,93 @@
> > +#!/bin/sh
> > +# SPDX-License-Identifier: GPL-2.0
> > +# description: Kprobe event parser error log check
> > +
> > +[ -f kprobe_events ] || exit_unsupported # this is configurable
> > +
> > +[ -f error_log ] || exit_unsupported
> > +
> > +check_error() { # command-with-error-pos-by-^
> > +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
> 
> Oops, this one. This must be
> 
> (! echo "$command" > kprobe_events ) > /dev/null 2>&1
> 
> [...]
> > 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
> > new file mode 100644
> > index 000000000000..957011300bb7
> > --- /dev/null
> > +++
> > b/tools/testing/selftests/ftrace/test.d/kprobe/uprobe_syntax_errors
> > .tc
> > @@ -0,0 +1,31 @@
> > +#!/bin/sh
> > +# SPDX-License-Identifier: GPL-2.0
> > +# description: Uprobe event parser error log check
> > +
> > +[ -f uprobe_events ] || exit_unsupported # this is configurable
> > +
> > +[ -f error_log ] || exit_unsupported
> > +
> > +check_error() { # command-with-error-pos-by-^
> > +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
> 
> Here too.
> 
> Tom, if you don't mind, could you update it when you update
> the series? Or should I resend it?
> 

I can just change it in the next update.  I assume 2> as in the other
patch?

Tom

> Thank you,
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ