From: Petr Vorel <pvorel@suse.cz>
To: Ma Feng <mafeng.ma@huawei.com>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH] syslog: Add TPASS log
Date: Tue, 5 Apr 2022 12:42:44 +0200 [thread overview]
Message-ID: <YkwdJDzkr3sjt2Ic@pevik> (raw)
In-Reply-To: <1645492786-67242-1-git-send-email-mafeng.ma@huawei.com>
Hi Ma, Li, Cyril,
> Add TPASS log to facilitate the analysis of cases.
nit: in some tests you added both TPASS/TFAIL.
> Signed-off-by: Ma Feng <mafeng.ma@huawei.com>
> ---
> testcases/kernel/syscalls/syslog/syslog01 | 7 +++++--
> testcases/kernel/syscalls/syslog/syslog03 | 3 +++
> testcases/kernel/syscalls/syslog/syslog04 | 5 ++++-
> testcases/kernel/syscalls/syslog/syslog05 | 5 ++++-
> testcases/kernel/syscalls/syslog/syslog06 | 5 ++++-
> testcases/kernel/syscalls/syslog/syslog07 | 5 ++++-
> testcases/kernel/syscalls/syslog/syslog09 | 4 ++++
> testcases/kernel/syscalls/syslog/syslog10 | 6 +++++-
> 8 files changed, 33 insertions(+), 7 deletions(-)
> diff --git a/testcases/kernel/syscalls/syslog/syslog01 b/testcases/kernel/syscalls/syslog/syslog01
> index 2f3aea0bb..f99c44914 100755
> --- a/testcases/kernel/syscalls/syslog/syslog01
> +++ b/testcases/kernel/syscalls/syslog/syslog01
> @@ -88,8 +88,11 @@ syslog_case1()
> newvalue1=`grep -c "syslogtst: mail info test" $MAILLOG`
> if [ "x$(( $newvalue1 - $oldvalue1 ))" != "x1" ]; then
> - status_flag=1
> - fi
> + tst_resm TFAIL "mail info test: messages are not logged to $MAILLOG"
> + status_flag=1
> + else
> + tst_resm TPASS "mail info test: messages are logged to $MAILLOG"
> + fi
I'm going to merge this fix, thus I'll fix wrong indentation myself before merge
(it's in more tests). But please next time pay attention to the whitespace.
...
> index 573ab755e..97f7c54cc 100755
> --- a/testcases/kernel/syscalls/syslog/syslog10
> +++ b/testcases/kernel/syscalls/syslog/syslog10
> @@ -85,12 +85,16 @@ syslog_case10()
> tst_resm TFAIL "Expected message was not logged...."
> status_flag=1
> return
> - fi
> + else
> + tst_resm TPASS "Expected message was logged..."
> + fi
Here I'm going to remove useless '...' in newly added TPASS and the original
TFAIL (and in other tests).
Reviewed-by: Petr Vorel <pvorel@suse.cz>
@Cyril, Li: do we want to still keep syslog0[1-9] and syslog10 which tests syslogd?
I suppose so, but I'm asking because they are not using even legacy shell API
(test.sh) and use several other legacy libraries (syslog-lib.sh, cmdlib.sh, daemonlib.sh).
Kind regards,
Petr
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2022-04-05 10:42 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-22 1:19 [LTP] [PATCH] syslog: Add TPASS log Ma Feng via ltp
2022-04-05 10:42 ` Petr Vorel [this message]
2022-04-06 12:56 ` Jan Stancek
2022-04-06 15:38 ` Petr Vorel
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=YkwdJDzkr3sjt2Ic@pevik \
--to=pvorel@suse.cz \
--cc=ltp@lists.linux.it \
--cc=mafeng.ma@huawei.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 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.