fix(bin_tests): race conditions between concurrent tests#1402
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1402 +/- ##
==========================================
+ Coverage 71.16% 71.18% +0.01%
==========================================
Files 403 403
Lines 64368 64365 -3
==========================================
+ Hits 45810 45820 +10
+ Misses 18558 18545 -13
🚀 New features to boost your workflow:
|
BenchmarksComparisonBenchmark execution time: 2025-12-13 19:48:51 Comparing candidate commit 301db705 in PR branch Found 1 performance improvements and 0 performance regressions! Performance is the same for 56 metrics, 2 unstable metrics. scenario:tags/replace_trace_tags
CandidateCandidate benchmark detailsGroup 1
Group 2
Group 3
Group 4
Group 5
Group 6
Group 7
Group 8
Group 9
Group 10
Group 11
Group 12
Group 13
Group 14
Group 15
Group 16
Group 17
Group 18
Group 19
BaselineOmitted due to size. |
Contributor
Artifact Size Benchmark Reportaarch64-alpine-linux-musl
aarch64-apple-darwin
aarch64-unknown-linux-gnu
libdatadog-x64-windows
libdatadog-x86-windows
x86_64-alpine-linux-musl
x86_64-apple-darwin
x86_64-unknown-linux-gnu
|
Contributor
|
Thanks for this. |
gyuheon0h
approved these changes
Dec 15, 2025
Contributor
|
/merge |
|
View all feedbacks in Devflow UI.
The expected merge time in
|
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
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.
What does this PR do?
Force certain tests to run serially to avoid unintentional dependencies on global state, which might affect reliability.
serial_test = "3.2"as a dev-dependency inbin_tests/Cargo.toml#[serial(runtime_callback)]to three tests that manipulate global runtime callback state:test_010_runtime_callback_frametest_011_runtime_callback_string(the flaky one)test_012_runtime_callback_frame_invalid_utf8Motivation
In another PR, I hit a failure:
This was a race condition: cargo test runs tests in parallel threads within the same process, and three tests (
test_010,test_011,test_012) were all manipulating the same global runtime callback state simultaneously. One test would register a callback, then another would clear it before the first could verify registration, causing intermittent failures.Additional Notes
The
serial_testsintentionally leaks some memory as part of its organization, so we ignore these 3 tests under miri.How to test the change?
Run the affected tests multiple times to verify they no longer fail intermittently:
All runs should pass consistently. The CI job "build and test using cross - on centos7" should also now pass reliably.