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

Petr Vorel pvorel@suse.cz
Wed Jan 14 12:33:49 CET 2026


> On Wed, Jan 14, 2026 at 4:51 PM Petr Vorel <pvorel@suse.cz> wrote:

> > > > > I'd keep them separate from core library. For non-core libraries, I'd go
> > > > with
> > > > > something more distinct, like "ltp" prefix for file and function names.


> > > Thanks!

> > > > > When I look at "libnuma.h" I'd have to think for a bit if this is
> > > > > header from numa-devel
> > > > > or LTP. "ltpnuma.h" seems (to me) more clear that it's not LTP core
> > > > > nor numa-devel.


> > > Good point, but the ltp* prefix sounds too serious to me. Anything with
> > > the ltp* prefix inside an LTP makes me think it's critical information.

> > +1

> > > Perhaps we can use a lightweight name for the extra libs/:

> > > est_*: extra test library
> > > xst_*: extened test library
> > > lst_*: ltp test library

> > > I prefer to use lst_*, which is not only different from tst_*, but also
> > > implies
> > > this is ltp tst_ things.

> > > What do you think? or any better prefix?

> > Given that include "libfoo.h" should be local header and include <foo.h> should
> > be header from /usr/lib* I would be ok with either keep things as they are or
> > use the original Li's proposal.

> > For me personally is more useful to know whether header can be used in the old
> > API (i.e. "tst_" prefix means source is converted in the new C API) than whether
> > header is from extra library.

> Well, we might subconsciously think that libfoo.h means an older version,
> but we can change that minds. Something like "lst_" can also be used in
> older APIs (and implies extra libs/).

> Furthermore, I believe these additional 'libs/' directories will continue to be
> developed and exist long-term; we currently have no plans to migrate them
> to the core API,  so explicit naming becomes crucial for maintenance.

> By now, the situation is, inlcude/ contains different prefix header files:
>   'ltp_', 'old_', 'lib': meant old LTP API, but should eventually be dropped.
>   tst_: meant the new core LTP API.

> Next, I hope that we only keep two prefixes in LTP API:
>   tst_: new core LTP API
>   lst_: extra (non-core) LTP API

I'm not a big fun of 'lst_' (I might need time to get used to it :)) but I'm not
against it.  If we agree on this it'd be great to document it, so that new
contributors will not have to think which prefix to use.

Kind regards,
Petr


More information about the ltp mailing list