Skip to content

Commit

Permalink
Refactor debugging documentation
Browse files Browse the repository at this point in the history
The debugging documentation section explains how to debug test binaries
and to enable TDEBUG messages on tests run.
  • Loading branch information
acerv committed Mar 19, 2024
1 parent fbb4dc8 commit a33d2b3
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions doc_new/developers/debugging.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,19 @@
Debugging
=========

The new test library runs the actual test, i.e. the `test()` function in a
This section explains some tricks which can be used to debug test binaries.

Debug messages
--------------

The LTP framework currently supports ``TDEBUG`` flag test debug messages. These
messages can be enabled using the ``-D`` test's argument.

Tracing and debugging syscalls
------------------------------

The new test library runs the actual test (i.e. the ``test()`` function) in a
forked process. To get stack trace of a crashing test in gdb it's needed to
`set follow-fork-mode child <https://ftp.gnu.org/old-gnu/Manuals/gdb/html_node/gdb_25.html>`_.
To trace the test, please use `strace -f` to enable tracing also for the
To trace the test, please use ``strace -f`` to enable tracing also for the
forked processes.

0 comments on commit a33d2b3

Please sign in to comment.