From: Sasha Levin <sashal@kernel.org>
To: Christian Brauner <brauner@kernel.org>
Cc: Jori Koolstra <jkoolstra@xs4all.nl>,
Shuah Khan <shuah@kernel.org>,
linux-fsdevel@vger.kernel.org, linux-kselftest@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: [PATCH] selftests/filesystems: include <fcntl.h> in wrappers.h
Date: Wed, 11 Nov 2026 20:40:25 -0500 [thread overview]
Message-ID: <20261112014025.1243753-1-sashal@kernel.org> (raw)
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
reply other threads:[~2026-11-12 1:40 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261112014025.1243753-1-sashal@kernel.org \
--to=sashal@kernel.org \
--cc=brauner@kernel.org \
--cc=jkoolstra@xs4all.nl \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=shuah@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®