Repository navigation
test(obs-util): isolate bmem counter checks in a child process - #1209
Merged
Merged
Conversation
zackees
enabled auto-merge
October 17, 2026 09:20
Member
Author
#978 moved threading_allocs into the threading binary, where ~40 tests run in parallel and several allocate through bmem, so its absolute deltas of the process-wide bnum_allocs() counter race (macOS master run 38979468586: left 6, right 5). holds_under_concurrent_allocation keeps another thread allocating through bmem while the same measurement runs: it fails every time (5/5 locally, left 7 right 4). Refs #1133
The bnum_allocs checks in threading_allocs and bmem_parity now run alone in a re-exec of the test binary, so the binary's other tests can allocate in parallel without skewing the deltas. Fixes #1133
zackees
force-pushed
the
fix/1133-isolate-alloc-counter-tests
branch
from
October 17, 2026 09:45
bc78d71 to
622236d
Compare
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.
Fixes #1133.
bnum_allocsis process-global, so the absolute-delta checks inthreading_allocsandbmem_parity::matches_c_oracleraced with the other tests of their binaries.threading_allocs::holds_under_concurrent_allocationkeeps a thread allocating while the measurement runs; it failed 5/5 (left: 7, right: 4).tests/common::isolated(name)re-execs the test binary for exactly that test (--exact --test-threads=1, marker env var). The parent asserts the child passed and ran one test. Both counter checks now measure only in the child, so the new test passes with its allocating thread still running.No new test binaries (obs-util stays at the 8-binary cap). Local:
./lintok;soldr cargo test -p obs-util --test memory --test threading10 + 41 passed.