linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] selftests/ftrace: mark irqsoff_tracer.tc test as unresolved if the test module does not exist
@ 2020-05-05 10:14 Po-Hsu Lin
  2020-05-05 13:09 ` Steven Rostedt
  2020-05-07  8:50 ` Masami Hiramatsu
  0 siblings, 2 replies; 7+ messages in thread
From: Po-Hsu Lin @ 2020-05-05 10:14 UTC (permalink / raw)
  To: linux-kselftest
  Cc: linux-kernel, shuah, mingo, rostedt, mhiramat, po-hsu.lin, joel

The UNRESOLVED state is much more apporiate than the UNSUPPORTED state
for the absence of the test module, as it matches "test was set up
incorrectly" situation in the README file.

A possible scenario is that the function was enabled (supported by the
kernel) but the module was not installed properly, in this case we
cannot call this as UNSUPPORTED.

This change also make it consistent with other module-related tests
in ftrace.

Signed-off-by: Po-Hsu Lin <po-hsu.lin@canonical.com>
---
 .../testing/selftests/ftrace/test.d/preemptirq/irqsoff_tracer.tc | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/tools/testing/selftests/ftrace/test.d/preemptirq/irqsoff_tracer.tc b/tools/testing/selftests/ftrace/test.d/preemptirq/irqsoff_tracer.tc
index cbd1743..2b82c80e 100644
--- a/tools/testing/selftests/ftrace/test.d/preemptirq/irqsoff_tracer.tc
+++ b/tools/testing/selftests/ftrace/test.d/preemptirq/irqsoff_tracer.tc
@@ -17,7 +17,14 @@ unsup() { #msg
     exit_unsupported
 }
 
-modprobe $MOD || unsup "$MOD module not available"
+unres() { #msg
+    reset_tracer
+    rmmod $MOD || true
+    echo $1
+    exit_unresolved
+}
+
+modprobe $MOD || unres "$MOD module not available"
 rmmod $MOD
 
 grep -q "preemptoff" available_tracers || unsup "preemptoff tracer not enabled"
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH] selftests/ftrace: mark irqsoff_tracer.tc test as unresolved if the test module does not exist
  2020-05-05 10:14 [PATCH] selftests/ftrace: mark irqsoff_tracer.tc test as unresolved if the test module does not exist Po-Hsu Lin
@ 2020-05-05 13:09 ` Steven Rostedt
  2020-05-05 14:22   ` shuah
  2020-05-06  1:46   ` Po-Hsu Lin
  2020-05-07  8:50 ` Masami Hiramatsu
  1 sibling, 2 replies; 7+ messages in thread
From: Steven Rostedt @ 2020-05-05 13:09 UTC (permalink / raw)
  To: Po-Hsu Lin
  Cc: linux-kselftest, linux-kernel, shuah, mingo, mhiramat, joel, Shuah Khan


You keep forgetting to Cc Shuah's other email.

On Tue,  5 May 2020 18:14:45 +0800
Po-Hsu Lin <po-hsu.lin@canonical.com> wrote:

> The UNRESOLVED state is much more apporiate than the UNSUPPORTED state
> for the absence of the test module, as it matches "test was set up
> incorrectly" situation in the README file.
> 
> A possible scenario is that the function was enabled (supported by the
> kernel) but the module was not installed properly, in this case we
> cannot call this as UNSUPPORTED.
> 
> This change also make it consistent with other module-related tests
> in ftrace.

Acked-by: Steven Rostedt (VMware) <rostedt@goodmis.org>

Shuah,

Can you take this after Masami gives his ack (if he does that is).

Thanks,

-- Steve

> 
> Signed-off-by: Po-Hsu Lin <po-hsu.lin@canonical.com>
> ---
>  .../testing/selftests/ftrace/test.d/preemptirq/irqsoff_tracer.tc | 9 ++++++++-
>  1 file changed, 8 insertions(+), 1 deletion(-)
> 
> diff --git a/tools/testing/selftests/ftrace/test.d/preemptirq/irqsoff_tracer.tc b/tools/testing/selftests/ftrace/test.d/preemptirq/irqsoff_tracer.tc
> index cbd1743..2b82c80e 100644
> --- a/tools/testing/selftests/ftrace/test.d/preemptirq/irqsoff_tracer.tc
> +++ b/tools/testing/selftests/ftrace/test.d/preemptirq/irqsoff_tracer.tc
> @@ -17,7 +17,14 @@ unsup() { #msg
>      exit_unsupported
>  }
>  
> -modprobe $MOD || unsup "$MOD module not available"
> +unres() { #msg
> +    reset_tracer
> +    rmmod $MOD || true
> +    echo $1
> +    exit_unresolved
> +}
> +
> +modprobe $MOD || unres "$MOD module not available"
>  rmmod $MOD
>  
>  grep -q "preemptoff" available_tracers || unsup "preemptoff tracer not enabled"


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] selftests/ftrace: mark irqsoff_tracer.tc test as unresolved if the test module does not exist
  2020-05-05 13:09 ` Steven Rostedt
@ 2020-05-05 14:22   ` shuah
  2020-05-06  1:46   ` Po-Hsu Lin
  1 sibling, 0 replies; 7+ messages in thread
From: shuah @ 2020-05-05 14:22 UTC (permalink / raw)
  To: Steven Rostedt, Po-Hsu Lin
  Cc: linux-kselftest, linux-kernel, mingo, mhiramat, joel, Shuah Khan, shuah

On 5/5/20 7:09 AM, Steven Rostedt wrote:
> 
> You keep forgetting to Cc Shuah's other email.
> 
> On Tue,  5 May 2020 18:14:45 +0800
> Po-Hsu Lin <po-hsu.lin@canonical.com> wrote:
> 
>> The UNRESOLVED state is much more apporiate than the UNSUPPORTED state
>> for the absence of the test module, as it matches "test was set up
>> incorrectly" situation in the README file.
>>
>> A possible scenario is that the function was enabled (supported by the
>> kernel) but the module was not installed properly, in this case we
>> cannot call this as UNSUPPORTED.
>>
>> This change also make it consistent with other module-related tests
>> in ftrace.
> 
> Acked-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
> 
> Shuah,
> 
> Can you take this after Masami gives his ack (if he does that is).
> 

Yes. I will wait for Masamis's Ack. Will do.

thanks,
-- Shuah

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] selftests/ftrace: mark irqsoff_tracer.tc test as unresolved if the test module does not exist
  2020-05-05 13:09 ` Steven Rostedt
  2020-05-05 14:22   ` shuah
@ 2020-05-06  1:46   ` Po-Hsu Lin
  2020-05-06 15:43     ` Steven Rostedt
  1 sibling, 1 reply; 7+ messages in thread
From: Po-Hsu Lin @ 2020-05-06  1:46 UTC (permalink / raw)
  To: Steven Rostedt
  Cc: linux-kselftest, linux-kernel, shuah, mingo, Masami Hiramatsu,
	joel, Shuah Khan

On Tue, May 5, 2020 at 9:09 PM Steven Rostedt <rostedt@goodmis.org> wrote:
>
>
> You keep forgetting to Cc Shuah's other email.
Thanks!
I got the recipients list from the get_mainter.pl.

>
> On Tue,  5 May 2020 18:14:45 +0800
> Po-Hsu Lin <po-hsu.lin@canonical.com> wrote:
>
> > The UNRESOLVED state is much more apporiate than the UNSUPPORTED state
> > for the absence of the test module, as it matches "test was set up
> > incorrectly" situation in the README file.
> >
> > A possible scenario is that the function was enabled (supported by the
> > kernel) but the module was not installed properly, in this case we
> > cannot call this as UNSUPPORTED.
> >
> > This change also make it consistent with other module-related tests
> > in ftrace.
>
> Acked-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
>
> Shuah,
>
> Can you take this after Masami gives his ack (if he does that is).
>
> Thanks,
>
> -- Steve
>
> >
> > Signed-off-by: Po-Hsu Lin <po-hsu.lin@canonical.com>
> > ---
> >  .../testing/selftests/ftrace/test.d/preemptirq/irqsoff_tracer.tc | 9 ++++++++-
> >  1 file changed, 8 insertions(+), 1 deletion(-)
> >
> > diff --git a/tools/testing/selftests/ftrace/test.d/preemptirq/irqsoff_tracer.tc b/tools/testing/selftests/ftrace/test.d/preemptirq/irqsoff_tracer.tc
> > index cbd1743..2b82c80e 100644
> > --- a/tools/testing/selftests/ftrace/test.d/preemptirq/irqsoff_tracer.tc
> > +++ b/tools/testing/selftests/ftrace/test.d/preemptirq/irqsoff_tracer.tc
> > @@ -17,7 +17,14 @@ unsup() { #msg
> >      exit_unsupported
> >  }
> >
> > -modprobe $MOD || unsup "$MOD module not available"
> > +unres() { #msg
> > +    reset_tracer
> > +    rmmod $MOD || true
> > +    echo $1
> > +    exit_unresolved
> > +}
> > +
> > +modprobe $MOD || unres "$MOD module not available"
> >  rmmod $MOD
> >
> >  grep -q "preemptoff" available_tracers || unsup "preemptoff tracer not enabled"
>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] selftests/ftrace: mark irqsoff_tracer.tc test as unresolved if the test module does not exist
  2020-05-06  1:46   ` Po-Hsu Lin
@ 2020-05-06 15:43     ` Steven Rostedt
  2020-05-06 15:46       ` Shuah Khan
  0 siblings, 1 reply; 7+ messages in thread
From: Steven Rostedt @ 2020-05-06 15:43 UTC (permalink / raw)
  To: Po-Hsu Lin
  Cc: linux-kselftest, linux-kernel, shuah, mingo, Masami Hiramatsu,
	joel, Shuah Khan

On Wed, 6 May 2020 09:46:21 +0800
Po-Hsu Lin <po-hsu.lin@canonical.com> wrote:

> On Tue, May 5, 2020 at 9:09 PM Steven Rostedt <rostedt@goodmis.org> wrote:
> >
> >
> > You keep forgetting to Cc Shuah's other email.  
> Thanks!
> I got the recipients list from the get_mainter.pl.

Hmm.

Seems like that is what get_maintainer.pl does:

Steven Rostedt <rostedt@goodmis.org> (maintainer:TRACING)
Ingo Molnar <mingo@redhat.com> (maintainer:TRACING)
Shuah Khan <shuah@kernel.org> (maintainer:KERNEL SELFTEST FRAMEWORK)
linux-kselftest@vger.kernel.org (open list:KERNEL SELFTEST FRAMEWORK)
linux-kernel@vger.kernel.org (open list)

And looking at the code, it appears it will only take the first email
address found in the file.

Shuah, if you prefer the linuxfoundation.org email, you need to update
MAINTAINERS file to have that one first.

-- Steve

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] selftests/ftrace: mark irqsoff_tracer.tc test as unresolved if the test module does not exist
  2020-05-06 15:43     ` Steven Rostedt
@ 2020-05-06 15:46       ` Shuah Khan
  0 siblings, 0 replies; 7+ messages in thread
From: Shuah Khan @ 2020-05-06 15:46 UTC (permalink / raw)
  To: Steven Rostedt, Po-Hsu Lin
  Cc: linux-kselftest, linux-kernel, shuah, mingo, Masami Hiramatsu,
	joel, Shuah Khan

On 5/6/20 9:43 AM, Steven Rostedt wrote:
> On Wed, 6 May 2020 09:46:21 +0800
> Po-Hsu Lin <po-hsu.lin@canonical.com> wrote:
> 
>> On Tue, May 5, 2020 at 9:09 PM Steven Rostedt <rostedt@goodmis.org> wrote:
>>>
>>>
>>> You keep forgetting to Cc Shuah's other email.
>> Thanks!
>> I got the recipients list from the get_mainter.pl.
> 
> Hmm.
> 
> Seems like that is what get_maintainer.pl does:
> 
> Steven Rostedt <rostedt@goodmis.org> (maintainer:TRACING)
> Ingo Molnar <mingo@redhat.com> (maintainer:TRACING)
> Shuah Khan <shuah@kernel.org> (maintainer:KERNEL SELFTEST FRAMEWORK)
> linux-kselftest@vger.kernel.org (open list:KERNEL SELFTEST FRAMEWORK)
> linux-kernel@vger.kernel.org (open list)
> 
> And looking at the code, it appears it will only take the first email
> address found in the file.
> 
> Shuah, if you prefer the linuxfoundation.org email, you need to update
> MAINTAINERS file to have that one first.
> 

When I updated the MAINTAINERS file, I was hoping both addresses will be
in the output. It doesn't appear to be working the way I assumed it
would. I will send in patch to update to switch them.

thanks,
-- Shuah

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] selftests/ftrace: mark irqsoff_tracer.tc test as unresolved if the test module does not exist
  2020-05-05 10:14 [PATCH] selftests/ftrace: mark irqsoff_tracer.tc test as unresolved if the test module does not exist Po-Hsu Lin
  2020-05-05 13:09 ` Steven Rostedt
@ 2020-05-07  8:50 ` Masami Hiramatsu
  1 sibling, 0 replies; 7+ messages in thread
From: Masami Hiramatsu @ 2020-05-07  8:50 UTC (permalink / raw)
  To: Po-Hsu Lin
  Cc: linux-kselftest, linux-kernel, shuah, mingo, rostedt, mhiramat, joel

On Tue,  5 May 2020 18:14:45 +0800
Po-Hsu Lin <po-hsu.lin@canonical.com> wrote:

> The UNRESOLVED state is much more apporiate than the UNSUPPORTED state
> for the absence of the test module, as it matches "test was set up
> incorrectly" situation in the README file.
> 
> A possible scenario is that the function was enabled (supported by the
> kernel) but the module was not installed properly, in this case we
> cannot call this as UNSUPPORTED.
> 
> This change also make it consistent with other module-related tests
> in ftrace.
> 
> Signed-off-by: Po-Hsu Lin <po-hsu.lin@canonical.com>

Looks good to me.

Acked-by: Masami Hiramatsu <mhiramat@kernel.org>

Thanks!

> ---
>  .../testing/selftests/ftrace/test.d/preemptirq/irqsoff_tracer.tc | 9 ++++++++-
>  1 file changed, 8 insertions(+), 1 deletion(-)
> 
> diff --git a/tools/testing/selftests/ftrace/test.d/preemptirq/irqsoff_tracer.tc b/tools/testing/selftests/ftrace/test.d/preemptirq/irqsoff_tracer.tc
> index cbd1743..2b82c80e 100644
> --- a/tools/testing/selftests/ftrace/test.d/preemptirq/irqsoff_tracer.tc
> +++ b/tools/testing/selftests/ftrace/test.d/preemptirq/irqsoff_tracer.tc
> @@ -17,7 +17,14 @@ unsup() { #msg
>      exit_unsupported
>  }
>  
> -modprobe $MOD || unsup "$MOD module not available"
> +unres() { #msg
> +    reset_tracer
> +    rmmod $MOD || true
> +    echo $1
> +    exit_unresolved
> +}
> +
> +modprobe $MOD || unres "$MOD module not available"
>  rmmod $MOD
>  
>  grep -q "preemptoff" available_tracers || unsup "preemptoff tracer not enabled"
> -- 
> 2.7.4


-- 
Masami Hiramatsu <mhiramat@kernel.org>

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-05-07  8:50 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-05 10:14 [PATCH] selftests/ftrace: mark irqsoff_tracer.tc test as unresolved if the test module does not exist Po-Hsu Lin
2020-05-05 13:09 ` Steven Rostedt
2020-05-05 14:22   ` shuah
2020-05-06  1:46   ` Po-Hsu Lin
2020-05-06 15:43     ` Steven Rostedt
2020-05-06 15:46       ` Shuah Khan
2020-05-07  8:50 ` Masami Hiramatsu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).