From: Masami Hiramatsu <mhiramat@kernel.org>
To: Shuah Khan <shuah@kernel.org>
Cc: Alan Maguire <alan.maguire@oracle.com>,
rostedt@goodmis.org, mingo@redhat.com, shuah@kernel.org,
linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org,
Masami Hiramatsu <mhiramat@kernel.org>,
Po-Hsu Lin <po-hsu.lin@canonical.com>
Subject: Re: [PATCH v2 2/2] ftrace/selftest: make unresolved cases cause failure if --fail-unresolved set
Date: Fri, 1 May 2020 18:42:08 +0900 [thread overview]
Message-ID: <20200501184208.2529cac8081a34de0b48617f@kernel.org> (raw)
In-Reply-To: <20200219203941.eb0fb66aee13f6d7a47513ac@kernel.org>
On Wed, 19 Feb 2020 20:39:41 +0900
Masami Hiramatsu <mhiramat@kernel.org> wrote:
> On Wed, 19 Feb 2020 09:33:30 +0000
> Alan Maguire <alan.maguire@oracle.com> wrote:
>
> > Currently, ftracetest will return 1 (failure) if any unresolved cases
> > are encountered. The unresolved status results from modules and
> > programs not being available, and as such does not indicate any
> > issues with ftrace itself. As such, change the behaviour of
> > ftracetest in line with unsupported cases; if unsupported cases
> > happen, ftracetest still returns 0 unless --fail-unsupported. Here
> > --fail-unresolved is added and the default is to return 0 if
> > unresolved results occur.
> >
>
> OK, this looks good to me. One note, with this change, ftracetest doesn't
> fail even if your test environment is not well prepared anymore.
>
> Acked-by: Masami Hiramatsu <mhiramat@kernel.org>
Hi Shuah,
Could you pick this up?
Po-Hsu Lin seemed to face same problem recently. If this applied, it will be solved.
Thank you,
>
> Thank you,
>
> > Signed-off-by: Alan Maguire <alan.maguire@oracle.com>
> > ---
> > tools/testing/selftests/ftrace/ftracetest | 8 +++++++-
> > 1 file changed, 7 insertions(+), 1 deletion(-)
> >
> > diff --git a/tools/testing/selftests/ftrace/ftracetest b/tools/testing/selftests/ftrace/ftracetest
> > index 144308a..19e9236 100755
> > --- a/tools/testing/selftests/ftrace/ftracetest
> > +++ b/tools/testing/selftests/ftrace/ftracetest
> > @@ -17,6 +17,7 @@ echo " -v|--verbose Increase verbosity of test messages"
> > echo " -vv Alias of -v -v (Show all results in stdout)"
> > echo " -vvv Alias of -v -v -v (Show all commands immediately)"
> > echo " --fail-unsupported Treat UNSUPPORTED as a failure"
> > +echo " --fail-unresolved Treat UNRESOLVED as a failure"
> > echo " -d|--debug Debug mode (trace all shell commands)"
> > echo " -l|--logdir <dir> Save logs on the <dir>"
> > echo " If <dir> is -, all logs output in console only"
> > @@ -112,6 +113,10 @@ parse_opts() { # opts
> > UNSUPPORTED_RESULT=1
> > shift 1
> > ;;
> > + --fail-unresolved)
> > + UNRESOLVED_RESULT=1
> > + shift 1
> > + ;;
> > --logdir|-l)
> > LOG_DIR=$2
> > shift 2
> > @@ -176,6 +181,7 @@ KEEP_LOG=0
> > DEBUG=0
> > VERBOSE=0
> > UNSUPPORTED_RESULT=0
> > +UNRESOLVED_RESULT=0
> > STOP_FAILURE=0
> > # Parse command-line options
> > parse_opts $*
> > @@ -280,7 +286,7 @@ eval_result() { # sigval
> > $UNRESOLVED)
> > prlog " [${color_blue}UNRESOLVED${color_reset}]"
> > UNRESOLVED_CASES="$UNRESOLVED_CASES $CASENO"
> > - return 1 # this is a kind of bug.. something happened.
> > + return $UNRESOLVED_RESULT # depends on use case
> > ;;
> > $UNTESTED)
> > prlog " [${color_blue}UNTESTED${color_reset}]"
> > --
> > 1.8.3.1
> >
>
>
> --
> Masami Hiramatsu <mhiramat@kernel.org>
--
Masami Hiramatsu <mhiramat@kernel.org>
next prev parent reply other threads:[~2020-05-01 9:42 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-19 9:33 [PATCH v2 0/2] ftrace/selftest: clean up failure cases Alan Maguire
2020-02-19 9:33 ` [PATCH v2 1/2] ftrace/selftests: workaround cgroup RT scheduling issues Alan Maguire
2020-02-19 9:33 ` [PATCH v2 2/2] ftrace/selftest: make unresolved cases cause failure if --fail-unresolved set Alan Maguire
2020-02-19 11:39 ` Masami Hiramatsu
2020-05-01 9:42 ` Masami Hiramatsu [this message]
2020-05-01 14:25 ` shuah
2020-05-02 4:42 ` Masami Hiramatsu
2020-02-19 19:26 ` [PATCH v2 0/2] ftrace/selftest: clean up failure cases Steven Rostedt
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=20200501184208.2529cac8081a34de0b48617f@kernel.org \
--to=mhiramat@kernel.org \
--cc=alan.maguire@oracle.com \
--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;
as well as URLs for NNTP newsgroup(s).