mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "lizhijian@fujitsu.com" <lizhijian@fujitsu.com>
To: Masami Hiramatsu <mhiramat@kernel.org>,
	Steven Rostedt <rostedt@goodmis.org>
Cc: "lizhijian@fujitsu.com" <lizhijian@fujitsu.com>,
	"mingo@redhat.com" <mingo@redhat.com>,
	"shuah@kernel.org" <shuah@kernel.org>,
	"linux-kselftest@vger.kernel.org"
	<linux-kselftest@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Philip Li <philip.li@intel.com>,
	kernel test robot <lkp@intel.com>
Subject: Re: [PATCH] kselftests: ftrace: limit the executing time by reading from cached trace
Date: Wed, 20 Oct 2021 04:10:17 +0000	[thread overview]
Message-ID: <9fde6ceb-aff6-2d3b-88ea-430b960a1428@fujitsu.com> (raw)
In-Reply-To: <20211020115522.75f3e25247c1d30726e9b130@kernel.org>



On 20/10/2021 10:55, Masami Hiramatsu wrote:
> On Tue, 19 Oct 2021 22:34:54 -0400
> Steven Rostedt <rostedt@goodmis.org> wrote:
>
>> On Wed, 20 Oct 2021 11:20:27 +0900
>> Masami Hiramatsu <mhiramat@kernel.org> wrote:
>>
>>> Hmm, by the way, shouldn't we set this feature by default?
>>> There are many "cat trace | grep ..." style test code in ftracetest just for
>>> checking whether the event is recorded. At least for the ftracetest, it should
>>> be set unless the testcase is explicitly disable it.
>> For testing, sure.
>>
>> I was criticized by the BPF folks about tracing stopping when the trace
>> file was being read. So for normal operations, it doesn't pause, because
>> that "confuses" people (so I am told).
> OK, I got it.
>
> Here is the patch to enable it by default for ftracetest :)
>
> Thanks!
>
>  From 61e641f494307d9942a8415bc6743e85dd95438e Mon Sep 17 00:00:00 2001
> From: Masami Hiramatsu <mhiramat@kernel.org>
> Date: Wed, 20 Oct 2021 11:50:35 +0900
> Subject: [PATCH] selftests/ftrace: Stop tracing while reading the trace file
>   by default
>
> Stop tracing while reading the trace file by default, to prevent
> the test results while checking it and to avoid taking a long time
> to check the result.
> If there is any testcase which wants to test the tracing while reading
> the trace file, please override this setting inside the test case.
>
> Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>

LGTM.

Tested-by: Li Zhijian <lizhijian@cn.fujitsu.com>
Reported-by: kernel test robot<lkp@intel.com>


> ---
>   tools/testing/selftests/ftrace/test.d/functions | 6 ++++++
>   1 file changed, 6 insertions(+)
>
> diff --git a/tools/testing/selftests/ftrace/test.d/functions b/tools/testing/selftests/ftrace/test.d/functions
> index 000fd05e84b1..8adc0140d03f 100644
> --- a/tools/testing/selftests/ftrace/test.d/functions
> +++ b/tools/testing/selftests/ftrace/test.d/functions
> @@ -124,6 +124,12 @@ initialize_ftrace() { # Reset ftrace to initial-state
>       [ -f uprobe_events ] && echo > uprobe_events
>       [ -f synthetic_events ] && echo > synthetic_events
>       [ -f snapshot ] && echo 0 > snapshot
> +
> +# Stop tracing while reading the trace file by default, to prevent
> +# the test results while checking it and to avoid taking a long time
> +# to check the result.
> +    [ -f options/pause-on-trace ] && echo 1 > options/pause-on-trace
> +
>       clear_trace
>       enable_tracing
>   }

  reply	other threads:[~2021-10-20  4:10 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-18 13:26 Li Zhijian
2021-10-19  2:16 ` Steven Rostedt
2021-10-20  2:20   ` Masami Hiramatsu
2021-10-20  2:34     ` Steven Rostedt
2021-10-20  2:55       ` Masami Hiramatsu
2021-10-20  4:10         ` lizhijian [this message]
2021-10-20 14:16         ` Steven Rostedt
2021-10-21  0:31           ` Masami Hiramatsu
2021-10-26  2:17             ` Steven Rostedt
2021-10-26 12:13               ` Masami Hiramatsu
2021-10-26 13:15                 ` Steven Rostedt
2021-10-26 14:13                   ` Masami Hiramatsu
2021-10-26 15:16                     ` Steven Rostedt
2021-10-26 23:19                       ` Masami Hiramatsu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9fde6ceb-aff6-2d3b-88ea-430b960a1428@fujitsu.com \
    --to=lizhijian@fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=mhiramat@kernel.org \
    --cc=mingo@redhat.com \
    --cc=philip.li@intel.com \
    --cc=rostedt@goodmis.org \
    --cc=shuah@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®