All of lore.kernel.org
 help / color / mirror / Atom feed
From: Li Wang <liwang@redhat.com>
To: Petr Vorel <pvorel@suse.cz>
Cc: "ltp@lists.linux.it" <ltp@lists.linux.it>
Subject: Re: [LTP] [RFC PATCH 1/1] lib: Print in summary also tests not run at all
Date: Wed, 2 Feb 2022 09:40:21 +0800	[thread overview]
Message-ID: <CAEemH2dRwXdEN+eA5BhEyfK_cuvqhKu+mQFgJAtLJwWga1z+PQ@mail.gmail.com> (raw)
In-Reply-To: <YflwND3aDJ1lg0ps@pevik>

On Wed, Feb 2, 2022 at 1:39 AM Petr Vorel <pvorel@suse.cz> wrote:
>
> Hi Li,
>
> ...
> > Yes, I understand. So how about this way:
>
> > --- a/lib/tst_test.c
> > +++ b/lib/tst_test.c
> > @@ -785,6 +785,8 @@ static void print_failure_hints(void)
> >         print_failure_hint("known-fail", "hit by known kernel failures", NULL);
> >  }
>
> > +static unsigned int test_variants = 1;
> > +
> >  static void do_exit(int ret)
> >  {
> >         if (results) {
> > @@ -811,9 +813,11 @@ static void do_exit(int ret)
> >                 fprintf(stderr, "broken   %d\n", results->broken);
> >                 fprintf(stderr, "skipped  %d\n", results->skipped);
> >                 fprintf(stderr, "warnings %d\n", results->warnings);
> > -               fprintf(stderr, "not run  %d\n", tst_test->tcnt -
> > -                               results->passed - results->failed -
> > results->broken -
> > -                               results->skipped - results->warnings);
> > +               if (tst_test->tcnt) {
> > +                       fprintf(stderr, "not-run  %d\n",
> > (tst_test->tcnt * test_variants) -
> > +                                       results->passed -
> > results->failed - results->broken -
> > +                                       results->skipped - results->warnings);
> > +               }
> >         }
>
> >         do_cleanup();
> > @@ -1529,7 +1533,6 @@ unsigned int tst_variant;
> >  void tst_run_tcases(int argc, char *argv[], struct tst_test *self)
> >  {
> >         int ret = 0;
> > -       unsigned int test_variants = 1;
>
> >         lib_pid = getpid();
> >         tst_test = self;
>
> Yep, ack this one, works well. Will you please send a proper patch?

Sure, but I'd hold this until Xu Yang review. In case I have
something thoughtless.

Ps. He might reply late since now is on China NewYear holidays.

-- 
Regards,
Li Wang


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

  reply	other threads:[~2022-02-02  1:40 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-27 17:14 [LTP] [RFC PATCH 1/1] lib: Print in summary also tests not run at all Petr Vorel
2022-01-30  3:44 ` xuyang2018.jy
2022-01-30  6:09   ` Li Wang
2022-01-30  6:28     ` xuyang
2022-02-02  2:59       ` Li Wang
2022-01-31  7:21   ` Petr Vorel
2022-02-01 13:26     ` Li Wang
2022-02-01 17:39       ` Petr Vorel
2022-02-02  1:40         ` Li Wang [this message]
2022-02-02 10:07           ` Petr Vorel
2022-02-07  3:45           ` xuyang2018.jy
2022-02-07  4:09             ` Li Wang
2022-02-09 12:53               ` Petr Vorel
2022-02-10  2:19                 ` Li Wang
2022-02-10 16:31                   ` 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=CAEemH2dRwXdEN+eA5BhEyfK_cuvqhKu+mQFgJAtLJwWga1z+PQ@mail.gmail.com \
    --to=liwang@redhat.com \
    --cc=ltp@lists.linux.it \
    --cc=pvorel@suse.cz \
    /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.