From: Caspar Zhang <caspar@linux.alibaba.com>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH 2/3] lib/test.sh: TCONF needs to be counted
Date: Fri, 28 Jun 2019 20:52:05 +0800 [thread overview]
Message-ID: <20190628125205.GA48441@linux.alibaba.com> (raw)
In-Reply-To: <5e8374fa7f4ea9d64cdfc39a2ca449761327c257.1559207183.git.caspar@casparzhang.com>
Hi Cyril, is it ok to push 2/3 and 3/3 as they've got Li Wang's
Reviewed-by, or do you have different opinion?
Thanks,
Caspar
On Thu, May 30, 2019 at 05:09:57PM +0800, Caspar Zhang wrote:
> TCONF should also be one of exit statuses in a single test, else the
> output of TST_COUNT in shell tests could be wrong.
>
> Wrong:
> <<<test_output>>>
> memcg_use_hierarchy_test 1 TINFO: Starting test 1
> memcg_use_hierarchy_test 1 TINFO: set /dev/memcg/memory.use_hierarchy to 0 failed
> memcg_use_hierarchy_test 1 TPASS: process 28658 is killed
> memcg_use_hierarchy_test 2 TINFO: Starting test 2
> memcg_use_hierarchy_test 2 TINFO: set /dev/memcg/memory.use_hierarchy to 0 failed
> memcg_use_hierarchy_test 2 TCONF: memory.use_hierarchy already been 1, blame systemd, skip
> memcg_use_hierarchy_test 2 TINFO: Starting test 3
> memcg_use_hierarchy_test 2 TINFO: set /dev/memcg/memory.use_hierarchy to 0 failed
> memcg_use_hierarchy_test 2 TPASS: echo 0 > subgroup/memory.use_hierarchy failed as expected
> <<<execution_status>>>
>
> Right:
> <<<test_output>>>
> memcg_use_hierarchy_test 1 TINFO: Starting test 1
> memcg_use_hierarchy_test 1 TINFO: set /dev/memcg/memory.use_hierarchy to 0 failed
> memcg_use_hierarchy_test 1 TPASS: process 26825 is killed
> memcg_use_hierarchy_test 2 TINFO: Starting test 2
> memcg_use_hierarchy_test 2 TINFO: set /dev/memcg/memory.use_hierarchy to 0 failed
> memcg_use_hierarchy_test 2 TCONF: memory.use_hierarchy already been 1, blame systemd, skip
> memcg_use_hierarchy_test 3 TINFO: Starting test 3
> memcg_use_hierarchy_test 3 TINFO: set /dev/memcg/memory.use_hierarchy to 0 failed
> memcg_use_hierarchy_test 3 TPASS: echo 0 > subgroup/memory.use_hierarchy failed as expected
> <<<execution_status>>>
>
> Signed-off-by: Caspar Zhang <caspar@linux.alibaba.com>
> ---
> testcases/lib/test.sh | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/testcases/lib/test.sh b/testcases/lib/test.sh
> index 670248ee5..ade8fcdff 100644
> --- a/testcases/lib/test.sh
> +++ b/testcases/lib/test.sh
> @@ -58,8 +58,7 @@ tst_resm()
> echo " $@"
>
> case "$ret" in
> - TPASS|TFAIL)
> - TST_COUNT=$((TST_COUNT+1));;
> + TPASS|TFAIL|TCONF) TST_COUNT=$((TST_COUNT+1));;
> esac
> }
>
> --
> 2.21.0
>
--
Thanks,
Caspar
next prev parent reply other threads:[~2019-06-28 12:52 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-30 9:09 [LTP] [PATCH 1/3] tst_test: fix again when test has both TPASS and TCONF Caspar Zhang
2019-05-30 9:09 ` [LTP] [PATCH 2/3] lib/test.sh: TCONF needs to be counted Caspar Zhang
2019-05-31 3:17 ` Li Wang
2019-06-09 15:40 ` Caspar Zhang
2019-06-10 8:01 ` Li Wang
2019-06-28 12:52 ` Caspar Zhang [this message]
2019-07-04 14:01 ` Cyril Hrubis
2019-05-30 9:09 ` [LTP] [PATCH 3/3] tst_test.sh, test.sh: report pass if both TPASS and TCONF exist in shell test Caspar Zhang
2019-05-31 3:37 ` Li Wang
2019-05-30 15:18 ` [LTP] [PATCH 1/3] tst_test: fix again when test has both TPASS and TCONF Cyril Hrubis
2019-05-30 16:40 ` Caspar Zhang
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=20190628125205.GA48441@linux.alibaba.com \
--to=caspar@linux.alibaba.com \
--cc=ltp@lists.linux.it \
/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