From: Petr Vorel <pvorel@suse.cz>
To: Li Wang <li.wang@linux.dev>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH] ima: rewrite ima_mmap auxiliary with TST_NO_DEFAULT_MAIN
Date: Tue, 12 May 2026 18:45:31 +0200 [thread overview]
Message-ID: <20260512164531.GB38597@pevik> (raw)
In-Reply-To: <20260507094643.47079-1-li.wang@linux.dev>
Hi Li, all,
> Commit 7276e7c154 ("ima_violations.sh: ima_mmap.c: Replace sleep with
> checkpoints") called tst_reinit() inside the run() callback of a
> struct tst_test based binary. This is incorrect because the test
> framework has already initialized the IPC during setup, and calling
> tst_reinit() re-maps the shared memory to the parent shell's IPC
> region, corrupting the C binary's own test infrastructure.
> Fix this by converting ima_mmap to a TST_NO_DEFAULT_MAIN helper
> binary. In this mode there is no prior framework initialization, so
> tst_reinit() correctly attaches to the parent shell test's shared
> memory for checkpoint communication, following the same pattern used
> by other LTP helper binaries (e.g. execvp01_child).
> Fixes: 7276e7c154 ("ima_violations.sh: ima_mmap.c: Replace sleep with checkpoints")
Li, thanks for fixing the problem I introduced. It's nice to get from vacation
and see the work has been done :).
And using TST_NO_DEFAULT_MAIN is indeed the best way for these simple helpers.
Kind regards,
Petr
--
Mailing list info: https://lists.linux.it/listinfo/ltp
prev parent reply other threads:[~2026-05-12 16:45 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-07 9:46 [LTP] [PATCH] ima: rewrite ima_mmap auxiliary with TST_NO_DEFAULT_MAIN Li Wang
2026-05-07 10:21 ` Cyril Hrubis
2026-05-07 11:34 ` Andrea Cervesato via ltp
2026-05-07 12:05 ` Li Wang
2026-05-07 11:58 ` [LTP] " linuxtestproject.agent
2026-05-12 16:45 ` Petr Vorel [this message]
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=20260512164531.GB38597@pevik \
--to=pvorel@suse.cz \
--cc=li.wang@linux.dev \
--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