mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] selftests/filesystems: include <fcntl.h> in wrappers.h
@ 2026-11-12  1:40 Sasha Levin
  0 siblings, 0 replies; only message in thread
From: Sasha Levin @ 2026-11-12  1:40 UTC (permalink / raw)
  To: Christian Brauner
  Cc: Jori Koolstra, Shuah Khan, linux-fsdevel, linux-kselftest, linux-kernel

openat_o_mkdir() in wrappers.h uses O_DIRECTORY, O_CREAT and O_EXCL, but
the header doesn't include <fcntl.h>. fscontext_ns_test.c doesn't
either, so it no longer builds:

  ../wrappers.h:116:32: error: 'O_DIRECTORY' undeclared

Include it in the header.

Fixes: b536a4aa16ea ("selftest: add tests for open*(O_CREAT|O_DIRECTORY)")
Reported-by: kernelci.org bot <bot@kernelci.org>
Closes: https://d.kernelci.org/test/maestro:6af49b775b429d354e37819c
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/r/202611110221.YzAZrCXO-lkp@intel.com/
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
Every selftest that includes wrappers.h builds with this, gcc and clang
on x86_64.

 tools/testing/selftests/filesystems/wrappers.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tools/testing/selftests/filesystems/wrappers.h b/tools/testing/selftests/filesystems/wrappers.h
index bc58bdb800631..09f02f67487c6 100644
--- a/tools/testing/selftests/filesystems/wrappers.h
+++ b/tools/testing/selftests/filesystems/wrappers.h
@@ -5,6 +5,7 @@
 
 #define _GNU_SOURCE
 
+#include <fcntl.h>
 #include <linux/types.h>
 #include <linux/mount.h>
 #include <sys/syscall.h>

base-commit: 13419eff849a88a276dec97fa62a532dc7fff400
-- 
2.53.0


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-11-12  1:40 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-12  1:40 [PATCH] selftests/filesystems: include <fcntl.h> in wrappers.h Sasha Levin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®