Linux Test Project
 help / color / mirror / Atom feed
From: Petr Vorel <pvorel@suse.cz>
To: Jan Stancek <jstancek@redhat.com>
Cc: LTP List <ltp@lists.linux.it>
Subject: Re: [LTP] [PATCH] syslog: Add TPASS log
Date: Wed, 6 Apr 2022 17:38:08 +0200	[thread overview]
Message-ID: <Yk2z4OZdCtOVONT4@pevik> (raw)
In-Reply-To: <CAASaF6yWtBRY32ZudfS+ktwBY=fwepxM7PUFWGZkiZ5+gVVk7g@mail.gmail.com>

Hi Jan,

> On Tue, Apr 5, 2022 at 12:42 PM Petr Vorel <pvorel@suse.cz> wrote:

> > 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).

> I wouldn't miss these tests, they always had sporadic failures that
> were related to
> configuration (rsyslog config, journald rate-limiting, etc.) and lot
> of sleep to restart
> daemon dozens of times. One sanity test calling syslog() would probably do.

> We already cover kernel functionality with kmsg01 and on recent distros
> syslog() (or write to /dev/log) is write to /run/systemd/journal/dev-log anyway.

Thanks for confirmation. I'd keep syslog11.c and syslog12.c, which test syslog
(syscall - __NR_syslog; IMHO there is no test for (g)libc/POSIX syslog())
and delete all shell tests.

Kind regards,
Petr

> > Kind regards,
> > Petr

> > --
> > Mailing list info: https://lists.linux.it/listinfo/ltp



-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

      reply	other threads:[~2022-04-06 15:38 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
2022-04-06 12:56   ` Jan Stancek
2022-04-06 15:38     ` Petr Vorel [this message]

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=Yk2z4OZdCtOVONT4@pevik \
    --to=pvorel@suse.cz \
    --cc=jstancek@redhat.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