Skip to content

test(fsevent): add regression test for rewatching the same path - #111

Closed
shulaoda wants to merge 1 commit into
mainfrom
port-upstream-fixes
Closed

test(fsevent): add regression test for rewatching the same path#111
shulaoda wants to merge 1 commit into
mainfrom
port-upstream-fixes

Conversation

@shulaoda

Copy link
Copy Markdown
Member

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).

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.
@shulaoda shulaoda closed this Aug 12, 2026
@shulaoda
shulaoda deleted the port-upstream-fixes branch August 12, 2026 12:03
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