Linux Kernel Selftest development
 help / color / mirror / Atom feed
From: Masami Hiramatsu <mhiramat@kernel.org>
To: Po-Hsu Lin <po-hsu.lin@canonical.com>
Cc: linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org,
	shuah@kernel.org, mingo@redhat.com, rostedt@goodmis.org,
	mhiramat@kernel.org, joel@joelfernandes.org
Subject: Re: [PATCH] selftests/ftrace: mark irqsoff_tracer.tc test as unresolved if the test module does not exist
Date: Thu, 7 May 2020 17:50:49 +0900	[thread overview]
Message-ID: <20200507175049.fba9420a538e6d81a7b48d60@kernel.org> (raw)
In-Reply-To: <20200505101445.27063-1-po-hsu.lin@canonical.com>

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>

      parent reply	other threads:[~2020-05-07  8:50 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

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=20200507175049.fba9420a538e6d81a7b48d60@kernel.org \
    --to=mhiramat@kernel.org \
    --cc=joel@joelfernandes.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=po-hsu.lin@canonical.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