Skip to content

tests: fix "FD leakage detected" / turn --lsof into error again #3879

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

Closed
blueyed opened this issue Aug 26, 2018 · 5 comments
Closed

tests: fix "FD leakage detected" / turn --lsof into error again #3879

blueyed opened this issue Aug 26, 2018 · 5 comments
Labels
type: infrastructure improvement to development/releases/CI structure

Comments

@blueyed
Copy link
Contributor

blueyed commented Aug 26, 2018

There are some "FD leakage detected" errors in builds, and pypy appears to has a lot of them: https://travis-ci.org/pytest-dev/pytest/jobs/420632250#L658

I think CI should fail (at least in one job) in case this happens, i.e. on any warning.

@blueyed blueyed added the type: infrastructure improvement to development/releases/CI structure label Aug 26, 2018
@RonnyPfannschmidt
Copy link
Member

This breaks builds over things we have no control over

@nicoddemus
Copy link
Member

... on any warning.

Btw we already configure to error on warnings, it is just that we put some of them that we don't have control over in a whitelist in tox.ini

@blueyed
Copy link
Contributor Author

blueyed commented Aug 28, 2018

Just noticed that there are likely more with pypy due to the garbage collector being called explicitly?!
https://github.com/blueyed/pytest/blob/84e4909f5bd505a88b8ddf7e0aee191de0f3f631/src/_pytest/pytester.py#L112-L113

@blueyed
Copy link
Contributor Author

blueyed commented Aug 28, 2018

@nicoddemus
This one is not in there though - but it is also not a real warning, but emitted by pytest itself (IIRC): https://github.com/blueyed/pytest/blob/84e4909f5bd505a88b8ddf7e0aee191de0f3f631/tox.ini#L207-L218

@blueyed
Copy link
Contributor Author

blueyed commented Aug 28, 2018

Ok, --lsof was added in d4fe273 initially, to report and fail on FD leakage, but then later was turned into a warning (see #2366).
I think there is some real issue here, and that it does not make sense to run it for all tests, if it is only ignored then in the end (it is two subprocesses on top, and the explicit GC for pypy might also be the reason for pypy being slower in general, and especially with coverage tracking).

@blueyed blueyed changed the title tests: fail on any warning / "FD leakage detected" tests: fix "FD leakage detected" / turn --lsof into error again Aug 28, 2018
@blueyed blueyed closed this as completed Nov 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: infrastructure improvement to development/releases/CI structure
Projects
None yet
Development

No branches or pull requests

3 participants