From: Junio C Hamano Date: Thu, 8 Jan 2026 07:41:17 +0000 (+0900) Subject: Merge branch 'pt/t7527-flake-workaround' into seen X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cca5cdae1cf98e40c47658fb29b0f84768181031;p=thirdparty%2Fgit.git Merge branch 'pt/t7527-flake-workaround' into seen Test fixup. Comments? * pt/t7527-flake-workaround: t7527: fix flaky fsmonitor event tests with retry logic --- cca5cdae1cf98e40c47658fb29b0f84768181031 diff --cc t/t7527-builtin-fsmonitor.sh index d2f1f1097e,e7b4065469..55a73b3e93 --- a/t/t7527-builtin-fsmonitor.sh +++ b/t/t7527-builtin-fsmonitor.sh @@@ -515,33 -520,9 +520,31 @@@ test_expect_success 'directory changes directory_to_file && - test-tool fsmonitor-client query --token 0 && - - grep "^event: dir1$" .git/trace + retry_grep "^event: dir1$" .git/trace ' +test_expect_success 'rapid nested directory creation' ' + test_when_finished "git fsmonitor--daemon stop; rm -rf rapid" && + + start_daemon --tf "$PWD/.git/trace" && + + # Rapidly create nested directories to exercise race conditions + # where directory watches may be added concurrently during + # event processing and recursive scanning. + for i in $(test_seq 1 20) + do + mkdir -p "rapid/nested/dir$i/subdir/deep" || return 1 + done && + + # Give the daemon time to process all events + sleep 1 && + + test-tool fsmonitor-client query --token 0 && + + # Verify daemon is still running (did not crash) + git fsmonitor--daemon status +' + # The next few test cases exercise the token-resync code. When filesystem # drops events (because of filesystem velocity or because the daemon isn't # polling fast enough), we need to discard the cached data (relative to the