Skip to content

test(fsevents): finish after restoring the working directory - #281

Closed
anmonteiro wants to merge 1 commit into
draft/fsevents-split-basefrom
draft/fsevents-cleanup-order
Closed

anmonteiro wants to merge 1 commit into
draft/fsevents-split-basefrom
draft/fsevents-cleanup-order

Conversation

@anmonteiro

@anmonteiro anmonteiro commented Nov 28, 2026 •

Copy link
Copy Markdown
Owner

Normal completion currently calls finish from inside Exn.protect, before its cleanup restores the process working directory and deletes the temporary directory. The next test can start while the previous test is still changing that shared state. Move completion after cleanup.

A temporary experiment in the combined branch added a 0.05s delay immediately before restoring the directory. The old ordering produced missing output and Sys_error for a deleted previous directory; the new ordering passed with the same delay. The delay is not committed here.

This is an independent harness race, consistent with the earlier work to wait for test threads. It does not establish the cause of the 2022 CI failures. It fixes normal completion only: the timeout path can still release the runner while the worker is alive.

Merged upstream as ocaml#17310; closing this corresponding fork draft. Extracted from ocaml#17301. It needs none of the event normalization or longer waits proposed in the other drafts; CI enablement remains separate in #289.

@check @fmt pass. The CI=true full check still skips the raw suite on this draft and has the baseline failures recorded in ocaml#17301.

01a20619-183b-76f3-b8a7-18c1b28eb1c0

anmonteiro added a commit to ocaml/dune that referenced this pull request Nov 29, 2026
Signal normal FSEvents test completion after restoring the process
working directory and removing the temporary directory. Previously,
`finish` ran inside `Exn.protect`, allowing the next test to start
before the previous test's cleanup changed the shared working directory.

A temporary experiment in the combined #17301 branch inserted a 0.05s
delay before restoring the directory. The old ordering produced missing
output and errors for a deleted previous directory; moving completion
after cleanup passed with the same delay. The delay is not committed
here.

Standalone extraction from #17301 and anmonteiro#281. It preserves
event expectations and the existing CI gate. This fixes normal
completion; timeout cleanup remains a separate issue, and this
reproduction does not establish the cause of the historical CI
disablement.

`@check @fmt` pass. The full local `CI=true` check retains three
failures reproduced on the unchanged base (listed in #17301), while the
raw suite remains disabled by its existing gate. The timing experiment
above used the combined branch.

01a20619-183b-76f3-b8a7-18c1b28eb1c0

Signed-off-by: Antonio Nuno Monteiro <[email protected]>
@anmonteiro anmonteiro closed this Nov 29, 2026
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.

1 participant