All of lore.kernel.org
 help / color / mirror / Atom feed
From: Li Wang <liwang@redhat.com>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH v2 1/3] syscalls/tgkill01: add new test
Date: Fri, 15 Mar 2019 18:23:29 +0800	[thread overview]
Message-ID: <CAEemH2dS08E+au5RJSDe_PFehvMMFQqPUt3SWyty7X6uzLSOfw@mail.gmail.com> (raw)
In-Reply-To: <20190315100824.GA5383@rei>

On Fri, Mar 15, 2019 at 6:09 PM Cyril Hrubis <chrubis@suse.cz> wrote:

> Hi!
> > >>  int tst_checkpoint_wait(unsigned int id, unsigned int msec_timeout)
> > >>  {
> > >>         struct timespec timeout;
> > >> +       int ret;
> > >>
> > >>         if (id >= tst_max_futexes) {
> > >>                 errno = EOVERFLOW;
> > >> @@ -94,8 +95,12 @@ int tst_checkpoint_wait(unsigned int id, unsigned
> int msec_timeout)
> > >>         timeout.tv_sec = msec_timeout/1000;
> > >>         timeout.tv_nsec = (msec_timeout%1000) * 1000000;
> > >>
> > >> -       return syscall(SYS_futex, &tst_futexes[id], FUTEX_WAIT,
> > >> -                      tst_futexes[id], &timeout);
> > >> +       do {
> > >> +               ret = syscall(SYS_futex, &tst_futexes[id], FUTEX_WAIT,
> > >> +                             tst_futexes[id], &timeout);
> > >
> > >     if (ret == -1 && errno == EINTR)
> > >         tst_res(TWARN | TERRNO, "FUTEX_WAIT operation was interrupted
> by a signal, retry again");
> > >
> >
> > I am not sure if this warning message is desired for test-cases which
> > needs to wait on checkpoints irrespective of signals like this
> > tgkill01 test-case.
>
> Agreed, it's not an error condition, it's just a coincidence that most
> of the tests does not get signals when they sleep on futex, otherwise
> thing would crash and burn. So I would argue that retrying on EINTR is
> actually a bug fix rather than anything else.
>

Okay, here I'm not insist to print the warning. But it's only use for hint
on that worst situation which you were mentioned. If the checkpoint got
signal leads to never timeout and test eventually killed by test lib. That
would hard to know what happened at that moment. My concern is the
situation is hard to reproduce later so just want to print more useful
messeges:).

-- 
Regards,
Li Wang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linux.it/pipermail/ltp/attachments/20190315/5caa91e0/attachment-0001.html>

  reply	other threads:[~2019-03-15 10:23 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-13  6:12 [LTP] [PATCH v2 0/3] syscalls: add tgkill test-cases Sumit Garg
2019-03-13  6:12 ` [LTP] [PATCH v2 1/3] syscalls/tgkill01: add new test Sumit Garg
2019-03-14 12:22   ` Cyril Hrubis
2019-03-14 13:25     ` Sumit Garg
2019-03-14 13:58       ` Cyril Hrubis
2019-03-15  7:45         ` Li Wang
2019-03-15  9:22           ` Sumit Garg
2019-03-15 10:08             ` Cyril Hrubis
2019-03-15 10:23               ` Li Wang [this message]
2019-03-15 11:33                 ` Cyril Hrubis
2019-03-18  6:39                   ` Li Wang
2019-03-15  9:15         ` Sumit Garg
2019-03-15 10:18           ` Cyril Hrubis
2019-03-15 14:01             ` Sumit Garg
2019-03-18 12:59               ` Cyril Hrubis
2019-03-13  6:12 ` [LTP] [PATCH v2 2/3] syscalls/tgkill02: " Sumit Garg
2019-03-13  6:12 ` [LTP] [PATCH v2 3/3] syscalls/tgkill03: " Sumit Garg

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=CAEemH2dS08E+au5RJSDe_PFehvMMFQqPUt3SWyty7X6uzLSOfw@mail.gmail.com \
    --to=liwang@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 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.