[LTP] [PATCH v2] doc: Add basic shell test description

Petr Vorel pvorel@suse.cz
Mon Nov 24 18:59:51 CET 2025


Hi Cyril,

TL;DR You already add my RBT (thanks), please amend your patch with the diff below.

...
> +    'shell_lib': (f'{ltp_repo}/blob/master/testcases/lib/%s', '%s'),
+1. I was thinking about it previously for C helpers, then I preferred to show
full path. I guess I'll later use 'shell_lib' prefix for these. I suppose we can
keep lib/*.c path, but sure, we could also (later) add 'lib' and 'include'.

I wish extlinks module allow to pass more params than just one.

...
> +The test setup and cleanup functions are optional and passed via variables.
> +Similarily to the C API the setup is executed exactly once at the start of the

Similarily => Similarly

> +test and the test cleanup is executed at the test end or when test was
> +interrupted by ref:`tst_brk`.
=> missing leading ':' causes text "by ref:tst_brk."

interrupted by :ref:`tst_brk`.

> +
> +   .. literalinclude:: ../../testcases/lib/tests/shell_loader_setup_cleanup.sh
> +   :language: shell

+1, nice feature.  "language : shell" require another level of indentation,
otherwise it just shows as a test below code.

Kind regards,
Petr

+++ doc/developers/api_shell_tests.rst
@@ -87,9 +87,9 @@ Test setup and cleanup
 ----------------------
 
 The test setup and cleanup functions are optional and passed via variables.
-Similarily to the C API the setup is executed exactly once at the start of the
+Similarly to the C API the setup is executed exactly once at the start of the
 test and the test cleanup is executed at the test end or when test was
-interrupted by ref:`tst_brk`.
+interrupted by :ref:`tst_brk`.
 
    .. literalinclude:: ../../testcases/lib/tests/shell_loader_setup_cleanup.sh
-   :language: shell
+      :language: shell


More information about the ltp mailing list