On 2026-04-19, Jori Koolstra <[email protected]> wrote:
> Add tests for the new O_EMPTYPATH flag of openat(2)/openat2(2).
> 
> Also, the current openat2 tests include a helper header file that
> defines the necessary structs and constants to use openat2(2), such as
> struct open_how. This may result in conflicting definitions when the
> system header openat2.h is present as well.
> 
> So add openat2.h generated by 'make headers' to the uapi header
> files in ./tools/include and remove the helper file definitions of
> the current openat2 selftests.

These tests were switched recently to use the kselftests harness[1], you
might need to rework these tests and rebase on top of vfs-7.2.msic.

Those patches also fixed the issue you had with a custom openat2.h --
glibc has wrappers for openat2 now so we can just use them directly.

[1]: 
https://patch.msgid.link/[email protected]

> Signed-off-by: Jori Koolstra <[email protected]>
> ---
>  tools/include/uapi/linux/openat2.h            | 43 +++++++++++++++
>  tools/testing/selftests/openat2/Makefile      |  4 +-
>  .../selftests/openat2/emptypath_test.c        | 55 +++++++++++++++++++
>  tools/testing/selftests/openat2/helpers.h     | 40 +-------------
>  4 files changed, 103 insertions(+), 39 deletions(-)
>  create mode 100644 tools/include/uapi/linux/openat2.h
>  create mode 100644 tools/testing/selftests/openat2/emptypath_test.c

-- 
Aleksa Sarai
https://www.cyphar.com/

Attachment: signature.asc
Description: PGP signature

Reply via email to