Skip to content

Better integration with faulthandler #205

Open
@enkore

Description

@enkore

One reason to use xdist is to run multithreaded tests in which case errors in the code under test tend to signal, terminating the slave. xdist allows to continue running tests in these circumstances.

It would be nice if it were possible to attach stack trace(s) (e.g. via faulthandler) or logs to such events from within the application code (immediately before signalling).

Currently the next best thing is to
(a) either have pytest-faulthandler set faulthandler up before any redirection happens, which will spew the stack traces as they happen (so they won't be reported in the test failure details). This doesn't allow to attach custom log text.
(b) run in a TTY and spew to /dev/tty which has the same problems as (a) plus it requires a TTY. This does allow for extra text.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions