From: Li Wang <li.wang@linux.dev>
To: ltp@lists.linux.it
Cc: Li Wang <liwang@hygon.cn>
Subject: [LTP] [PATCH] syscall: set FORK in tst_sig for some old tests
Date: Thu, 13 Aug 2026 10:32:16 +0800 [thread overview]
Message-ID: <20260813023216.79848-1-li.wang@linux.dev> (raw)
From: Li Wang <liwang@hygon.cn>
Since commit d90d2004657b ("lib: Use backoff polling to wait for loop
device nodes") use TST_RETRY_FN_EXP_BACKOFF(), which calls tst_multiply_timeout().
That in turn reaches tst_has_slow_kconfig() -> tst_kconfig_read() ->
popen("zcat /proc/config.gz") to read the kernel config.
popen() forks a child, and that child exits the SIGCHLD is reported
as an unexpected signal by the tst_sig(NOFORK) handler:
umount2_01 1 TBROK : tst_sig.c:232: unexpected signal SIGCHLD(17) received
Since these tests now genuinely fork (indirectly via popen), declaring
FORK matches their actual behavior and lets the handler tolerate the
child's SIGCHLD. This is a minimal fix that preserves the retry logic.
These are old-API tests that will eventually be converted to the new
tst_test API and this issue disappears entirely. The one-line FORK
change is a low-cost bridge until then.
Fixes: d90d2004657b ("lib: Use backoff polling to wait for loop device nodes")
Signed-off-by: Li Wang <liwang@hygon.cn>
---
Notes:
This is a temporary solution for the regression, I will convert
these old tests to the new API next few days.
testcases/kernel/syscalls/linkat/linkat02.c | 2 +-
testcases/kernel/syscalls/mknodat/mknodat02.c | 2 +-
testcases/kernel/syscalls/rename/rename11.c | 2 +-
testcases/kernel/syscalls/renameat/renameat01.c | 2 +-
testcases/kernel/syscalls/umount2/umount2_01.c | 2 +-
5 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/testcases/kernel/syscalls/linkat/linkat02.c b/testcases/kernel/syscalls/linkat/linkat02.c
index 273587271..6dfa7cfb5 100644
--- a/testcases/kernel/syscalls/linkat/linkat02.c
+++ b/testcases/kernel/syscalls/linkat/linkat02.c
@@ -140,7 +140,7 @@ static void setup(void)
{
tst_require_root();
- tst_sig(NOFORK, DEF_HANDLER, cleanup);
+ tst_sig(FORK, DEF_HANDLER, cleanup);
tst_tmpdir();
diff --git a/testcases/kernel/syscalls/mknodat/mknodat02.c b/testcases/kernel/syscalls/mknodat/mknodat02.c
index 2f7c56f00..89cfc5978 100644
--- a/testcases/kernel/syscalls/mknodat/mknodat02.c
+++ b/testcases/kernel/syscalls/mknodat/mknodat02.c
@@ -107,7 +107,7 @@ static void setup(void)
tst_require_root();
- tst_sig(NOFORK, DEF_HANDLER, cleanup);
+ tst_sig(FORK, DEF_HANDLER, cleanup);
tst_tmpdir();
diff --git a/testcases/kernel/syscalls/rename/rename11.c b/testcases/kernel/syscalls/rename/rename11.c
index 8ff9f7d38..26e324d64 100644
--- a/testcases/kernel/syscalls/rename/rename11.c
+++ b/testcases/kernel/syscalls/rename/rename11.c
@@ -90,7 +90,7 @@ static void setup(void)
{
int i;
- tst_sig(NOFORK, DEF_HANDLER, cleanup);
+ tst_sig(FORK, DEF_HANDLER, cleanup);
tst_require_root();
diff --git a/testcases/kernel/syscalls/renameat/renameat01.c b/testcases/kernel/syscalls/renameat/renameat01.c
index 72e72b481..f9ed3a9a7 100644
--- a/testcases/kernel/syscalls/renameat/renameat01.c
+++ b/testcases/kernel/syscalls/renameat/renameat01.c
@@ -134,7 +134,7 @@ static void setup(void)
tst_require_root();
- tst_sig(NOFORK, DEF_HANDLER, cleanup);
+ tst_sig(FORK, DEF_HANDLER, cleanup);
tst_tmpdir();
diff --git a/testcases/kernel/syscalls/umount2/umount2_01.c b/testcases/kernel/syscalls/umount2/umount2_01.c
index 274409ef3..c6496e306 100644
--- a/testcases/kernel/syscalls/umount2/umount2_01.c
+++ b/testcases/kernel/syscalls/umount2/umount2_01.c
@@ -67,7 +67,7 @@ static void setup(void)
{
tst_require_root();
- tst_sig(NOFORK, DEF_HANDLER, NULL);
+ tst_sig(FORK, DEF_HANDLER, NULL);
tst_tmpdir();
--
2.55.0
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next reply other threads:[~2026-08-13 2:32 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-13 2:32 Li Wang [this message]
2026-08-13 4:13 ` [LTP] syscall: set FORK in tst_sig for some old tests linuxtestproject.agent
2026-08-13 6:14 ` [LTP] [PATCH] " Avinesh Kumar via ltp
2026-08-13 6:26 ` Petr Vorel
2026-08-13 6:45 ` Li Wang
2026-08-13 6:50 ` Petr Vorel
2026-08-13 9:12 ` Li Wang
2026-08-13 6:19 ` Wake Liu via ltp
2026-08-13 6:25 ` Andrea Cervesato via ltp
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=20260813023216.79848-1-li.wang@linux.dev \
--to=li.wang@linux.dev \
--cc=liwang@hygon.cn \
--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.