From: Masami Hiramatsu <mhiramat@kernel.org>
To: Alan Maguire <alan.maguire@oracle.com>
Cc: rostedt@goodmis.org, shuah@kernel.org, mingo@redhat.com,
linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org,
naveen.n.rao@linux.vnet.ibm.com, colin.king@canonical.com
Subject: Re: [PATCH 2/2] ftrace/selftest: absence of modules/programs should trigger unsupported errors
Date: Fri, 7 Feb 2020 13:43:16 +0900 [thread overview]
Message-ID: <20200207134316.54cfa16707e72e50cb320f8f@kernel.org> (raw)
In-Reply-To: <1581001760-29831-3-git-send-email-alan.maguire@oracle.com>
Hi Alan,
On Thu, 6 Feb 2020 15:09:20 +0000
Alan Maguire <alan.maguire@oracle.com> wrote:
> In a number of cases, the ftrace tests check for the presence of
> ftrace testing-related modules (ftrace-direct, trace-printk) and
> programs (checkbashisms), returning exit_unresolved if these
> are not found. The problem is, exit_unresolved causes execution
> of ftracetest to return an error, when really our tests are
> failing due to not having the requisite kernel configuration/tools
> present, which is I think more of an unsupported error condition.
> With these fixed, we see no unresolved test cases and ftracetest
> returns success ("ok" when run via kselftest).
If your problem is to pass the test even if you don't test the
feature, please change the ftracetest itself instead of replacing
unresolved with unsupported. Those notice different situation.
unresolved - Testcase can not find some tools or helper drivers
which are required for this testcase.
unsupported - Kernel does not have tested feature because of
the version or the configuration.
Obviously the unresolved is a test environment issue. No test-module
doesn't mean no feature to be tested.
Could you tell me the reason why you can't install those required
tools and modules on the test environment?
Thank you,
>
> Fixes: 646f01ccdd59 ("ftrace/selftest: Add tests to test register_ftrace_direct()")
> Fixes: 4d23e9b4fd2e ("selftests/ftrace: Add trace_printk sample module test")
> Fixes: 7bc026d6c032 ("selftests/ftrace: Add function filter on module testcase")
> Fixes: ff431b1390cb ("selftests/ftrace: Add a test to probe module functions")
> Fixes: 4a075bd4e13f ("selftests/ftrace: Add checkbashisms meta-testcase")
> Signed-off-by: Alan Maguire <alan.maguire@oracle.com>
> ---
> tools/testing/selftests/ftrace/test.d/direct/ftrace-direct.tc | 2 +-
> tools/testing/selftests/ftrace/test.d/direct/kprobe-direct.tc | 2 +-
> tools/testing/selftests/ftrace/test.d/event/trace_printk.tc | 2 +-
> tools/testing/selftests/ftrace/test.d/ftrace/func_mod_trace.tc | 2 +-
> tools/testing/selftests/ftrace/test.d/kprobe/kprobe_module.tc | 2 +-
> tools/testing/selftests/ftrace/test.d/selftest/bashisms.tc | 2 +-
> 6 files changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/tools/testing/selftests/ftrace/test.d/direct/ftrace-direct.tc b/tools/testing/selftests/ftrace/test.d/direct/ftrace-direct.tc
> index d75a869..3d6189e 100644
> --- a/tools/testing/selftests/ftrace/test.d/direct/ftrace-direct.tc
> +++ b/tools/testing/selftests/ftrace/test.d/direct/ftrace-direct.tc
> @@ -5,7 +5,7 @@
> rmmod ftrace-direct ||:
> if ! modprobe ftrace-direct ; then
> echo "No ftrace-direct sample module - please make CONFIG_SAMPLE_FTRACE_DIRECT=m"
> - exit_unresolved;
> + exit_unsupported;
> fi
>
> echo "Let the module run a little"
> diff --git a/tools/testing/selftests/ftrace/test.d/direct/kprobe-direct.tc b/tools/testing/selftests/ftrace/test.d/direct/kprobe-direct.tc
> index 801ecb6..3d0e3ca 100644
> --- a/tools/testing/selftests/ftrace/test.d/direct/kprobe-direct.tc
> +++ b/tools/testing/selftests/ftrace/test.d/direct/kprobe-direct.tc
> @@ -5,7 +5,7 @@
> rmmod ftrace-direct ||:
> if ! modprobe ftrace-direct ; then
> echo "No ftrace-direct sample module - please build with CONFIG_SAMPLE_FTRACE_DIRECT=m"
> - exit_unresolved;
> + exit_unsupported;
> fi
>
> if [ ! -f kprobe_events ]; then
> diff --git a/tools/testing/selftests/ftrace/test.d/event/trace_printk.tc b/tools/testing/selftests/ftrace/test.d/event/trace_printk.tc
> index b02550b..dd8b10d 100644
> --- a/tools/testing/selftests/ftrace/test.d/event/trace_printk.tc
> +++ b/tools/testing/selftests/ftrace/test.d/event/trace_printk.tc
> @@ -5,7 +5,7 @@
> rmmod trace-printk ||:
> if ! modprobe trace-printk ; then
> echo "No trace-printk sample module - please make CONFIG_SAMPLE_TRACE_PRINTK=m"
> - exit_unresolved;
> + exit_unsupported;
> fi
>
> echo "Waiting for irq work"
> diff --git a/tools/testing/selftests/ftrace/test.d/ftrace/func_mod_trace.tc b/tools/testing/selftests/ftrace/test.d/ftrace/func_mod_trace.tc
> index 9330c87..fc22ac0 100644
> --- a/tools/testing/selftests/ftrace/test.d/ftrace/func_mod_trace.tc
> +++ b/tools/testing/selftests/ftrace/test.d/ftrace/func_mod_trace.tc
> @@ -13,7 +13,7 @@ echo '*:mod:trace_printk' > set_ftrace_filter
> if ! modprobe trace-printk ; then
> echo "No trace-printk sample module - please make CONFIG_SAMPLE_TRACE_PRINTK=
> m"
> - exit_unresolved;
> + exit_unsupported;
> fi
>
> : "Wildcard should be resolved after loading module"
> diff --git a/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_module.tc b/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_module.tc
> index d861bd7..4e07c69 100644
> --- a/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_module.tc
> +++ b/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_module.tc
> @@ -8,7 +8,7 @@ rmmod trace-printk ||:
> if ! modprobe trace-printk ; then
> echo "No trace-printk sample module - please make CONFIG_SAMPLE_TRACE_PRINTK=
> m"
> - exit_unresolved;
> + exit_unsupported;
> fi
>
> MOD=trace_printk
> diff --git a/tools/testing/selftests/ftrace/test.d/selftest/bashisms.tc b/tools/testing/selftests/ftrace/test.d/selftest/bashisms.tc
> index 1b081e9..1b339bd 100644
> --- a/tools/testing/selftests/ftrace/test.d/selftest/bashisms.tc
> +++ b/tools/testing/selftests/ftrace/test.d/selftest/bashisms.tc
> @@ -9,7 +9,7 @@ fi
>
> if ! which checkbashisms > /dev/null 2>&1 ; then
> echo "No checkbashisms found. skipped."
> - exit_unresolved
> + exit_unsupported
> fi
>
> checkbashisms $FTRACETEST_ROOT/ftracetest
> --
> 1.8.3.1
>
--
Masami Hiramatsu <mhiramat@kernel.org>
next prev parent reply other threads:[~2020-02-07 4:43 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-06 15:09 [PATCH 0/2] ftrace/selftests: clean up failure cases Alan Maguire
2020-02-06 15:09 ` [PATCH 1/2] ftrace/selftests: workaround cgroup RT scheduling issues Alan Maguire
2020-02-07 6:14 ` Masami Hiramatsu
2020-02-10 22:18 ` Steven Rostedt
2020-02-10 22:53 ` Masami Hiramatsu
2020-02-06 15:09 ` [PATCH 2/2] ftrace/selftest: absence of modules/programs should trigger unsupported errors Alan Maguire
2020-02-07 4:43 ` Masami Hiramatsu [this message]
2020-02-07 8:27 ` Alan Maguire
2020-02-07 8:50 ` Masami Hiramatsu
2020-02-19 9:55 ` Alan Maguire
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=20200207134316.54cfa16707e72e50cb320f8f@kernel.org \
--to=mhiramat@kernel.org \
--cc=alan.maguire@oracle.com \
--cc=colin.king@canonical.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=naveen.n.rao@linux.vnet.ibm.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