Repository navigation
test(cram): demonstrate shared temporary directories - #16925
Merged
Merged
Conversation
Order a producer and consumer Cram test explicitly and run them with one job. The producer writes a marker into its TMPDIR; the consumer expects an isolated temporary directory but reads that same marker instead. Record the nested test failure to demonstrate the current bug without relying on parallel scheduling or timing. Signed-off-by: Rudi Grinberg <[email protected]>
rgrinberg
added a commit
that referenced
this pull request
Nov 12, 2026
Builds on the temporary-directory defaults and override matrix in #16982. Fix the shared `TMPDIR` behavior demonstrated in #16925 without adding shell exports. Initialize Dune's managed temporary directory when interpreting a build action, before action-level `setenv` nodes. Build-job process spawning preserves that final environment; internal jobs retain their separate Dune temporary directory. Directory `env-vars` behavior is unchanged. Cram keeps its scripts, captured output, and metadata in its own scratch directory and exposes an initially empty `tmp/` child to setup scripts and test commands. The paths are assigned at execution time, not embedded in generated shell commands or rule digests. Invalidate cached rules and Cram actions for the changed behavior. Update the preparatory matrix's expected values for regular-action `setenv` and Cram's private directory. Remove the older standalone override test, while retaining isolation, empty-directory, setup-script, and runner-file separation coverage. Signed-off-by: Rudi Grinberg <[email protected]>
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.
Add a deterministic reproduction of Cram tests sharing
TMPDIR: a producer writes a marker, then a separate consumer reads it through its own temporary directory instead of observing isolation.An explicit alias dependency orders the tests, and they run with
-j 1and caching disabled, so the reproduction does not depend on a scheduling race. The outer test records the consumer’s failing isolation expectation.This exposes the underlying collision behind the flaky counters in
watching/batch-mode.tandwatching/watch-mode.t.