lkml.org 
[lkml]   [2021]   [Oct]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v4 7/8] tracing/selftests: Add tests for hist trigger expression parsing
On Tue, 26 Oct 2021 07:28:39 -0700
Kalesh Singh <kaleshsingh@google.com> wrote:

> On Tue, Oct 26, 2021 at 5:43 AM Masami Hiramatsu <mhiramat@kernel.org> wrote:
> >
> > Hi Kalesh,
> >
> > On Mon, 25 Oct 2021 13:08:39 -0700
> > Kalesh Singh <kaleshsingh@google.com> wrote:
> >
> > > Add tests for the parsing of hist trigger expressions; and to
> > > validate expression evaluation.
> > >
> > > Signed-off-by: Kalesh Singh <kaleshsingh@google.com>
> > > Reviewed-by: Namhyung Kim <namhyung@kernel.org>
> > > ---
> > >
> > > Changes in v3:
> > > - Remove .sym-offset error check tests
> > >
> > > Changes in v2:
> > > - Add Namhyung's Reviewed-by
> > > - Update comment to clarify err_pos in "Too many subexpressions" test
> > >
> > >
> > > .../testing/selftests/ftrace/test.d/functions | 4 +-
> > > .../trigger/trigger-hist-expressions.tc | 72 +++++++++++++++++++
> > > 2 files changed, 74 insertions(+), 2 deletions(-)
> > > create mode 100644 tools/testing/selftests/ftrace/test.d/trigger/trigger-hist-expressions.tc
> > >
> > > diff --git a/tools/testing/selftests/ftrace/test.d/functions b/tools/testing/selftests/ftrace/test.d/functions
> > > index 000fd05e84b1..1855a63559ad 100644
> > > --- a/tools/testing/selftests/ftrace/test.d/functions
> > > +++ b/tools/testing/selftests/ftrace/test.d/functions
> > > @@ -16,13 +16,13 @@ reset_tracer() { # reset the current tracer
> > >
> > > reset_trigger_file() {
> > > # remove action triggers first
> > > - grep -H ':on[^:]*(' $@ |
> > > + grep -H ':on[^:]*(' $@ | tac |
> > > while read line; do
> > > cmd=`echo $line | cut -f2- -d: | cut -f1 -d"["`
> > > file=`echo $line | cut -f1 -d:`
> > > echo "!$cmd" >> $file
> > > done
> > > - grep -Hv ^# $@ |
> > > + grep -Hv ^# $@ | tac |
> > > while read line; do
> > > cmd=`echo $line | cut -f2- -d: | cut -f1 -d"["`
> > > file=`echo $line | cut -f1 -d:`
> >
> > If this update has any meaning, please make a separate patch for this part.
>
> Hi Masami,
>
> Thanks for the feedback. The above change is to ensure we remove
> triggers in the reverse order that we created them - important when
> one trigger depends on another.

Hi Kalesh,
That's a good reason to make this an independent patch :)

> I can split it out into a separate
> patch and will add a README pattern check to the requires tag for
> these tests.

Thank you!



--
Masami Hiramatsu <mhiramat@kernel.org>

\
 
 \ /
  Last update: 2021-10-27 04:34    [W:0.074 / U:0.116 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site