-
Notifications
You must be signed in to change notification settings - Fork 891
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
Add RPC-based tests #254
Add RPC-based tests #254
Conversation
Do I understand correctly that the idea behind this is to be able to launch unit tests over easily testable functions (the ones that doesn't need running program under the hood)? As I guess we won't want to mock everything around ( Do we really need it so complicated? I mean, we probably could have something like:
At least for the functions that doesn't need a process under the hood (well we could mock stuff but it might be painful/hard?). We could also start with having some end to end tests that would be produced manually, launched with predefined environment (envvars, config, theme) and just checked for this exact output for given list of commands. |
Won’t work. GDB exits with code zero even if Python throws an exception.
Hacking around this is more work than just exposing the Pwndbg module over
RPC to allow “import pwndbg” outside of GDBpython.
…On Sat, Nov 25, 2017 at 7:32 AM Disconnect3d ***@***.***> wrote:
Do I understand correctly that the idea behind this is to be able to
launch unit tests over some fancy functions?
Do we really need it so complicated? I mean, we probably could have
something like:
- launch gdb
- send a pi import pwndbg.tests; pwndbg.tests.run()
- gather results
—
You are receiving this because you were assigned.
Reply to this email directly, view it on GitHub
<#254 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAG0GHw3i_h7y5cVD1q9rEF8E0dlgUsMks5s6DMmgaJpZM4NMEVC>
.
|
@zachriggle still how are we going to test commands that use gdb api? By mocking it? |
Nope, by actually running GDB and exposing it (also) over XMLRPC.
…On Sun, Nov 26, 2017 at 8:06 AM Disconnect3d ***@***.***> wrote:
@zachriggle <https://github.com/zachriggle> still how are we going to
test commands that use gdb api? By mocking it?
This won't us check whether pwndbg works fine with particular gdb version.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#254 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAG0GPHeCyQfWl9rGnlFfo-p3FXEgb1Kks5s6YyKgaJpZM4NMEVC>
.
|
Guess this can be closed due to #375 ? |
(Note: Duplicate of #170 with the PR coming from my fork)
Allow testing Pwndbg itself by embedding an XMLRPC server inside the GDB instance, which exposes both the
gdb
andpwndbg
modules, as well aseval
.Since the default XMLRPC behavior is terrible and doesn't know how to marshall any of the following:
bytearray
objectbytes
objectstr
orunicode
with embedded\x00
We hack both the Marshaller and Unmarshaller to support a new datatype.