-
Notifications
You must be signed in to change notification settings - Fork 15
fix(bin_tests): race conditions between concurrent tests #1402
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
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 301db70 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. |
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
|
|
Thanks for this. |
|
/merge |
|
View all feedbacks in Devflow UI.
The expected merge time in
|
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.