[LTP] memfd_create: move sys_memfd_create() to lapi/memfd.h

linuxtestproject.agent@gmail.com linuxtestproject.agent@gmail.com
Thu May 7 20:32:27 CEST 2026


Hi Ricardo,

--- [PATCH 1/2] ---

On 2026-05-07, Ricardo Branco wrote:
> memfd_create: move sys_memfd_create() to lapi/memfd.h
>
> Add the static inline wrapper to include/lapi/memfd.h and include the
> required headers so other tests can reuse it.
>
> Also fix some minor issues detected by make check.

The "also fix" indicates a second logical change bundled in. Please split
the minor cleanup fixes (blank line in memfd_create01.c, trailing semicolon
in CHECK_MFD_HAS_SEALS) into a separate commit so each patch contains
exactly one logical change.

> -	check_mfd_has_seals(__FILE__, __LINE__, (fd), (seals));
> +	check_mfd_has_seals(__FILE__, __LINE__, (fd), (seals))

This fix is independent of the sys_memfd_create() move — separate commit.

Pre-existing issues noticed in the surrounding code (not introduced
by this patch):

- include/lapi/memfd.h (pre-patch) — file relied on callers to pull in
  tst_test.h and lapi/syscalls.h transitively; now correctly self-contained.

---
Note:

Our agent completed the review of the patch. The full review can be
found at: https://github.com/linux-test-project/ltp-agent/actions/runs/25514269891

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