From: Andrea Cervesato via ltp <ltp@lists.linux.it>
To: "Stephen Bertram via ltp" <ltp@lists.linux.it>
Cc: Stephen Bertram <sbertram@redhat.com>, ltp@lists.linux.it
Subject: Re: [LTP] [PATCH v1] pipe13: Scale child reap window with LTP_TIMEOUT_MUL
Date: Mon, 13 Jul 2026 09:10:51 +0000 [thread overview]
Message-ID: <6a54ab9c.25509765.3b629d.6f12@mx.google.com> (raw)
In-Reply-To: <20260710143155.588390-1-sbertram@redhat.com>
Hi Stephen,
> The post-close wait used a fixed 1000000 us cap on exponential backoff
> (~524 ms total). Scale that cap with tst_multiply_timeout() so debug
> kernels and LTP_TIMEOUT_MUL apply, fixing failures under parallel
> Kirk workers without changing default behavior on non-debug systems.
>
> Before (only with case 100):
>
> pipe13.c:50: TINFO: Creating 100 child processes
> pipe13.c:81: TINFO: pid 435007 still sleeps
> ...
> pipe13.c:81: TINFO: pid 435300 still sleeps
> pipe13.c:89: TFAIL: Closed pipe didn't wake up everyone
> The list varied but sometimes up to 20 would remained asleep.
>
> After using tst_multiply_timeout(), test passes.
>
> The failure before would happen, when using 4 paralell workers
> on a debug kernel, about 1 to 2 times when iterated 5 times.
> With the addition of the function, under the same conditions,
> it has not failed in 100 iterations.
>
> Signed-off-by: Stephen Bertram <sbertram@redhat.com>
> ---
> testcases/kernel/syscalls/pipe/pipe13.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/testcases/kernel/syscalls/pipe/pipe13.c b/testcases/kernel/syscalls/pipe/pipe13.c
> index 5d76e1f00..cf1ccbcbc 100644
> --- a/testcases/kernel/syscalls/pipe/pipe13.c
> +++ b/testcases/kernel/syscalls/pipe/pipe13.c
> @@ -44,6 +44,7 @@ static void verify_pipe(unsigned int n)
> int ret;
> unsigned int i, cnt = 0, sleep_us = 1, fail = 0;
> unsigned int child_num = tcases[n];
> + unsigned int sleep_us_cap = tst_multiply_timeout(1000) * 1000U;
Even better: we can create a function to reap children and verify
if they are completed while counting them.
Then we can use TST_RETRY_FN_EXP_BACKOFF() on it.
The problem is that we are waiting a fixed amount of time (~1s) that
is not enough when system is overloaded.
Most likely, when you are calling kirk parallel execution, other tests
are overloading the system and this test fails accordingly.
Regards,
--
Andrea Cervesato
SUSE QE Automation Engineer Linux
andrea.cervesato@suse.com
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2026-07-13 9:11 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-10 14:31 [LTP] [PATCH v1] pipe13: Scale child reap window with LTP_TIMEOUT_MUL Stephen Bertram via ltp
2026-07-10 17:00 ` [LTP] " linuxtestproject.agent
2026-07-13 9:10 ` Andrea Cervesato via ltp [this message]
2026-07-13 12:43 ` [LTP] [PATCH v1] " Stephen Bertram via ltp
2026-07-13 16:07 ` [LTP] [PATCH v2] " Stephen Bertram via ltp
2026-07-13 16:41 ` [LTP] " linuxtestproject.agent
2026-07-13 17:01 ` [LTP] [PATCH v3] " Stephen Bertram via ltp
2026-07-13 18:48 ` [LTP] " linuxtestproject.agent
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=6a54ab9c.25509765.3b629d.6f12@mx.google.com \
--to=ltp@lists.linux.it \
--cc=andrea.cervesato@suse.com \
--cc=sbertram@redhat.com \
/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