[LTP] [PATCH 1/2] doc: Link API pages, rename title

Petr Vorel pvorel@suse.cz
Fri Jun 7 16:11:28 CEST 2024


Rename pages to be able to use them in links via :doc:.

We loose code formatting when linking code with :ref: struct tst_test,
but IMHO having a link is more important (usability).

Using :ref: requires to enable sphinx.ext.autosectionlabel plugin.

Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
 doc/conf.py                        |  1 +
 doc/developers/api_c_tests.rst     |  4 ++--
 doc/developers/api_shell_tests.rst |  4 ++--
 doc/developers/ltp_library.rst     |  5 +++--
 doc/maintainers/patch_review.rst   | 10 +++++-----
 5 files changed, 13 insertions(+), 11 deletions(-)

diff --git a/doc/conf.py b/doc/conf.py
index 9525ad7bb..ac1220450 100644
--- a/doc/conf.py
+++ b/doc/conf.py
@@ -23,6 +23,7 @@ release = '1.0'
 extensions = [
     'linuxdoc.rstKernelDoc',
     'sphinxcontrib.spelling',
+    'sphinx.ext.autosectionlabel',
     'sphinx.ext.extlinks'
 ]
 
diff --git a/doc/developers/api_c_tests.rst b/doc/developers/api_c_tests.rst
index 2a9f3e7b9..164f82504 100644
--- a/doc/developers/api_c_tests.rst
+++ b/doc/developers/api_c_tests.rst
@@ -4,8 +4,8 @@
 .. Include headers in this file with:
 .. .. kernel-doc:: ../../include/tst_test.h
 
-Developing using C API
-======================
+LTP C API
+=========
 
 Core LTP API
 ------------
diff --git a/doc/developers/api_shell_tests.rst b/doc/developers/api_shell_tests.rst
index 2fb2a5068..b6e8560d9 100644
--- a/doc/developers/api_shell_tests.rst
+++ b/doc/developers/api_shell_tests.rst
@@ -1,4 +1,4 @@
 .. SPDX-License-Identifier: GPL-2.0-or-later
 
-Developing using shell API
-==========================
+LTP shell API
+=============
diff --git a/doc/developers/ltp_library.rst b/doc/developers/ltp_library.rst
index 723781feb..c10366516 100644
--- a/doc/developers/ltp_library.rst
+++ b/doc/developers/ltp_library.rst
@@ -6,8 +6,9 @@ LTP Library guidelines
 General Rules
 -------------
 
-When we extend library API, we need to apply the same general rules that we use
-when writing tests, plus:
+For extending the LTP library API it applies the same general rules as
+for :doc:`writing tests <../developers/writing_tests>`
+(with strong focus on readability and simplicity), plus:
 
 #. LTP library tests must go inside :master:`lib/newlib_tests` directory
 #. LTP documentation has to be updated according to API changes
diff --git a/doc/maintainers/patch_review.rst b/doc/maintainers/patch_review.rst
index 0561ffd9d..36caaf23b 100644
--- a/doc/maintainers/patch_review.rst
+++ b/doc/maintainers/patch_review.rst
@@ -146,17 +146,17 @@ New test should
 C tests
 ~~~~~~~
 
-* Use the new C API, implementing ``struct tst_test``
+* Use :doc:`../developers/api_c_tests`, implementing :ref:`struct tst_test`
 * Test binaries are added into corresponding ``.gitignore`` files
 * Check coding style with ``make check``
 * Docparse documentation
-* If a test is a regression test it should include ``.tags`` in the
-  ``struct tst_test`` definition
+* If a test is a regression test it should include :ref:`.tags<struct tst_tag>` in the
+  :ref:`struct tst_test` definition
 
 Shell tests
 ~~~~~~~~~~~
 
-* Use new shell API
+* Use :doc:`../developers/api_shell_tests`
 * Check coding style with ``make check``
 * If a test is a regression test it should include related kernel or glibc
   commits as a comment
@@ -164,4 +164,4 @@ Shell tests
 LTP library
 ~~~~~~~~~~~
 
-For patchset touching the LTP library, follow the LTP library guidelines.
+For patchset touching the LTP library, follow :doc:`../developers/ltp_library`.
-- 
2.45.1



More information about the ltp mailing list