[LTP] [PATCH v3 4/4] doc: newlib_tests: Update debugging parameters
Petr Vorel
pvorel@suse.cz
Fri Mar 27 18:32:52 CET 2026
* Improve wording in doc/developers/debugging.rst. Not mention 'y'
(enough for user is to know 1 and 2 + 'y' is mentioned at -h).
* Mention all -D and LTP_DEBUG parameters in library test.
* Keep info about the levels in developers/debugging.rst, link page in
user/setup_tests.
* Remove values from old doc (we have enough places to sync on changes,
let's drop the old doc).
Follow-up: b415265cb3 ("doc/setup_tests: Document LTP_ENABLE_DEBUG=2")
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
New in v3.
doc/developers/debugging.rst | 4 ++--
doc/old/C-Test-API.asciidoc | 4 ++--
doc/users/setup_tests.rst | 2 +-
lib/newlib_tests/tst_res_flags.c | 2 +-
4 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/doc/developers/debugging.rst b/doc/developers/debugging.rst
index 4e162068b4..43d142dfeb 100644
--- a/doc/developers/debugging.rst
+++ b/doc/developers/debugging.rst
@@ -9,10 +9,10 @@ Debug messages
--------------
The LTP framework supports ``TDEBUG`` flag test debug messages. These
-messages can be enabled using the ``-D[1,2]`` parameter or setting ``LTP_DEBUG=1,2``
+messages can be enabled using the ``-D`` parameter or setting ``LTP_DEBUG``
environment variable (see :doc:`../users/setup_tests`).
-The ``-D`` parameter also supports the following verbosity levels:
+Both ``-D`` parameter and ``LTP_DEBUG`` support the following verbosity levels:
``-D1`` (or ``-D``): Enable debug logs for the test process only.
``-D2``: Enable verbose debug logs for both the test and library processes.
diff --git a/doc/old/C-Test-API.asciidoc b/doc/old/C-Test-API.asciidoc
index 4207b28e92..503dc91ce5 100644
--- a/doc/old/C-Test-API.asciidoc
+++ b/doc/old/C-Test-API.asciidoc
@@ -232,8 +232,8 @@ Printf-like function to report test result, it's mostly used with ttype:
| 'TPASS' | Test has passed.
| 'TFAIL' | Test has failed.
| 'TINFO' | General message.
-| 'TDEBUG' | Debug message (new C API only, printed with '-D' or via 'LTP_DEBUG=1' or 'y'
- environment variable), only for messages which would be too verbose for normal run.
+| 'TDEBUG' | Debug message (new C API only, enabled via '-D' or 'LTP_DEBUG' environment variable)
+ only for messages which would be too verbose for normal run.
| 'TWARN' | Something went wrong but we decided to continue. Mostly used in cleanup functions.
|==============================
diff --git a/doc/users/setup_tests.rst b/doc/users/setup_tests.rst
index a42c397feb..6f1d996e18 100644
--- a/doc/users/setup_tests.rst
+++ b/doc/users/setup_tests.rst
@@ -92,7 +92,7 @@ users.
* - LTP_DEBUG
- Enable debug info (value ``1`` (``y``) or ``2`` for more verbose level).
- Equivalent of ``-D`` parameter.
+ Equivalent of the ``-D`` parameter (see :doc:`../developers/debugging`).
Test specific environment variables
-----------------------------------
diff --git a/lib/newlib_tests/tst_res_flags.c b/lib/newlib_tests/tst_res_flags.c
index 9993d0f87d..cda0970702 100644
--- a/lib/newlib_tests/tst_res_flags.c
+++ b/lib/newlib_tests/tst_res_flags.c
@@ -21,7 +21,7 @@ static struct tcase {
{FLAG(TCONF)},
{FLAG(TWARN)},
{FLAG(TINFO)},
- {FLAG(TDEBUG), " (printed only with -D[1,2] or LTP_DEBUG=1,2)"},
+ {FLAG(TDEBUG), " (printed only with -D[1,2] or LTP_DEBUG=1(y),2)"},
};
static void do_cleanup(void)
--
2.53.0
More information about the ltp
mailing list