linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Seth Forshee <sforshee@kernel.org>
To: Anh Tuan Phan <tuananhlfc@gmail.com>
Cc: brauner@kernel.org, shuah@kernel.org,
	linux-fsdevel@vger.kernel.org,
	linux-kernel-mentees@lists.linuxfoundation.org
Subject: Re: [PATCH v1] selftests mount: Fix mount_setattr_test builds failed
Date: Thu, 23 Mar 2023 13:07:37 -0500	[thread overview]
Message-ID: <ZByVac3GsD7RFuaj@do-x1extreme> (raw)
In-Reply-To: <20230323172859.89085-1-tuananhlfc@gmail.com>

On Fri, Mar 24, 2023 at 12:28:59AM +0700, Anh Tuan Phan wrote:
> When compiling selftests with target mount_setattr I encountered some errors with the below messages:
> mount_setattr_test.c: In function ‘mount_setattr_thread’:
> mount_setattr_test.c:343:16: error: variable ‘attr’ has initializer but incomplete type
>   343 |         struct mount_attr attr = {
>       |                ^~~~~~~~~~
> 
> These errors are might be because of linux/mount.h is not included. This patch resolves that issue.
> 
> Signed-off-by: Anh Tuan Phan <tuananhlfc@gmail.com>
> ---
>  tools/testing/selftests/mount_setattr/mount_setattr_test.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/tools/testing/selftests/mount_setattr/mount_setattr_test.c b/tools/testing/selftests/mount_setattr/mount_setattr_test.c
> index 582669ca38e9..7ca13a924e34 100644
> --- a/tools/testing/selftests/mount_setattr/mount_setattr_test.c
> +++ b/tools/testing/selftests/mount_setattr/mount_setattr_test.c
> @@ -18,6 +18,7 @@
>  #include <grp.h>
>  #include <stdbool.h>
>  #include <stdarg.h>
> +#include "linux/mount.h"
>  
>  #include "../kselftest_harness.h"

Oops, I had meant to send this fix before and forgot.

One minor nit. I'd prefer to see angle brackets used for this include,
since the kernel header path is passed using -isystem and angle brackets
are more conventional for system includes. It's also how most other
selftests include kernel headers. But either way:

Acked-by: Seth Forshee (DigitalOcean) <sforshee@kernel.org>

  reply	other threads:[~2023-03-23 18:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-23 17:28 [PATCH v1] selftests mount: Fix mount_setattr_test builds failed Anh Tuan Phan
2023-03-23 18:07 ` Seth Forshee [this message]
2023-03-24  2:14   ` [PATCH v2 1/1] " Anh Tuan Phan
2023-03-27  8:00     ` Christian Brauner

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=ZByVac3GsD7RFuaj@do-x1extreme \
    --to=sforshee@kernel.org \
    --cc=brauner@kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel-mentees@lists.linuxfoundation.org \
    --cc=shuah@kernel.org \
    --cc=tuananhlfc@gmail.com \
    /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;
as well as URLs for NNTP newsgroup(s).