public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Cyril Hrubis <chrubis@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH/RFC] tst_process_state_wait: wait for schedstats to settle when state == S
Date: Thu, 7 Nov 2019 13:03:53 +0100	[thread overview]
Message-ID: <20191107120353.GB22352@rei.lan> (raw)
In-Reply-To: <20191107113929.GA22352@rei.lan>

Hi!
> > hb->lock is locked at this point, and requeue takes it too, so I'm not
> > sure what makes it fail. I've seen testcase fail in at least
> > 2 different ways now. Here's the other one:
> 
> Looking at the test shouldn't we wait for the processes to be sleeping
> after the futex_cmp_requeue() syscall?
> 
> i.e.
> 
> diff --git a/testcases/kernel/syscalls/futex/futex_cmp_requeue01.c b/testcases/kernel/syscalls/futex/futex_cmp_requeue01.c
> index f5264c2ba..41f5e88a6 100644
> --- a/testcases/kernel/syscalls/futex/futex_cmp_requeue01.c
> +++ b/testcases/kernel/syscalls/futex/futex_cmp_requeue01.c
> @@ -71,6 +71,9 @@ static void verify_futex_cmp_requeue(unsigned int n)
>                         TST_RET, exp_ret);
>         }
> 
> +       for (i = 0; i < tc->num_waiters; i++)
> +               TST_PROCESS_STATE_WAIT(pid[i], 'S');
> +
>         num_requeues = futex_wake(&futexes[1], tc->num_waiters, 0);
>         num_waits = futex_wake(&futexes[0], tc->num_waiters, 0);

And this obviously wouldn't work since we are waking up some of them in
a subset of the testcases.

-- 
Cyril Hrubis
chrubis@suse.cz

  reply	other threads:[~2019-11-07 12:03 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-05 11:57 [LTP] [PATCH/RFC] tst_process_state_wait: wait for schedstats to settle when state == S Jan Stancek
2019-11-06  9:59 ` Jan Stancek
2019-11-07 11:39   ` Cyril Hrubis
2019-11-07 12:03     ` Cyril Hrubis [this message]
2019-11-07 12:15   ` Cyril Hrubis
2019-11-07 12:31     ` Jan Stancek

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=20191107120353.GB22352@rei.lan \
    --to=chrubis@suse.cz \
    --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