Patrick Steinhardt <ps@xxxxxx> writes: > ... The problem is that we have a test that unexpectedly > passes on macOS: > > ▶ 868/1023 - git grep .fi a UNEXPECTEDPASS > > The test in question is this one: > > test_expect_failure !CYGWIN 'git grep .fi a' ' > git grep .fi a > ' > > The test passes if '.' matches a NUL byte, which we expect to only > happen on Cygwin. 064eed36c7f (config.mak.uname: only set NO_REGEX on > cygwin for v1.7, 2025-04-17) mentions that this behaviour was probably > imported from FreeBSD, which makes me wonder whether macOS eventually > also inherited the same code given its BSD lineage. Yup, I was wondering about the same thing. Thanks for confirming. It is unfortunate that we have blanket USES_BSD_REGEXP prerequisite ;-) > I think we probably want something like the below patch to fix this. We > could also have a prereq, but that prereq would look almost the exact > same as the test. It does make me question the value of the test itself > as the behaviour is completely platform specific. Curious. Don't we run the same set of tests on macOS without Meson? the exact same test must be passing unexpectedly. Why do we see the complaint on only osx-meson job without osx-{clang,reftable,gcc} jobs? > diff --git a/t/t7815-grep-binary.sh b/t/t7815-grep-binary.sh > index b7d83f9a5de..55d5e6de17c 100755 > --- a/t/t7815-grep-binary.sh > +++ b/t/t7815-grep-binary.sh > @@ -63,7 +63,7 @@ test_expect_success 'git grep ile a' ' > git grep ile a > ' > > -test_expect_failure !CYGWIN 'git grep .fi a' ' > +test_expect_failure !CYGWIN,!MACOS 'git grep .fi a' ' > git grep .fi a > ' > > diff --git a/t/test-lib.sh b/t/test-lib.sh > index 6ce8570226c..fef522327f2 100644 > --- a/t/test-lib.sh > +++ b/t/test-lib.sh > @@ -1636,6 +1636,9 @@ fi > # Fix some commands on Windows, and other OS-specific things > uname_s=$(uname -s) > case $uname_s in > +Darwin) > + test_set_prereq MACOS > + ;; > *MINGW*) > # Windows has its own (incompatible) sort and find > sort () {