Ignore leaks in canonical temp and test dirs #7971
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
These happen randomly on CI sometimes.
I believe what happens is that each test looks if anything changed in
/tmp/. For that reason we already ignore/tmp/tmpaddon, which is added by either the CI or one of the browsers - it gets added while a test runs, and the test thinks it's a leak. The problem this PR solves is that the canonical temp dir will stay alive after a test finishes, and so if one test begins before it exists and finishes after it, it will look like a leak. (I think we don't see this more often because the dir is created fairly early on.) In any case, the canonical temp and test dirs are not things that can "leak", they are meant to stay alive, so just ignore them for leak test purposes.