From: Hajime Tazaki <thehajime@gmail.com>
To: ljs@kernel.org
Cc: linux-mm@kvack.org, geert@linux-m68k.org, daniel@thingy.jp,
shuah@kernel.org, akpm@linux-foundation.org, david@kernel.org,
liam@infradead.org, vbabka@kernel.org, rppt@kernel.org,
surenb@google.com, mhocko@suse.com,
linux-kselftest@vger.kernel.org, linux-um@lists.infradead.org
Subject: Re: [RFC PATCH 4/6] selftests: fix build errors on alpine linux
Date: Sat, 15 Aug 2026 07:29:22 +0900 [thread overview]
Message-ID: <m2y0e8pc8t.wl-thehajime@gmail.com> (raw)
In-Reply-To: <an8MHlxZzu6a_1ui@lucifer>
On Fri, 14 Aug 2026 21:39:33 +0900,
Lorenzo Stoakes (ARM) wrote:
>
> On Thu, Aug 13, 2026 at 03:33:59PM +0900, Hajime Tazaki wrote:
> > Some nommu architectures only work on Alpine Linux, which doesn't use
> > glibc for the standard library. It uses musl-libc and is implemented in
> > a different way as glibc, resulting build failures.
> >
> > This commit fixes this issue by adding missing definitions. The fixes
> > are now only covered to TARGETS=mm which was tested for the moment;
> > future contributions are needed to fully build/execute tests on nommu
> > platforms.
> >
> > Cc: Shuah Khan <shuah@kernel.org>
> > Cc: Andrew Morton <akpm@linux-foundation.org>
> > Cc: David Hildenbrand <david@kernel.org>
> > Cc: Lorenzo Stoakes <ljs@kernel.org>
> > Cc: "Liam R. Howlett" <liam@infradead.org>
> > Cc: Vlastimil Babka <vbabka@kernel.org>
> > Cc: Mike Rapoport <rppt@kernel.org>
> > Cc: Suren Baghdasaryan <surenb@google.com>
> > Cc: Michal Hocko <mhocko@suse.com>
> > Cc: linux-kselftest@vger.kernel.org
> > Cc: linux-mm@kvack.org
> > Cc: linux-um@lists.infradead.org
> > Signed-off-by: Hajime Tazaki <thehajime@gmail.com>
>
> I mean vaguely looks un-invasive which is the test here.
>
> Couple comments below.
(snip)
> > diff --git a/tools/testing/selftests/lib.mk b/tools/testing/selftests/lib.mk
> > index f02cc8a2e4ae..2cc819006424 100644
> > --- a/tools/testing/selftests/lib.mk
> > +++ b/tools/testing/selftests/lib.mk
> > @@ -197,7 +197,7 @@ clean: $(if $(TEST_GEN_MODS_DIR),clean_mods_dir)
> > $(CLEAN)
> >
> > # Build with _GNU_SOURCE by default
>
> You probably want to update this comment.
indeed, will update this part (may even not needed to modify this).
> > -CFLAGS += -D_GNU_SOURCE=
> > +CFLAGS += -D_GNU_SOURCE= -D_LARGEFILE64_SOURCE
(snip)
> > diff --git a/tools/testing/selftests/mm/hugetlb_dio.c b/tools/testing/selftests/mm/hugetlb_dio.c
> > index fb4600570e13..aee6be530ccb 100644
> > --- a/tools/testing/selftests/mm/hugetlb_dio.c
> > +++ b/tools/testing/selftests/mm/hugetlb_dio.c
> > @@ -22,12 +22,9 @@
> > #include "kselftest.h"
> > #include "hugepage_settings.h"
> >
> > -#ifndef STATX_DIOALIGN
> > -#define STATX_DIOALIGN 0x00002000U
> > -#endif
> > -
> > static int get_dio_alignment(int fd)
> > {
> > +#ifdef STATX_DIOALIGN
> > struct statx stx;
> > int ret;
> >
> > @@ -43,6 +40,9 @@ static int get_dio_alignment(int fd)
> > return 1;
> >
> > return stx.stx_dio_offset_align;
> > +#else
> > + return -1;
> > +#endif
>
> Probably better to declare different functions to make this less hideous.
I see your point. will look for the other way.
-- Hajime
next prev parent reply other threads:[~2026-08-14 23:07 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-13 6:33 [RFC PATCH 0/6] fix nommu mmap and add nommu kselftests Hajime Tazaki
2026-08-13 6:33 ` [RFC PATCH 1/6] mm: nommu: fix do_mremap() to correctly update internal states Hajime Tazaki
2026-08-14 11:52 ` Lorenzo Stoakes (ARM)
2026-08-14 22:28 ` Hajime Tazaki
2026-08-13 6:33 ` [RFC PATCH 2/6] mm: nommu: use vma_is_anonymous() to check if vmas are anonymous Hajime Tazaki
2026-08-14 11:52 ` Lorenzo Stoakes (ARM)
2026-08-14 22:29 ` Hajime Tazaki
2026-08-13 6:33 ` [RFC PATCH 3/6] mm: nommu: fix an issue on map request to /dev/zero Hajime Tazaki
2026-08-13 12:19 ` Greg Kroah-Hartman
2026-08-13 12:43 ` Daniel Palmer
2026-08-13 13:29 ` Lorenzo Stoakes (ARM)
2026-08-13 13:51 ` Daniel Palmer
2026-08-13 13:58 ` Lorenzo Stoakes (ARM)
2026-08-13 14:06 ` Greg Kroah-Hartman
2026-08-14 12:42 ` Hajime Tazaki
2026-08-14 13:02 ` Lorenzo Stoakes (ARM)
2026-08-13 14:02 ` Greg Kroah-Hartman
2026-08-13 14:10 ` Lorenzo Stoakes (ARM)
2026-08-14 9:09 ` Geert Uytterhoeven
2026-08-13 13:22 ` Matthew Wilcox
2026-08-13 13:32 ` Lorenzo Stoakes (ARM)
2026-08-13 13:43 ` Lorenzo Stoakes (ARM)
2026-08-13 14:04 ` Greg Kroah-Hartman
2026-08-14 12:42 ` Hajime Tazaki
2026-08-14 12:37 ` Lorenzo Stoakes (ARM)
2026-08-13 6:33 ` [RFC PATCH 4/6] selftests: fix build errors on alpine linux Hajime Tazaki
2026-08-14 9:34 ` Pedro Falcato
2026-08-14 12:44 ` Hajime Tazaki
2026-08-14 12:39 ` Lorenzo Stoakes (ARM)
2026-08-14 22:29 ` Hajime Tazaki [this message]
2026-08-13 6:34 ` [RFC PATCH 5/6] selftests: run tests on nommu architecture Hajime Tazaki
2026-08-14 12:50 ` Lorenzo Stoakes (ARM)
2026-08-14 14:34 ` Mark Brown
2026-08-13 6:34 ` [RFC PATCH 6/6] selftests/mm: add nommu mmap and mremap behavior tests Hajime Tazaki
2026-08-14 13:28 ` Lorenzo Stoakes (ARM)
2026-08-14 22:35 ` Hajime Tazaki
2026-08-14 11:24 ` [RFC PATCH 0/6] fix nommu mmap and add nommu kselftests Lorenzo Stoakes (ARM)
2026-08-14 11:26 ` Lorenzo Stoakes (ARM)
2026-08-14 22:27 ` Hajime Tazaki
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=m2y0e8pc8t.wl-thehajime@gmail.com \
--to=thehajime@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=daniel@thingy.jp \
--cc=david@kernel.org \
--cc=geert@linux-m68k.org \
--cc=liam@infradead.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-um@lists.infradead.org \
--cc=ljs@kernel.org \
--cc=mhocko@suse.com \
--cc=rppt@kernel.org \
--cc=shuah@kernel.org \
--cc=surenb@google.com \
--cc=vbabka@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