[LTP] [PATCH 2/3] doc: Add LTP-003 and LTP-004 static and tst API prefix rules

Petr Vorel pvorel@suse.cz
Wed Nov 24 08:18:53 CET 2021


Hi Richie,

...
> +2.3 LTP-003: Externally visible library symbols have the tst_ prefix
> +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> +
> +Functions, types and variables in the public test API should have the
> +tst_ prefix. With some exceptions for symbols already prefixed with
> +safe_ or ltp_.
BTW It'd be nice to have some check for shell library (maybe shellcheck would be
able to do it).

...

> +2.1.1 LTP-004: Test executable symbols are marked static
> +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> +
> +Test executables should not export symbols unecessarily. This means
typo s/unecessarily/unnecessarily/

> +that all top-level variables and functions should be marked with the
> +static keyword. The only visible symbols should be those included from
> +shared object files.
> +

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

Kind regards,
Petr


More information about the ltp mailing list