[LTP] Fix the mremap03 syscall testcase

linuxtestproject.agent@gmail.com linuxtestproject.agent@gmail.com
Wed Oct 14 18:42:03 CEST 2026


Hi Martin,

On Wed, 14 Oct 2026, Martin Cermak wrote:
> Fix the mremap03 syscall testcase

> diff --git a/testcases/kernel/syscalls/mremap/mremap03.c b/testcases/kernel/syscalls/mremap/mremap03.c
> @@ -35,7 +35,6 @@ static void setup(void)
>  	bad_addr = tst_get_bad_addr(NULL);
> -	SAFE_MUNMAP(bad_addr, page_size);

tst_get_bad_addr() returns a mapped PROT_NONE page, which mremap() can
resize; deleting this line drops the documented unmapped-old_address case.
The test still passes because old_size is 1000 pages and extends beyond
that VMA, exercising a different EFAULT check. Keep SAFE_MUNMAP() here to
preserve coverage of an unmapped old_address.

> This patch restores the original behavior of the setup() funcrion.

The commit message is missing the required Signed-off-by: trailer.
Add it at the end of the message.

Verdict - Needs revision

---
Note:

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


More information about the ltp mailing list