Skip to content
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

test_minidump_size_limit occasionally fails #69

Open
afranchuk opened this issue Jan 6, 2023 · 5 comments
Open

test_minidump_size_limit occasionally fails #69

afranchuk opened this issue Jan 6, 2023 · 5 comments

Comments

@afranchuk
Copy link
Contributor

The test fails sporadically on my local system (due to small differences). Based on the comments in the test, this isn't anything new.

I'm wondering why the logic/assertion here isn't simply assert!(meta.len() <= minidump_size_limit). As far as I can tell that's what is logically being tested, and there isn't really any way to guarantee (without significantly more effort, I expect) that the minidumps are the same size (with an error tolerance). Alternatively, I don't see much harm in increasing the error tolerance such that it's much less likely to fail.

@gabrielesvelto
Copy link
Contributor

Yes, I think that relaxing the assertion would be the way to go here. Enforcing a hard limit on the minidump size is too much of an effort for little value, this is really a soft limit.

@Jake-Shadle
Copy link
Collaborator

Yah that has been problematic in the past it's fine to relax it.

@afranchuk
Copy link
Contributor Author

So to clarify, do we want to

  1. assert!(meta.len() <= minidump_size_limit) - this is fairly permissive, given that it's allowing the minidump an extra 2MB over the prior run, and realistically wouldn't sporadically fail, or
  2. continue to instead assert that the minidump size is approximately the same as the prior run, but with a more tolerant setting of "approximately"?

@gabrielesvelto
Copy link
Contributor

If we want to test the size limit then I'd say to go for 1. but maybe with a smaller value than the previous run? Say we set minidump_size_limit to 3/4 of normal_file_size and then assert that the minidump is indeed smaller than normal_file_size? Since it's a soft limit we just need to check that it's being enforced, not that it's yielding exact results.

@afranchuk
Copy link
Contributor Author

afranchuk commented Jan 10, 2023

So we do test that. The unit test both tests that a larger limit won't be triggered and a smaller limit will. This issue is specifically with regard to the larger limit case (which makes it all the more frustrating that it sporadically fails, since logically it's a simpler case 😄). I will adjust the larger limit case accordingly. Now that I think more about it, I suppose the test assertions were doing what they were doing in some attempt to show that the limit wasn't triggered. But I think that's fairly difficult to check without explicit signalling. So in that regard, removing this whole case would probably be fine too...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants