Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix gdb and other doctests #2355

Merged
merged 5 commits into from
Feb 22, 2024
Merged

Fix gdb and other doctests #2355

merged 5 commits into from
Feb 22, 2024

Conversation

peace-maker
Copy link
Member

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 😄

But still return a `str` return for backwards-compatibility.
They appear to have to be a free standing block of `>>>` with an empty line above.
pwnlib/tubes/ssh.py Outdated Show resolved Hide resolved
@peace-maker peace-maker merged commit 2b7ec5e into Gallopsled:dev Feb 22, 2024
11 of 13 checks passed
@peace-maker peace-maker deleted the test_gdb branch February 22, 2024 17:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants