[LTP] [PATCH v3 1/2] Makefile: Add kernel modules related make targets

Li Wang liwang@redhat.com
Thu Aug 7 09:56:50 CEST 2025


On Thu, Aug 7, 2025 at 1:11 PM Petr Vorel <pvorel@suse.cz> wrote:

> Hi Li, all,
>
> > On Thu, Aug 7, 2025 at 7:22 AM Li Wang <liwang@redhat.com> wrote:
>
> > > Hi Petr,
>
> > > On Thu, Aug 7, 2025 at 5:14 AM Petr Vorel <pvorel@suse.cz> wrote:
>
> > >> LTP contains few kernel modules and tests which are using them.  These
> > >> require to be built with the same kernel headers as the running kernel
> > >> (SUT). Sometimes the best way to achieve this is to compile them on
> the
> > >> SUT.
>
> > >> Add 'modules', 'modules-clean' and 'modules-install' make targets to
> > >> make it easier to build them.
>
>
> > > Maybe better to keep the make target consistent with the kernel build
> > > command:
> > >   make modules_install
> > >   make modules_clean
>
> > Also, it looks like LTP mixes using "-" and "_" in its make targets:
>
> >   lib-all, metadata-all, clean_install_dir, ver_linux
>
> I chose '-' because that's what uses LTP for make targets.
> ver_linux uses underscore because target inherits it from the name of the
> file.
>
> clean_install_dir is the only target which uses '_', I'm not sure why this
> inconsistency.
>
> > So we may need to use just one selection, which can be done in a separate
> > patch anyway.
>
> I got the point that kernel uses '_'. Do we want to unify after years
> using '-'?
> I'm ok to do the work if we consider it's useful.
>

No, I have no preference right now, the reason I've discovered is because my
fingers are used to typing "make modules_install" as a muscle memory.


I personally consider more important from the long term to change build
> system
> to meson (de facto standard for the userspace projects, including these
> related
> to kernel).
>

LTP keeps going use hyphens ('-') in make-targets should be fine. Here we
only need that unified but not mixed with underscores ('_').


-- 
Regards,
Li Wang


More information about the ltp mailing list