| 3846 | } unwatch_snapshot_ctx_t; |
| 3847 | |
| 3848 | static int unwatch_snapshot_callback(const char *name, const char *path, void *ud) { |
| 3849 | (void)name; |
| 3850 | (void)path; |
| 3851 | unwatch_snapshot_ctx_t *ctx = ud; |
| 3852 | ctx->calls++; |
| 3853 | if (ctx->calls == 1) { |
| 3854 | /* Both states are already present in poll_once's pointer snapshot. |
| 3855 | * Removing them must invalidate the not-yet-admitted callback. */ |
| 3856 | cbm_watcher_unwatch(ctx->watcher, ctx->first_project); |
| 3857 | cbm_watcher_unwatch(ctx->watcher, ctx->second_project); |
| 3858 | } |
| 3859 | return 0; |
| 3860 | } |
| 3861 | |
| 3862 | TEST(watcher_unwatch_invalidates_remaining_poll_snapshot) { |
| 3863 | char first[256]; |
nothing calls this directly
no test coverage detected