Skip to content

Fix flaky flexbuffers_alloc_check test in cargo test#8965

Open
RenzoMXD wants to merge 1 commit intogoogle:masterfrom
RenzoMXD:fix/flaky-rust-alloc-check-test
Open

Fix flaky flexbuffers_alloc_check test in cargo test#8965
RenzoMXD wants to merge 1 commit intogoogle:masterfrom
RenzoMXD:fix/flaky-rust-alloc-check-test

Conversation

@RenzoMXD
Copy link
Contributor

@RenzoMXD RenzoMXD commented Mar 7, 2026

The alloc check binaries use a global non-thread-safe allocation counter (static mut NUM_ALLOCS) to assert zero heap allocations on warm builder reuse.
When run via cargo test, the test harness's background threads occasionally allocate, inflating the counter and causing intermittent assertion failures. These binaries are already run reliably via cargo run --bin in RustTest.sh, so disabling them as test targets avoids the flaky behavior with no loss of coverage.
Closes #8961

@RenzoMXD RenzoMXD requested a review from dbaileychess as a code owner March 7, 2026 14:16
@RenzoMXD RenzoMXD mentioned this pull request Mar 7, 2026
@jtdavis777
Copy link
Collaborator

Just to make sure I understand your comment, these tests are executed as part of a PR build elsewhere? What is the use of this file?

Thank you for all your help :)

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

Successfully merging this pull request may close these issues.

Rust: flaky CI test

2 participants