From: Namhyung Kim <namhyung@kernel.org>
To: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Cc: Shuah Khan <shuah.kh@samsung.com>,
Tom Zanussi <tom.zanussi@linux.intel.com>,
Yoshihiro YUNOMAE <yoshihiro.yunomae.ez@hitachi.com>,
Oleg Nesterov <oleg@redhat.com>,
Steven Rostedt <rostedt@goodmis.org>,
Ingo Molnar <mingo@kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [RFC PATCH v3 4/4] ftracetest: Add XFAIL/XPASS and POSIX.3 std. result codes
Date: Thu, 04 Sep 2014 11:29:50 +0900 [thread overview]
Message-ID: <87mwag9kyp.fsf@sejong.aot.lge.com> (raw)
In-Reply-To: <20140902110659.3207.67086.stgit@kbuild-f20.novalocal> (Masami Hiramatsu's message of "Tue, 02 Sep 2014 11:06:59 +0000")
On Tue, 02 Sep 2014 11:06:59 +0000, Masami Hiramatsu wrote:
> Add XFAIL, XPASS and POSIX 1003.3 std. codes (UNRESOLVED/
> UNTESTED/UNSUPPORTED) as a result code. These are
> used for the results that test case is expected to fail or
> unsupported feature (by config).
> This also introduces PASS/FAIL/XFAIL/XPASS/UNSUP/UNTST/UNRES
> result codes for each testcase. Since the results are not
> binary, each testcase must use these codes to return the
> test result.
>
> Changes in v3:
> - Add UNRESOLVED/UNTESTED codes.
> - Fix to handle undefined codes.
> - Add a document about return codes.
> - Fix to show failure logs.
> - Don't use -e option for echo since dash doesn't support it.
>
> Signed-off-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
> ---
[SNIP]
> diff --git a/tools/testing/ftrace/test.d/basic3.tc b/tools/testing/ftrace/test.d/basic3.tc
> index 0c1a3a2..7bc5a53 100644
> --- a/tools/testing/ftrace/test.d/basic3.tc
> +++ b/tools/testing/ftrace/test.d/basic3.tc
> @@ -1,8 +1,9 @@
> #!/bin/sh
> # description: Basic trace clock test
> -[ -f trace_clock ] || exit 1
> +[ -f trace_clock ] || exit $FAIL # this is basic feature, must be there
> for c in `cat trace_clock | tr -d \[\]`; do
> - echo $c > trace_clock || exit 1
> - grep '\['$c'\]' trace_clock || exit 1
> + echo $c > trace_clock || exit $FAIL
> + grep '\['$c'\]' trace_clock || exit $FAIL
> done
> -echo local > trace_clock
> +echo local > trace_clock || exit $FAIL
> +exit $PASS
IMHO it's a bit sad that we need to write every test in this way -
adding '|| exit $FAIL' for every command. It'd be better if only
exceptional cases require that explicitly and normal cases live in
simple.
Can we do better - like using trap or something?
Thanks,
Namhyung
next prev parent reply other threads:[~2014-09-04 2:29 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-02 11:06 [RFC PATCH v3 0/4] ftrace: Add a ftrace test collection Masami Hiramatsu
2014-09-02 11:06 ` [RFC PATCH v3 1/4] ftracetest: Initial commit for ftracetest Masami Hiramatsu
2014-09-04 1:41 ` Namhyung Kim
2014-09-04 1:48 ` Masami Hiramatsu
2014-09-16 22:21 ` Steven Rostedt
2014-09-17 5:40 ` Masami Hiramatsu
2014-09-02 11:06 ` [RFC PATCH v3 2/4] ftracetest: Add ftrace basic testcases Masami Hiramatsu
2014-09-02 11:06 ` [RFC PATCH v3 3/4] ftracetest: Add kprobe " Masami Hiramatsu
2014-09-02 11:06 ` [RFC PATCH v3 4/4] ftracetest: Add XFAIL/XPASS and POSIX.3 std. result codes Masami Hiramatsu
2014-09-04 2:29 ` Namhyung Kim [this message]
2014-09-04 4:39 ` Masami Hiramatsu
2014-09-08 10:41 ` Masami Hiramatsu
2014-09-04 2:42 ` [RFC PATCH v3 0/4] ftrace: Add a ftrace test collection Namhyung Kim
2014-09-04 3:57 ` 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=87mwag9kyp.fsf@sejong.aot.lge.com \
--to=namhyung@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=masami.hiramatsu.pt@hitachi.com \
--cc=mingo@kernel.org \
--cc=oleg@redhat.com \
--cc=rostedt@goodmis.org \
--cc=shuah.kh@samsung.com \
--cc=tom.zanussi@linux.intel.com \
--cc=yoshihiro.yunomae.ez@hitachi.com \
/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
Powered by JetHome