added docker-compose and instructions how to run tests there

pull/1033/head
Hubert Bryłkowski 3 years ago committed by Disconnect3d
parent a53abc8376
commit 5c9bd146c8

@ -60,6 +60,13 @@ Pwndbg is an open-source project, written and maintained by [many contributors](
Want to help with development? Read [CONTRIBUTING](.github/CONTRIBUTING.md) or [join our Discord server](https://discord.gg/x47DssnGwm)! Want to help with development? Read [CONTRIBUTING](.github/CONTRIBUTING.md) or [join our Discord server](https://discord.gg/x47DssnGwm)!
## How to develop?
To run tests locally you can do this in docker image, after cloning repo run simply
```shell
docker-compose run main ./tests.sh
```
Disclaimer - this won't work on apple silicon macs.
## Contact ## Contact
If you have any questions not worthy of a [bug report](https://github.com/pwndbg/pwndbg/issues), feel free to ping If you have any questions not worthy of a [bug report](https://github.com/pwndbg/pwndbg/issues), feel free to ping
anybody on [Discord](https://discord.gg/x47DssnGwm) and ask away. anybody on [Discord](https://discord.gg/x47DssnGwm) and ask away.

@ -0,0 +1,9 @@
version: "3.8"
services:
main:
build: .
volumes:
- .:/pwndbg
platform: linux/amd64
cap_add:
- SYS_PTRACE

@ -262,10 +262,9 @@ def test_windbg_eX_commands(start_binary):
# Last possible address on stack where we can perform an 8-byte write # Last possible address on stack where we can perform an 8-byte write
stack_last_qword_ea = stack_page.end - 8 stack_last_qword_ea = stack_page.end - 8
assert gdb.execute('eq %#x 0xCAFEBABEdeadbeef 0xABCD' % stack_last_qword_ea, to_string=True) == ( gdb_result = gdb.execute('eq %#x 0xCAFEBABEdeadbeef 0xABCD' % stack_last_qword_ea, to_string=True).split("\n")
'Cannot access memory at address 0x7fffffffeff8\n' assert "Cannot access memory at address" in gdb_result[0]
'(Made 1 writes to memory; skipping further writes)\n' assert gdb_result[1] == '(Made 1 writes to memory; skipping further writes)'
)
# Check if the write actually occurred # Check if the write actually occurred
assert pwndbg.memory.read(stack_last_qword_ea, 8) == b'\xef\xbe\xad\xde\xbe\xba\xfe\xca' assert pwndbg.memory.read(stack_last_qword_ea, 8) == b'\xef\xbe\xad\xde\xbe\xba\xfe\xca'

Loading…
Cancel
Save