[LTP] [PATCH v2 2/2] include/old: rename legacy headers to tso_* namespace
Li Wang
liwang@redhat.com
Thu Jan 29 00:20:55 CET 2026
On Thu, Jan 29, 2026 at 5:22 AM Petr Vorel <pvorel@suse.cz> wrote:
> Hi Li, all,
>
> > To clearly distinguish legacy header files from the core (tst_*) and
> > extension (tse_*) LTP APIs, legacy header files have been grouped
> > into the otst_* namespace.
>
> > Some legacy header files do not begin with old_, they still belong
> > to the legacy header file set. For clarity, all legacy header files
> > are now uniformly grouped into the tso_* namespace.
>
> > include/old/{old_checkpoint.h => tso_checkpoint.h}
> > include/old/{ltp_cpuid.h => tso_cpuid.h}
> > include/old/{old_device.h => tso_device.h}
> > include/old/{tlibio.h => tso_lio.h}
> > include/old/{old_module.h => tso_module.h}
> > include/old/{ltp_priv.h => tso_priv.h}
> > include/old/{random_range.h => tso_random_range.h}
> > include/old/{old_resource.h => tso_resource.h}
> > include/old/{old_safe_file_ops.h => tso_safe_file_ops.h}
> > include/old/{safe_macros.h => tso_safe_macros.h}
> > include/old/{old_safe_net.h => tso_safe_net.h}
> > include/old/{old_safe_stdio.h => tso_safe_stdio.h}
> > include/old/{ltp_signal.h => tso_signal.h}
> > include/old/{old_tmpdir.h => tso_tmpdir.h}
> > include/old/{usctest.h => tso_usctest.h}
>
> As I wrote, I don't like the whole rename but I will not block it.
> I guess it will be merged after the release, just not to break anything.
>
> But is it worth to rename whole old API sources and headers? Isn't it
> enough
> just to know that 'tst_' or 'tse_' are new API, the rest is the old API or
> no
> API? Each rename means that 'git log' requires '--' because the rename.
>
Well, yes, that's my hesitation too.
However, I believe the old APIs may persist for a long time. Therefore,
using consistent naming conventions for all APIs will make it easier for
LTP beginners to understand the code logic.
>
> Anyway, IMHO it would help (as a separate effort after the release) to
> describe
> the prefixes in doc.
>
Yes, it's not a rush, we could give enough time for refinement work.
--
Regards,
Li Wang
More information about the ltp
mailing list