Re: [PATCH 1/2] selftests/empty_mntns: fix header conflicts and remove TOOLS_INCLUDES
From: Christian Brauner
Date: Fri Oct 30 2026 - 11:43:22 EST
On Thu, Oct 01, 2026 at 12:27:27PM +0530, Disha Goel wrote:
> Including <linux/mount.h> alongside <sys/mount.h> in empty_mntns test
> files leads to compilation errors with glibc due to conflicting enum
> definitions of MS_RDONLY and other mount flags.
That part is fine. Note that ../wrappers.h still pulls in
<linux/mount.h>, so what actually fixes this is that <sys/mount.h> now
comes first.
> Additionally, passing $(TOOLS_INCLUDES) (-isystem tools/include/uapi)
> causes tools/include/uapi/linux/types.h to be included, forcing
> int-ll64.h definitions on architectures like PowerPC (ppc64le) that
> use int-l64.h, resulting in type collisions with system headers.
> - Removing $(TOOLS_INCLUDES) from the Makefile since standard UAPI
> headers are already supplied via $(KHDR_INCLUDES).
No, please drop this hunk. $(TOOLS_INCLUDES) is there so the tests build
without a headers_install and filesystems/statmount, pidfd and
namespaces use it the same way. The int-ll64.h vs int-l64.h clash you
hit is in tools/include/uapi/linux/types.h and only shows up when the
kernel headers aren't installed. Fix it there, not by dropping the
include path in one directory.