Gallopsled / pwntools

CTF framework and exploit development library
http://pwntools.com
Other
11.74k stars 1.67k forks source link

Fix gdb and other doctests #2355

Closed peace-maker closed 5 months ago

peace-maker commented 5 months ago

We weren't running a lot of the doctests due to them having text on the previous line. This was noticed due to tests added in #2233 having a typo but not failing (executable vs. exe argument).

It appears

Example:
>>> some code

is not run but

Example:

>>> some code

is.

There were multiple occasions throughout the code base which I've grepped for.

The GDB API doctests were never run due to the .. doctest directive trying to only run them on Python 3 having a typo. It should read .. doctest::. This revealed a problem with rpyc not being available in gdb's python environment which can be fixed by unsetting the LD_LIBRARY_PATH environment variable set by the setup-python Github Action 😄