All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
To: Git ML <git@vger.kernel.org>
Cc: Eric DeCosta <edecosta@mathworks.com>,
	Jeff Hostetler <jeffhost@microsoft.com>
Subject: fsmonitor: t7527 racy on OSX?
Date: Mon, 21 Nov 2022 14:07:13 +0100	[thread overview]
Message-ID: <221121.86y1s4bfp6.gmgdl@evledraar.gmail.com> (raw)

I have access to a Mac OS X M1 box (gcc104 at [1]) where t7527 reliably
fails due to what seems to be a race us doing something, and assuming
that fsmonitor picked up on it.

This makes the tests pass:
	
	diff --git a/t/t7527-builtin-fsmonitor.sh b/t/t7527-builtin-fsmonitor.sh
	index 56c0dfffea..ce2555d558 100755
	--- a/t/t7527-builtin-fsmonitor.sh
	+++ b/t/t7527-builtin-fsmonitor.sh
	@@ -428,6 +428,7 @@ test_expect_success 'edit some files' '
	 	start_daemon --tf "$PWD/.git/trace" &&
	 
	 	edit_files &&
	+	sleep 1 &&
	 
	 	test-tool fsmonitor-client query --token 0 &&
	 
	@@ -443,6 +444,7 @@ test_expect_success 'create some files' '
	 	start_daemon --tf "$PWD/.git/trace" &&
	 
	 	create_files &&
	+	sleep 1 &&
	 
	 	test-tool fsmonitor-client query --token 0 &&
	 
	@@ -471,6 +473,7 @@ test_expect_success 'rename some files' '
	 	start_daemon --tf "$PWD/.git/trace" &&
	 
	 	rename_files &&
	+	sleep 1 &&
	 
	 	test-tool fsmonitor-client query --token 0 &&
	 
	@@ -978,6 +981,7 @@ test_expect_success !UNICODE_COMPOSITION_SENSITIVE 'Unicode nfc/nfd' '
	 	mkdir test_unicode/nfd/d_${utf8_nfd} &&
	 
	 	git -C test_unicode fsmonitor--daemon stop &&
	+	sleep 1 &&
	 
	 	if test_have_prereq UNICODE_NFC_PRESERVED
	 	then

The failure is when we grep out the events we expect, which aren't
there, but if you manually inspect them they're there. I.e. they're just
not "in" yet.

I thought this might be a lack of flushing or syncing in our own trace
code, but adding an fsync() to trace_write() didn't do the trick.

1. https://cfarm.tetaneutral.net/news/41#

             reply	other threads:[~2022-11-21 13:28 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-21 13:07 Ævar Arnfjörð Bjarmason [this message]
2022-11-21 13:38 ` fsmonitor: t7527 racy on OSX? Đoàn Trần Công Danh
2022-11-22 17:04   ` Eric DeCosta
2022-11-22 20:50     ` Eric DeCosta
2022-11-22 22:12     ` Ævar Arnfjörð Bjarmason
2022-11-30 23:18       ` Jeff Hostetler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=221121.86y1s4bfp6.gmgdl@evledraar.gmail.com \
    --to=avarab@gmail.com \
    --cc=edecosta@mathworks.com \
    --cc=git@vger.kernel.org \
    --cc=jeffhost@microsoft.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.