[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20200131123203.5de85bfa6ccf946934963e86@kernel.org>
Date: Fri, 31 Jan 2020 12:32:03 +0900
From: Masami Hiramatsu <mhiramat@...nel.org>
To: Steven Rostedt <rostedt@...dmis.org>
Cc: Shuah Khan <shuah@...nel.org>, LKML <linux-kernel@...r.kernel.org>,
linux-kselftest@...r.kernel.org,
Masami Hiramatsu <mhiramat@...nel.org>,
Namhyung Kim <namhyung@...nel.org>
Subject: Re: [PATCH][RESEND] selftests/ftrace: Have pid filter test use
instance flag
On Thu, 30 Jan 2020 21:45:27 -0500
Steven Rostedt <rostedt@...dmis.org> wrote:
>
> From: "Steven Rostedt (VMware)" <rostedt@...dmis.org>
>
> While running the ftracetests, the pid filter test failed because the
> instance "foo" existed, and it was using it to rerun the test under a
> instance named foo. The collision caused the test to fail as the mkdir
> failed as the name already existed.
>
> As of commit b5b77be812de7 ("selftests: ftrace: Allow some tests to be run
> in a tracing instance") all a selftest needs to do to be tested in an
> instance is to set the "instance" flag. There's no reason a selftest needs
> to create an instance to run its test in an instance directly.
>
> Remove the open coded testing in an instance for the pid filter test and
> have it set the "instance" flag instead.
>
This looks good to me.
Acked-by: Masami Hiramatsu <mhiramat@...nel.org>
Thanks!
> Signed-off-by: Steven Rostedt (VMware) <rostedt@...dmis.org>
> ---
> .../selftests/ftrace/test.d/ftrace/func-filter-pid.tc | 8 +-------
> 1 file changed, 1 insertion(+), 7 deletions(-)
>
> diff --git a/tools/testing/selftests/ftrace/test.d/ftrace/func-filter-pid.tc b/tools/testing/selftests/ftrace/test.d/ftrace/func-filter-pid.tc
> index 64cfcc75e3c1..f2ee1e889e13 100644
> --- a/tools/testing/selftests/ftrace/test.d/ftrace/func-filter-pid.tc
> +++ b/tools/testing/selftests/ftrace/test.d/ftrace/func-filter-pid.tc
> @@ -1,6 +1,7 @@
> #!/bin/sh
> # SPDX-License-Identifier: GPL-2.0
> # description: ftrace - function pid filters
> +# flags: instance
>
> # Make sure that function pid matching filter works.
> # Also test it on an instance directory
> @@ -96,13 +97,6 @@ do_test() {
> }
>
> do_test
> -
> -mkdir instances/foo
> -cd instances/foo
> -do_test
> -cd ../../
> -rmdir instances/foo
> -
> do_reset
>
> exit 0
> --
> 2.20.1
>
--
Masami Hiramatsu <mhiramat@...nel.org>
Powered by blists - more mailing lists