All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sumit Garg <sumit.garg@linaro.org>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH v2 1/3] syscalls/tgkill01: add new test
Date: Thu, 14 Mar 2019 18:55:29 +0530	[thread overview]
Message-ID: <CAFA6WYPFiJArJvcDGLmxF5XK-q_6Yu24o=st10LE0Lz7d1Lesg@mail.gmail.com> (raw)
In-Reply-To: <20190314122232.GA17823@rei.lan>

On Thu, 14 Mar 2019 at 17:53, Cyril Hrubis <chrubis@suse.cz> wrote:
>
> Hi!
> The test itself looks good, my only concern is actually that checkpoints
> cannot be used for the keeping the thread asleep during the test.
> However I can easily add one function to the futex library:
>
> TST_CHECKPOINT_SLEEP(id)
>
> That would cause the thread to wait on the checkpoint until:
>
> * we were woken up
> * we timeouted
>
> Which would basically loop on tst_checkpoint_wait() and retry in case of
> EINTR.
>

I am not sure how we would manage actual "msec_timeout" in case we get
EINTR and need to retry again as we may need to take care of elapsed
time till we receive asynchronous signal.

-Sumit

> Maybe it would be a good idea to retry on EINTR in the
> TST_CHECKPOINT_WAIT(), then we could easily use that one here as well.
> I'm not sure though if there are tests that depends on checkpoints being
> interrupted by signals though, I would have to check.
>
> For the second part we already have a function to wake all threads
> waiting on checkpoint, but we have to specify exact number of threads to
> wait for, which is there in order to avoid race coditions (i.e. thread
> was not sleeping yet at the time we tried to wake it). So we would have
> to count the number of threads we want to wake before the call to the
> TST_CHECKPOINT_WAKE2().
>
> --
> Cyril Hrubis
> chrubis@suse.cz

  reply	other threads:[~2019-03-14 13:25 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 [this message]
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
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='CAFA6WYPFiJArJvcDGLmxF5XK-q_6Yu24o=st10LE0Lz7d1Lesg@mail.gmail.com' \
    --to=sumit.garg@linaro.org \
    --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.