Re: [PATCH 0/4] selftests/mm: skip several tests when thp is not available

Chunyu Hu
2026-03-13T02:22:01Z

On Thu, Mar 12, 2026 at 08:39:31PM +0100, David Hildenbrand (Arm) wrote:
> On 3/12/26 12:40, Chunyu Hu wrote:
> > There are several tests requires transprarent hugepages, when run on thp
> > disabled kernel such as realtime kernel, there will be false positve.
> > Mark those tests as skip when thp is not available.
>
> We expend that people that run the tests have the configs as contained in
>
> tools/testing/selftests/mm/config

I didn't notice we have such as file. It's a good template for people to
refer to. We can see in the test log when some tests are skipped:

'skipped test(s) detected. Consider enabling relevant config options to
improve coverage.'

Then this template is helpful for user to 'enable relevant config' when
they building kernle themself. But some users just run the default product
kernel which is a pre-compiled kernel with product config.

>
> enabled.
>
> I'm fine with teaching the tests that that is no longer required.
>
> Should we then remove
>
> CONFIG_TRANSPARENT_HUGEPAGE=y
>
> from the file, or leave it in there for people building their configs to
> know what to enable for best test coverage? (I doubt people do use it
> for that purpose)

The config template is good for people to getting better coverage. Maybe we
leave it there, and point people to this config template in the log when some
tests are skipped due to kernel config. And yes, user may not do this
and they want to detect issue in there product config.

'skipped test(s) detected. Consider enabling relevant config options to
improve coverage. See selftests/mm/config.'

I find the commit that introduced this config template. And there's a guide
in the commit message that about how to merge the config.

'8c749ce93ee6 selftests: create test-specific kconfig fragments'

>
> --
> Cheers,
>
> David
>