]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
selftest: add tests for O_EMPTYPATH
authorJori Koolstra <jkoolstra@xs4all.nl>
Fri, 24 Apr 2026 11:46:03 +0000 (13:46 +0200)
committerChristian Brauner <brauner@kernel.org>
Thu, 21 May 2026 08:53:37 +0000 (10:53 +0200)
commitc0329020da211b41afce4d1c8a1c2494c6d97883
tree57f42aec27054b1bc92e8ce455763fdba821cb67
parent31cf44efa6df72a524b40adefb80539f3a4e13ba
selftest: add tests for O_EMPTYPATH

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.

Signed-off-by: Jori Koolstra <jkoolstra@xs4all.nl>
Link: https://patch.msgid.link/20260424114611.1678641-3-jkoolstra@xs4all.nl
Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
tools/include/uapi/linux/openat2.h [new file with mode: 0644]
tools/testing/selftests/filesystems/openat2/Makefile
tools/testing/selftests/filesystems/openat2/emptypath_test.c [new file with mode: 0644]
tools/testing/selftests/filesystems/openat2/helpers.h