[LTP] [PATCH v5 3/6] Disable kernel version check in landlock tests

Petr Vorel pvorel@suse.cz
Tue Aug 13 19:32:54 CEST 2024


> On Thu, Aug 08, 2024 at 11:58:24AM +0200, Petr Vorel wrote:
> > is is really helpful when landlock support has
> > > been backported into old kernels.

> > Great, I'm glad you removed it from all landlock tests. It really did not make
> > sense to guard correct version with 3 guards (kernel version, kernel config and
> > ABI). Could you please remove also CONFIG_SECURITY_LANDLOCK=y, because you
> > check EOPNOTSUPP in verify_landlock_is_enabled().

> > Anyway, feel free to merge these first 3 patches (ideally remove also
> > CONFIG_SECURITY_LANDLOCK=y before merge).

> My understanding is that LTP only tests supported features to make sure
> they work as expected, if enabled.  Is it correct?

FYI LTP should skip the test if feature is not enabled (instead of false
positive result). And LTP tries to support various kernels (mainline,
stable/LTS, enterprise kernels), various glibc (and other libc) versions [1].

If possible (like in landlock case) it's best to avoid hardcoding minimal kernel
version (features can be backported). Also, when not needed, it's better to
avoid kernel config check (e.g. for landlock).

Kind regards,
Petr

[1] https://linux-test-project.readthedocs.io/en/latest/users/supported_systems.html

> I'm then wondering what is the purpose of needs_kconfigs.  If there is
> no "needed" config, does that means that Landlock tests will always run
> and detect at run time if tests are skipped or not?  If yes, it looks
> good to me.

> Andrea's commit to remove needs_kconfig:
> https://github.com/linux-test-project/ltp/commit/e7ebc637d0d99295490adf57660a3b3a177d65d3

> Is there an online dashboard to see some tested kernels?


> > Reviewed-by: Petr Vorel <pvorel@suse.cz>

> > Kind regards,
> > Petr

> > -- 
> > Mailing list info: https://lists.linux.it/listinfo/ltp


More information about the ltp mailing list