-
-
Notifications
You must be signed in to change notification settings - Fork 200
test: Fix flaky test_external_crash_reporter_http when running with kcov #1419
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Co-authored-by: vaind <6349682+vaind@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix flaky behavior in external crash reporter HTTP test
Fix flaky test_external_crash_reporter_http when running with kcov
Oct 17, 2025
Contributor
|
@copilot we should just skip the whole test case in kcov then |
… assertions Co-authored-by: vaind <6349682+vaind@users.noreply.github.com>
Contributor
Author
Copilot
AI
changed the title
test: Fix flaky test_external_crash_reporter_http when running with kcov
Fix flaky test_external_crash_reporter_http when running with kcov
Oct 17, 2025
Contributor
|
@copilot we only care about test_external_crash_reporter_http - the rest works even with kcov right? |
Co-authored-by: vaind <6349682+vaind@users.noreply.github.com>
Contributor
Author
vaind
reviewed
Oct 18, 2025
vaind
approved these changes
Oct 19, 2025
jpnurmi
approved these changes
Oct 19, 2025
Collaborator
jpnurmi
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Problem
The
test_external_crash_reporter_httptest was flaky when running under kcov code coverage analysis. The issue is that kcov exits with code 0 even when the process it's monitoring crashes with a signal like SIGSEGV:This caused the assertion
assert child.returncodeto fail because 0 is falsy in Python, making the test fail intermittently when running in the kcov CI job.Solution
Skip the
test_external_crash_reporter_httptest when running under kcov using the@pytest.mark.skipifdecorator. The fix uses the existingis_kcovcondition variable fromtests/conditions.py:This approach is consistent with how other analyzer-specific behaviors are handled in the codebase (e.g.,
has_breakpadandhas_crashpadalready skip tests entirely when kcov is running).Tests Updated
Only
test_external_crash_reporter_httpis skipped when running with kcov. Other inproc crash tests work correctly with kcov and do not need to be skipped.Note: Breakpad and Crashpad tests are already completely skipped when kcov is running via the
has_breakpadandhas_crashpadconditions, so they don't require updates.Fixes https://github.com/getsentry/sentry-native/actions/runs/18502219462/attempts/1 and https://github.com/getsentry/sentry-native/actions/runs/18594256344/job/53016350698
cc @jpnurmi
Fixes #1418
Original prompt
Fixes #1418
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.