test(fsevent): add regression test for rewatching the same path - #111
Closed
shulaoda wants to merge 1 commit into
Closed
test(fsevent): add regression test for rewatching the same path#111shulaoda wants to merge 1 commit into
shulaoda wants to merge 1 commit into
Conversation
Upstream notify-rs#906 fixed duplicate CFArray entries (fsevent) and leaked watch handles (windows) when calling watch() again on an already watched path. The fork's rewritten backends are not affected, since watches are kept in maps and OS-level state is rebuilt from them. Add a regression test to keep it that way.
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.
Fork-side counterpart of upstream notify-rs#906 (
fix: replace watcher when rewatching).The two resource bugs fixed upstream (duplicate CFArray entries in the fsevent backend, leaked watch handles on Windows) do not exist in this fork: watches are kept in maps and OS-level state is rebuilt from them (
ConsolidatingPathTrie/rebuild_watch_handles). Upstream's new replace semantics were intentionally not adopted, keeping the fork's upgrade-only semantics.This PR only adds a regression test asserting that rewatching the same path does not duplicate watch state in the fsevent backend.
Tested with
cargo test -p rolldown-notify --lib(86 passed).