Repository navigation
test: build fixtures before a test runs its own binary again - #745
Merged
Merged
Conversation
The stress run on the v0.11.9 release commit (42930480712) failed three macOS shards, at 2, 8 and 16 threads, with "fixture binary missing at target/release/emit" in basic.rs and artifact.rs, right after a cargo build that had succeeded. Two tests added for #709 and #711 run their own test binary again, with an environment of their own. `fixture_bin` builds each fixture once per process, so every such child ran `cargo build -p emit` too, and cargo relinks the binary (removes it, then links it again) even when nothing is stale, while tests in the parent process were running it: the race #278 fixed for the inspect example, reopened. `common::rerun_self` now builds the fixtures a child needs in the parent and marks the child (TERMLENS_TEST_FIXTURES_BUILT), and `fixture_bin` builds nothing in a marked run. Both tests use it. Shown with CARGO pointed at a wrapper that logs each call, running the two tests' binaries directly: before, 3 `build -p emit` calls, all from children (one from basic, two from artifact's two runs); after, 2, one in each parent, and none from a child. The race itself did not show on Linux in 40 runs of both suites at 16 threads; cargo's relink window was hit on macOS. Test-only, so no CHANGELOG entry. Signed-off-by: Vyncint Ng <115854244+vyncint@users.noreply.github.com>
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.
The stress run on the v0.11.9 release commit (42930480712) failed three
macOS shards, at 2, 8 and 16 threads, with "fixture binary missing at
target/release/emit" in basic.rs and artifact.rs, right after a cargo
build that had succeeded.
Two tests added for #709 and #711 run their own test binary again, with
an environment of their own.
fixture_binbuilds each fixture once perprocess, so every such child ran
cargo build -p emittoo, and cargorelinks the binary (removes it, then links it again) even when nothing
is stale, while tests in the parent process were running it: the race
#278 fixed for the inspect example, reopened.
common::rerun_selfnow builds the fixtures a child needs in the parentand marks the child (TERMLENS_TEST_FIXTURES_BUILT), and
fixture_binbuilds nothing in a marked run. Both tests use it.
Shown with CARGO pointed at a wrapper that logs each call, running the
two tests' binaries directly: before, 3
build -p emitcalls, all fromchildren (one from basic, two from artifact's two runs); after, 2, one
in each parent, and none from a child. The race itself did not show on
Linux in 40 runs of both suites at 16 threads; cargo's relink window
was hit on macOS.
Test-only, so no CHANGELOG entry.
Signed-off-by: Vyncint Ng 115854244+vyncint@users.noreply.github.com