pytest-dev / pytest-dev/pytest-xdist
Run test subprocesses in gdb
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1.9k
- Forks
- 287
- Avg merge
- 9h 30m
- Merged PRs (30d)
- 2
Description
If you've got some buggy C-level code, running in gdb can be very useful because it prints out a very detailed traceback, with full argument names and values. This could be achieved by something like gdb -return-child-result -batch -ex r -ex bt --args python -m pytest $PYTEST_ARGS.
However, gdb doesn't work with distributed testing because they are separate process which gdb doesn't know anything about. There is the pytest-faulthandler plugin which is handy but it produces a much more limited traceback with addresses only.
It would be nice if there were some way to run the child processes in gdb like this to automatically get these backtraces.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names no files or tests; begin by tracing how pytest-xdist launches distributed child processes and compare that path with the suggested gdb -return-child-result -batch -ex r -ex bt --args python -m pytest $PYTEST_ARGS command. Done means distributed child processes can be run under gdb and produce useful backtraces, beyond the address-only output from pytest-faulthandler.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- distributed-systems, testing-qa
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100