tests: harden memory leak check in test_siblings_without_eval #3088
+3
−11
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.
When running the test suite on darwin as part of nixpkgs package build,
we often hit the following error:
You can find an example of the full failure log here:
https://hydra.nixos.org/build/320731525
The difference between actual and expected is 16k (one page size on
aarch64-darwin).
The test seems brittle as it depends on peak memory, not real memory
at the moment of measurement, so anything during the run of the process
that could push the allocator to allocate another page can break the
test.
This patch switches the test case to measure real memory using psutil on
all platforms.
Signed-off-by: Ihar Hrachyshka ihar.hrachyshka@gmail.com
Proposed changes
Please include a description of the problem or feature this PR is addressing. If there is a corresponding issue, include the issue #.
Checklist
Put an
xin the boxes that apply.pre-commit run --all-filesto format my code / installed pre-commit prior to committing changes