All of lore.kernel.org
 help / color / mirror / Atom feed
From: linuxtestproject.agent@gmail.com
To: Li Wang <li.wang@linux.dev>
Cc: ltp@lists.linux.it, LTP AI Reviewer <ltp-ai@noreply.github.com>
Subject: Re: [LTP] ima: rewrite ima_mmap auxiliary with TST_NO_DEFAULT_MAIN
Date: Thu,  7 May 2026 11:58:03 +0000	[thread overview]
Message-ID: <20260507115803.4007-1-linuxtestproject.agent@gmail.com> (raw)
In-Reply-To: <20260507094643.47079-1-li.wang@linux.dev>

Hi Li,

On 2026-05-07, Li Wang wrote:
> ima: rewrite ima_mmap auxiliary with TST_NO_DEFAULT_MAIN

> +#define TST_NO_DEFAULT_MAIN
>  #include "tst_test.h"

> +	tst_reinit();
> +	if (argc != 2)
> +		tst_brk(TBROK, "usage: ima_mmap <filename>");
> +
> +	fd = SAFE_OPEN(argv[1], O_CREAT | O_RDWR, S_IRWXU);
>  	file = SAFE_MMAP(NULL, MMAPSIZE, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
>  	SAFE_CLOSE(fd);
> +	/* Waiting until ima_violations.sh open and close file */
>  	TST_CHECKPOINT_WAKE_AND_WAIT(0);
> +	SAFE_MUNMAP(file, MMAPSIZE);
>  	tst_res(TPASS, "test completed");

Correct pattern. Moving tst_reinit() before any framework use and
switching to TST_NO_DEFAULT_MAIN properly fixes the IPC corruption.
The checkpoint handshake inversion between the helper and the shell
script is consistent.

Reviewed-by: LTP AI Reviewer <ltp-ai@noreply.github.com>

---
Note:

Our agent completed the review of the patch. The full review can be
found at: (not available)

The agent can sometimes produce false positives although often its
findings are genuine. If you find issues with the review, please
comment this email or ignore the suggestions.

Regards,
LTP AI Reviewer

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

  parent reply	other threads:[~2026-05-07 11:58 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 ` linuxtestproject.agent [this message]
2026-05-12 16:45 ` Petr Vorel

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=20260507115803.4007-1-linuxtestproject.agent@gmail.com \
    --to=linuxtestproject.agent@gmail.com \
    --cc=li.wang@linux.dev \
    --cc=ltp-ai@noreply.github.com \
    --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.