[LTP] [PATCH] libs: adopt lib* prefix instead of tst_* for libs/

Li Wang liwang@redhat.com
Mon Jan 12 15:10:08 CET 2026


Hi Andrea, All,

On Mon, Jan 12, 2026 at 8:59 PM Andrea Cervesato <andrea.cervesato@suse.com>
wrote:

> Hi!
>
> I generally agree with this approach, but I have the feeling we are
> mixing naming a bit here. For instance, we have headers like ipcmsg.h
> that has no functions starting with tst_*, while tst_numa.h does. Also,
> the tst_* prefix for files has the clear goal to state we are importing
> some LTP functionalities inside the tests code.
>
> Said so, I would rather rename all LTP libraries as tst_*.h and to
> rename functions inside them with tst_* prefix. In this way, we know
> at the very first look, when a library is imported from LTP and not
> from other sources.
>

I indeed thought about all use tst_* for those global header files.
But to distinguish lib/ with libs/ I finally feel that libs/ is not the
core LTP API
and sometimes built only when they are needed, if we rename all these
header file with tst_* that will mislead people to find the *.c file in
lib/, which
is not the right place.

So in my patch, keep define tst_* only for the core LTP API, and lib* prefix
reserve for libs/ that will be clear at a glance.

Or, if go with tst_*.h for all (and rename functions with tst_*), I think
the libs/ should be merged into lib/.

@Cyril, Petr, any comments?


-- 
Regards,
Li Wang


More information about the ltp mailing list