From: Andrea Cervesato via ltp <ltp@lists.linux.it>
To: "Stephen Bertram via ltp" <ltp@lists.linux.it>
Cc: Stephen Bertram <sbertram@redhat.com>,
fdarocha@redhat.com, ltp@lists.linux.it
Subject: Re: [LTP] [PATCH v5] semctl01: tolerate SEM_STAT races under parallel LTP runs
Date: Tue, 28 Jul 2026 13:06:14 +0000 [thread overview]
Message-ID: <6a68a948.af19844c.435dd.4d07@mx.google.com> (raw)
In-Reply-To: <20260721135530.2882066-1-sbertram@redhat.com>
Hi Stephen,
> +/*
> + * SEM_STAT takes an ipc idr index. Under parallel IPC tests that index can
> + * vanish between IPC_INFO and SEM_STAT (EIDRM/EINVAL). Refresh and retry.
> + */
> +static int do_sem_stat(union semun arg)
> +{
> + int idx;
> + unsigned int retries = 5;
> +
> + do {
> + int info_id = 0;
> +
> + idx = SAFE_SEMCTL(info_id, 0, IPC_INFO, (union semun)&ipc_buf);
> + TEST(semctl(idx, 0, SEM_STAT, arg));
> + if (TST_RET >= 0)
> + return TST_RET;
> + if (TST_ERR != EIDRM && TST_ERR != EINVAL)
> + tst_brk(TBROK | TERRNO, "semctl(SEM_STAT)");
> + } while (--retries);
> +
> + tst_brk(TBROK | TERRNO, "semctl(SEM_STAT) still failing after retries");
> + return -1;
> +}
> +
In LTP we have TST_RETRY_FUNC/TST_RETRY_FN_EXP_BACKOFF, please use
this one instead.
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-28 13:06 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-14 16:49 [LTP] [PATCH v2] semctl: updates for multi worker testing Stephen Bertram via ltp
2026-04-14 17:15 ` [LTP] " linuxtestproject.agent
2026-07-20 22:49 ` [LTP] [PATCH v3] semctl01: tolerate SEM_STAT races under parallel LTP runs Stephen Bertram via ltp
2026-07-20 23:13 ` [LTP] " linuxtestproject.agent
2026-07-20 23:56 ` [LTP] [PATCH v4] " Stephen Bertram via ltp
2026-07-21 2:38 ` [LTP] " linuxtestproject.agent
2026-07-21 13:55 ` [LTP] [PATCH v5] " Stephen Bertram via ltp
2026-07-21 14:40 ` [LTP] " linuxtestproject.agent
2026-07-28 13:06 ` Andrea Cervesato via ltp [this message]
2026-07-28 16:23 ` [LTP] [PATCH v6] " Stephen Bertram via ltp
2026-07-28 17:31 ` [LTP] " linuxtestproject.agent
2026-07-28 20:33 ` [LTP] [PATCH v7] semctl01: look up SEM_STAT index for this test's sem_id Stephen Bertram via ltp
2026-07-28 21:12 ` [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=6a68a948.af19844c.435dd.4d07@mx.google.com \
--to=ltp@lists.linux.it \
--cc=andrea.cervesato@suse.com \
--cc=fdarocha@redhat.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