[PATCH v4 1/2] selftests: run tests on nommu architecture
Johannes Berg
johannes at sipsolutions.net
Thu Oct 1 03:01:45 PDT 2026
On Thu, 2026-10-01 at 09:42 +0100, Lorenzo Stoakes (ARM) wrote:
> On Thu, Oct 01, 2026 at 09:08:33AM +0200, David Hildenbrand (Arm) wrote:
> > On 9/30/26 01:57, Hajime Tazaki wrote:
> > > Architectures lacking MMU don't support fork(2) syscall and only
> > > vfork(2) is available with limitations. Thus, we cannot run kselftest
> > > on nommu architecture as is.
> > >
> > > This commit addresses this issue with the following changes:
> > >
> > > - on test run stage, avoid calling timeout command when NOMMU=1 variable
> > > added to environmental variable, since timeout command uses fork
> > > syscall which nommu platform doesn't support.
> > > - describe the difference of nommu tests in the document.
> > >
> > > So command line to build/execute tests for nommu should be like below:
> > >
> > > $ make ARCH=um NOMMU=1 O=build kselftest-all TARGETS=nommu
> > > $ make ARCH=um NOMMU=1 O=build kselftest-install TARGETS=nommu
> > > $ NOMMU=1 ./build/kselftest/kselftest_install/run_kselftest.sh -p \
> > > -c nommu
> >
> > Is there a way we could derive that from the environment in one of these cases?
>
> I thought maybe uname could help but our LLM overlords tell me no.
Hajime originally wanted uname to indicate it, but that caused
regressions elsewhere, so we dropped that commit. I guess we could put
_something_ back?
> It pointed at something though.
>
> In fs/proc/meminfo.c:
>
> #ifndef CONFIG_MMU
> show_val_kb(m, "MmapCopy: ",
> (unsigned long)atomic_long_read(&mmap_pages_allocated));
> #endif
>
> So MmapCopy in /proc/meminfo tells us definitively, weirdly enough.
Hyrum's law and all that, but I guess it's not highly likely to (want
to) change :)
johannes
More information about the linux-um
mailing list