]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Merge branch 'pt/t7527-flake-workaround' into seen
authorJunio C Hamano <gitster@pobox.com>
Thu, 8 Jan 2026 07:41:17 +0000 (16:41 +0900)
committerJunio C Hamano <gitster@pobox.com>
Thu, 8 Jan 2026 07:41:17 +0000 (16:41 +0900)
Test fixup.

Comments?

* pt/t7527-flake-workaround:
  t7527: fix flaky fsmonitor event tests with retry logic

1  2 
t/t7527-builtin-fsmonitor.sh

index d2f1f1097e799c25458da78adf5692657318ab45,e7b40654694c9e1cf58f4db0cfbd04b4ad4f9c89..55a73b3e9337f01da4645be91ebe78105052863e
@@@ -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