From: Greg KH <greg@kroah.com>
To: Yifei Liu <yifei.l.liu@oracle.com>
Cc: shuah@kernel.org, kevin.brodsky@arm.com, stable@vger.kernel.org,
linux-kselftest@vger.kernel.org
Subject: Re: [PATCH v2 Linux-6.12.y Linux-6.13.y 1/1] selftests/mm: build with -O2
Date: Wed, 5 Feb 2025 13:14:55 +0100 [thread overview]
Message-ID: <2025020544-preview-worshiper-8539@gregkh> (raw)
In-Reply-To: <20250204214723.1991309-1-yifei.l.liu@oracle.com>
On Tue, Feb 04, 2025 at 01:47:23PM -0800, Yifei Liu wrote:
> From: Kevin Brodsky <kevin.brodsky@arm.com>
>
> [ Upstream commit 46036188ea1f5266df23a6149dea0df1c77cd1c7 ]
>
> The mm kselftests are currently built with no optimisation (-O0). It's
> unclear why, and besides being obviously suboptimal, this also prevents
> the pkeys tests from working as intended. Let's build all the tests with
> -O2.
>
> [kevin.brodsky@arm.com: silence unused-result warnings]
> Link: https://lkml.kernel.org/r/20250107170110.2819685-1-kevin.brodsky@arm.com
> Link: https://lkml.kernel.org/r/20241209095019.1732120-6-kevin.brodsky@arm.com
> Signed-off-by: Kevin Brodsky <kevin.brodsky@arm.com>
> Cc: Aruna Ramakrishna <aruna.ramakrishna@oracle.com>
> Cc: Catalin Marinas <catalin.marinas@arm.com>
> Cc: Dave Hansen <dave.hansen@linux.intel.com>
> Cc: Joey Gouly <joey.gouly@arm.com>
> Cc: Keith Lucas <keith.lucas@oracle.com>
> Cc: Ryan Roberts <ryan.roberts@arm.com>
> Cc: Shuah Khan <shuah@kernel.org>
> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
> (cherry picked from commit 46036188ea1f5266df23a6149dea0df1c77cd1c7)
> [Yifei: This commit also fix the failure of pkey_sighandler_tests_64,
> which is also in linux-6.12.y and linux-6.13.y, thus backport this commit]
> Signed-off-by: Yifei Liu <yifei.l.liu@oracle.com>
> ---
> tools/testing/selftests/mm/Makefile | 9 ++++++++-
> 1 file changed, 8 insertions(+), 1 deletion(-)
>
> diff --git a/tools/testing/selftests/mm/Makefile b/tools/testing/selftests/mm/Makefile
> index 02e1204971b0..c0138cb19705 100644
> --- a/tools/testing/selftests/mm/Makefile
> +++ b/tools/testing/selftests/mm/Makefile
> @@ -33,9 +33,16 @@ endif
> # LDLIBS.
> MAKEFLAGS += --no-builtin-rules
>
> -CFLAGS = -Wall -I $(top_srcdir) $(EXTRA_CFLAGS) $(KHDR_INCLUDES) $(TOOLS_INCLUDES)
> +CFLAGS = -Wall -O2 -I $(top_srcdir) $(EXTRA_CFLAGS) $(KHDR_INCLUDES) $(TOOLS_INCLUDES)
> LDLIBS = -lrt -lpthread -lm
>
> +# Some distributions (such as Ubuntu) configure GCC so that _FORTIFY_SOURCE is
> +# automatically enabled at -O1 or above. This triggers various unused-result
> +# warnings where functions such as read() or write() are called and their
> +# return value is not checked. Disable _FORTIFY_SOURCE to silence those
> +# warnings.
> +CFLAGS += -U_FORTIFY_SOURCE
> +
> TEST_GEN_FILES = cow
> TEST_GEN_FILES += compaction_test
> TEST_GEN_FILES += gup_longterm
This does not apply to 6.13 :(
next prev parent reply other threads:[~2025-02-05 12:14 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-04 21:47 [PATCH v2 Linux-6.12.y Linux-6.13.y 1/1] selftests/mm: build with -O2 Yifei Liu
2025-02-05 12:14 ` Greg KH [this message]
2025-02-10 18:43 ` [External] : " Yifei Liu
2025-02-11 6:24 ` Greg KH
2025-02-12 0:33 ` Yifei Liu
2025-02-19 2:13 ` Yifei Liu
2025-02-19 5:09 ` Greg KH
2025-02-07 22:51 ` Sasha Levin
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=2025020544-preview-worshiper-8539@gregkh \
--to=greg@kroah.com \
--cc=kevin.brodsky@arm.com \
--cc=linux-kselftest@vger.kernel.org \
--cc=shuah@kernel.org \
--cc=stable@vger.kernel.org \
--cc=yifei.l.liu@oracle.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