diff options
author | William Henderson <william.henderson@nutanix.com> | 2023-08-02 09:47:39 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-02 09:47:39 +0100 |
commit | 53f85b9996196ebe6ddacdc61f6bdaa20eba304b (patch) | |
tree | f41a52bd8aac2e231ae4e99917f53759ec740290 | |
parent | 8038da119c3fd53970d6820208b78e9c1798ba95 (diff) | |
download | libvfio-user-53f85b9996196ebe6ddacdc61f6bdaa20eba304b.zip libvfio-user-53f85b9996196ebe6ddacdc61f6bdaa20eba304b.tar.gz libvfio-user-53f85b9996196ebe6ddacdc61f6bdaa20eba304b.tar.bz2 |
docs: document test debugging with GDB (#756)
Signed-off-by: William Henderson <william.henderson@nutanix.com>
-rw-r--r-- | docs/testing.md | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/docs/testing.md b/docs/testing.md index adf2a55..c87505b 100644 --- a/docs/testing.md +++ b/docs/testing.md @@ -81,6 +81,18 @@ LIBVFIO_SO_DIR='/root/src/libvfio-user/build/lib' pytest-3 test/py/test_quiesce. To print libvfio-user's log messages, append the `--capture=tee-sys` option. +To use GDB to debug libvfio-user code called from Python unit tests, add a +`time.sleep` somewhere to give you time to attach to the process and set +breakpoints, run the tests with +``` +meson test -C build --timeout-multiplier=10000 +``` +to prevent the test process from being killed by meson, and attach to the +`python3` process in the usual way using +``` +gdb --pid=<pid> +``` + AFL++ ----- |