[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250418082523.5040e03c@gandalf.local.home>
Date: Fri, 18 Apr 2025 08:25:23 -0400
From: Steven Rostedt <rostedt@...dmis.org>
To: "Masami Hiramatsu (Google)" <mhiramat@...nel.org>
Cc: LKML <linux-kernel@...r.kernel.org>, Linux trace kernel
<linux-trace-kernel@...r.kernel.org>, Mathieu Desnoyers
<mathieu.desnoyers@...icios.com>, Andrew Morton
<akpm@...ux-foundation.org>, Shuah Khan <skhan@...uxfoundation.org>,
linux-kselftest@...r.kernel.org
Subject: Re: [PATCH] tracing: selftests: Add testing a user string to
filters
On Fri, 18 Apr 2025 16:14:04 +0900
Masami Hiramatsu (Google) <mhiramat@...nel.org> wrote:
> > +if [ -f events/syscalls/sys_enter_openat/filter ]; then
> > + echo "filename.ustring ~ \"*test.d*\"" > events/syscalls/sys_enter_openat/filter
>
> I think it is better to use a $TMPDIR for the test script,
> instead of reusing the $TEST_DIR. Since $TMPDIR has been
> introduced to be used for this purpose.
>
> DIRNAME=`basename $TMPDIR`
>
> echo "filename.ustring ~ \"\*$DIRNAME\*\"" > events/syscalls/sys_enter_openat/filter
>
> > + echo 1 > events/syscalls/sys_enter_openat/enable
> > + echo 1 > tracing_on
> > + ls /bin/sh
> > + nocnt=`grep openat trace | wc -l`
> > + ls $TEST_DIR
>
> and `ls $TMPDIR` ?
>
> Does that work?
>
Yeah I can do that instead.
My actual fear is that 'ls' may one day not call openat and the test fails.
But if that happens we can always update the test.
Thanks,
-- Steve
Powered by blists - more mailing lists