From: Shuah Khan <skhan@linuxfoundation.org>
To: Chen Linxuan <chenlinxuan@uniontech.com>, Shuah Khan <shuah@kernel.org>
Cc: zhanjun@uniontech.com, niecheng1@uniontech.com,
linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org,
Shuah Khan <skhan@linuxfoundation.org>
Subject: Re: [PATCH RESEND] selftests/memfd: clean Makefile
Date: Wed, 18 Jun 2025 15:21:42 -0600 [thread overview]
Message-ID: <96c46d3d-0e0a-464a-b64c-15c2a544a974@linuxfoundation.org> (raw)
In-Reply-To: <20250610020559.2797938-2-chenlinxuan@uniontech.com>
On 6/9/25 20:05, Chen Linxuan wrote:
> When writing a test for fusectl, I referred to this Makefile as a
> reference for creating a FUSE daemon in the selftests.
> While doing so, I noticed that there is a minor issue in the Makefile.
What happens if this change isn't made?
>
> The fuse_mnt.c file is not actually compiled into fuse_mnt.o,
> and the code setting CFLAGS for it never takes effect.
> The reason fuse_mnt compiles successfully is because CFLAGS is set
> at the very beginning of the file.
>
> Signed-off-by: Chen Linxuan <chenlinxuan@uniontech.com>
> ---
> tools/testing/selftests/memfd/Makefile | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/tools/testing/selftests/memfd/Makefile b/tools/testing/selftests/memfd/Makefile
> index 163b6f68631c4..e9b886c65153d 100644
> --- a/tools/testing/selftests/memfd/Makefile
> +++ b/tools/testing/selftests/memfd/Makefile
> @@ -1,5 +1,4 @@
> # SPDX-License-Identifier: GPL-2.0
> -CFLAGS += -D_FILE_OFFSET_BITS=64
What's the reason for deleting the above?
> CFLAGS += $(KHDR_INCLUDES)
>
> TEST_GEN_PROGS := memfd_test
> @@ -16,10 +15,9 @@ ifeq ($(VAR_LDLIBS),)
> VAR_LDLIBS := -lfuse -pthread
> endif
>
> -fuse_mnt.o: CFLAGS += $(VAR_CFLAGS)
> -
> include ../lib.mk
>
> +$(OUTPUT)/fuse_mnt: CFLAGS += $(VAR_CFLAGS)
> $(OUTPUT)/fuse_mnt: LDLIBS += $(VAR_LDLIBS)
>
> $(OUTPUT)/memfd_test: memfd_test.c common.c
thanks,
-- Shuah
next prev parent reply other threads:[~2025-06-18 21:21 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-10 2:05 Chen Linxuan
2025-06-18 21:21 ` Shuah Khan [this message]
2025-06-19 7:43 ` Chen Linxuan
2025-06-19 17:02 ` Shuah Khan
2025-06-20 2:40 ` Chen Linxuan
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=96c46d3d-0e0a-464a-b64c-15c2a544a974@linuxfoundation.org \
--to=skhan@linuxfoundation.org \
--cc=chenlinxuan@uniontech.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=niecheng1@uniontech.com \
--cc=shuah@kernel.org \
--cc=zhanjun@uniontech.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
all inboxes | Powered by JetHome®