From: Christian Brauner <brauner@kernel.org>
To: Siddh Raman Pant <code@siddh.me>
Cc: Seth Forshee <sforshee@kernel.org>, Shuah Khan <shuah@kernel.org>,
linux-fsdevel <linux-fsdevel@vger.kernel.org>,
linux-kselftests <linux-kselftest@vger.kernel.org>,
linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] selftests/mount_setattr: Remove redefinition of struct mount_attr
Date: Tue, 3 Jan 2023 11:27:55 +0100 [thread overview]
Message-ID: <20230103102755.eks34kwcufoz7znx@wittgenstein> (raw)
In-Reply-To: <20221211092820.85527-1-code@siddh.me>
On Sun, Dec 11, 2022 at 02:58:20PM +0530, Siddh Raman Pant wrote:
> It is already included via sys/mount.h on line 10.
>
> GCC error reproducible by: make kselftest TARGETS="mount_setattr"
>
> mount_setattr_test.c:107:8: error: redefinition of ‘struct mount_attr’
> 107 | struct mount_attr {
> | ^~~~~~~~~~
> In file included from /usr/include/x86_64-linux-gnu/sys/mount.h:32,
> from mount_setattr_test.c:10:
> ../../../../usr/include/linux/mount.h:129:8: note: originally defined here
> 129 | struct mount_attr {
> | ^~~~~~~~~~
>
> Signed-off-by: Siddh Raman Pant <code@siddh.me>
> ---
> tools/testing/selftests/mount_setattr/mount_setattr_test.c | 7 -------
> 1 file changed, 7 deletions(-)
>
> diff --git a/tools/testing/selftests/mount_setattr/mount_setattr_test.c b/tools/testing/selftests/mount_setattr/mount_setattr_test.c
> index 8c5fea68ae67..582669ca38e9 100644
> --- a/tools/testing/selftests/mount_setattr/mount_setattr_test.c
> +++ b/tools/testing/selftests/mount_setattr/mount_setattr_test.c
> @@ -103,13 +103,6 @@
> #else
> #define __NR_mount_setattr 442
> #endif
> -
> -struct mount_attr {
> - __u64 attr_set;
> - __u64 attr_clr;
> - __u64 propagation;
> - __u64 userns_fd;
> -};
> #endif
Honestly, until the conflicts between linux/mount.h and sys/mount.h are
fixed properly we should probably just not include either linux/mount.h
nor sys/mount.h and just define all the things we need in this single
test file.
prev parent reply other threads:[~2023-01-03 10:28 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-11 9:28 Siddh Raman Pant
2023-01-01 16:43 ` Siddh Raman Pant
2023-01-03 10:27 ` Christian Brauner [this message]
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=20230103102755.eks34kwcufoz7znx@wittgenstein \
--to=brauner@kernel.org \
--cc=code@siddh.me \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=sforshee@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®