]> git.ipfire.org Git - thirdparty/git.git/commit
t7527: fix flaky fsmonitor event tests with retry logic
authorPaul Tarjan <github@paulisageek.com>
Thu, 1 Jan 2026 00:19:23 +0000 (00:19 +0000)
committerJunio C Hamano <gitster@pobox.com>
Thu, 1 Jan 2026 13:05:58 +0000 (22:05 +0900)
commitcd607431e155d5d1267604dfdb4a798093c3a6d8
treec5def99e2549d63d2f94b1c3fca734bcbc31bcb8
parent68cb7f9e92a5d8e9824f5b52ac3d0a9d8f653dbe
t7527: fix flaky fsmonitor event tests with retry logic

The fsmonitor event tests (edit, create, delete, rename, etc.) were
flaky because there can be a race between the daemon writing events
to the trace file and the test's grep commands checking for them.

Add a retry_grep() helper function (similar to retry_until_success
in lib-git-p4.sh) that retries grep with a timeout, and use it in
all event-checking tests to wait for one expected event before
checking the rest.

Signed-off-by: Paul Tarjan <github@paulisageek.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t7527-builtin-fsmonitor.sh