From: Cyril Hrubis <chrubis@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH] lib/tst_test.c: Take account of tst_brk(TCONF)/tst_brk(TFAIL) in summary output
Date: Tue, 19 May 2020 16:34:50 +0200 [thread overview]
Message-ID: <20200519143450.GF16008@yuki.lan> (raw)
In-Reply-To: <20200518054335.12017-1-yangx.jy@cn.fujitsu.com>
Hi!
> lib/tst_test.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/lib/tst_test.c b/lib/tst_test.c
> index 0e58060e0..b28521a67 100644
> --- a/lib/tst_test.c
> +++ b/lib/tst_test.c
> @@ -316,6 +316,7 @@ void tst_vbrk_(const char *file, const int lineno, int ttype,
> const char *fmt, va_list va)
> {
> print_result(file, lineno, ttype, fmt, va);
> + update_results(TTYPE_RESULT(ttype));
>
> /*
> * The getpid implementation in some C library versions may cause cloned
Good catch, but I guess that we should also remove the update_result()
call from the run_tcases_per_fs() after this.
And it also makes sense to call the function as a first thing in the
tst_res_/tst_brk_ function, which simplifies the code flow.
So I guess that we want something like this (not tested):
diff --git a/lib/tst_test.c b/lib/tst_test.c
index 0e58060e0..9d0ef672d 100644
--- a/lib/tst_test.c
+++ b/lib/tst_test.c
@@ -278,8 +278,6 @@ void tst_vres_(const char *file, const int lineno, int ttype,
const char *fmt, va_list va)
{
print_result(file, lineno, ttype, fmt, va);
-
- update_results(TTYPE_RESULT(ttype));
}
void tst_vbrk_(const char *file, const int lineno, int ttype,
@@ -297,7 +295,6 @@ static void tst_cvres(const char *file, const int lineno, int ttype,
}
print_result(file, lineno, ttype, fmt, va);
- update_results(TTYPE_RESULT(ttype));
}
static void do_test_cleanup(void)
@@ -337,6 +334,8 @@ void tst_res_(const char *file, const int lineno, int ttype,
{
va_list va;
+ update_results(TTYPE_RESULT(ttype));
+
va_start(va, fmt);
tst_vres_(file, lineno, ttype, fmt, va);
va_end(va);
@@ -347,6 +346,8 @@ void tst_brk_(const char *file, const int lineno, int ttype,
{
va_list va;
+ update_results(TTYPE_RESULT(ttype));
+
va_start(va, fmt);
tst_brk_handler(file, lineno, ttype, fmt, va);
va_end(va);
@@ -1316,10 +1317,8 @@ static int run_tcases_per_fs(void)
mntpoint_mounted = 0;
}
- if (ret == TCONF) {
- update_results(ret);
+ if (ret == TCONF)
continue;
- }
if (ret == 0)
continue;
--
Cyril Hrubis
chrubis@suse.cz
next prev parent reply other threads:[~2020-05-19 14:34 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-18 5:43 [LTP] [PATCH] lib/tst_test.c: Take account of tst_brk(TCONF)/tst_brk(TFAIL) in summary output Xiao Yang
2020-05-19 14:34 ` Cyril Hrubis [this message]
2020-05-20 2:02 ` Xiao Yang
2020-05-22 1:40 ` [LTP] [PATCH v2] lib/tst_test.c: Take account of tst_brk(TCONF/TFAIL) " Xiao Yang
2020-05-26 13:43 ` Xiao Yang
2020-05-27 7:08 ` Xiao Yang
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=20200519143450.GF16008@yuki.lan \
--to=chrubis@suse.cz \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.