threads / patch / 50925

patch, 2 partsPrepare our git-p4 tests for running on APFS

Subject: [PATCH 0/2] Prepare our git-p4 tests for running on APFS

## tl;dr

11 messages between Apr 12, 2019 and Apr 17, 2019. Diffs are folded; open one to read it.

replies: 10people: 3as markdown or json

Johannes Schindelin via GitGitGadget· Apr 12, 2019, 11:39 UTC · lore

Yesterday, the macOS agents of Azure Pipelines were upgraded to Mojave, and since that does not support HFS+ anymore, everything will be upgraded to APFS.

As I just found yesterday, we have one test that fails on that filesystem (t9822, which is only run if Perforce's p4d is available).

The first patch adds a workaround, as I failed to find any way to finagle APFS into accepting that ISO-8859-1 encoded file name.

The second patch is a fix to make things compile on Mojave again, apparently Homebrew changed and the /usr/local/ directories need to be added to the compiler and linker flags explicitly. Maybe this is a gcc-8 only thing, as it seems to have affected only the osx-gcc job, not the osx-clang job.

Johannes Schindelin (2):
  t9822: skip tests if file names cannot be ISO-8895-1 encoded
  macOS: make sure that gettext is found
 config.mak.uname                | 2 ++
 t/t9822-git-p4-path-encoding.sh | 7 +++++++
 2 files changed, 9 insertions(+)
base-commit: e35b8cb8e212e3557efc565157ceb5cbaaf0d87f
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-179%2Fdscho%2Fskip-t9822-on-apfs-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-179/dscho/skip-t9822-on-apfs-v1
Pull-Request: https://github.com/gitgitgadget/git/pull/179
-- 
gitgitgadget
Johannes Schindelin via GitGitGadget· Apr 12, 2019, 11:39 UTC · re: Johannes Schindelin via GitGitGadget · lore

[PATCH 2/2] macOS: make sure that gettext is found

From: Johannes Schindelin <johannes.schindelin@gmx.de>

Due to reasons (some XCode versions seem to include gettext, some don't?), Homebrew does not expose the libraries and headers in /usr/local/ by default anymore.

Let's help find them again.
Note: for some reason, this is a change of behavior caused by the
upgrade to Mojave, identified in our Azure Pipeline; it seems that
Homebrew used to add the /usr/local/ directories to the include and link
search path before, but now it no longer does.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
---
 config.mak.uname | 2 ++
 1 file changed, 2 insertions(+)
Show changes to config.mak.uname +2 −0
diff --git a/config.mak.uname b/config.mak.uname
index 41e85fab1c..3605fead53 100644
--- a/config.mak.uname
+++ b/config.mak.uname
@@ -114,6 +114,8 @@ ifeq ($(uname_S),Darwin)
 	HAVE_BSD_SYSCTL = YesPlease
 	FREAD_READS_DIRECTORIES = UnfortunatelyYes
 	HAVE_NS_GET_EXECUTABLE_PATH = YesPlease
+	BASIC_CFLAGS += -I/usr/local/include
+	BASIC_LDFLAGS += -L/usr/local/lib
 endif
 ifeq ($(uname_S),SunOS)
 	NEEDS_SOCKET = YesPlease
-- 
gitgitgadget
Johannes Schindelin via GitGitGadget· Apr 12, 2019, 11:39 UTC · re: Johannes Schindelin via GitGitGadget · lore

[PATCH 1/2] t9822: skip tests if file names cannot be ISO-8895-1 encoded

From: Johannes Schindelin <johannes.schindelin@gmx.de>
Most notably, it seems that macOS' APFS does not allow that.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
---
 t/t9822-git-p4-path-encoding.sh | 7 +++++++
 1 file changed, 7 insertions(+)
Show changes to t/t9822-git-p4-path-encoding.sh +7 −0
diff --git a/t/t9822-git-p4-path-encoding.sh b/t/t9822-git-p4-path-encoding.sh
index c78477c19b..de0b46581d 100755
--- a/t/t9822-git-p4-path-encoding.sh
+++ b/t/t9822-git-p4-path-encoding.sh
@@ -7,6 +7,13 @@ test_description='Clone repositories with non ASCII paths'
 UTF8_ESCAPED="a-\303\244_o-\303\266_u-\303\274.txt"
 ISO8859_ESCAPED="a-\344_o-\366_u-\374.txt"
 
+ISO8859="$(printf "$ISO8859_ESCAPED")" &&
+echo content123 >"$ISO8859" &&
+rm "$ISO8859" || {
+	skip_all="fs does not accept ISO-8859-1 filenames"
+	test_done
+}
+
 test_expect_success 'start p4d' '
 	start_p4d
 '
-- 
gitgitgadget
Luke Diamand· Apr 13, 2019, 07:39 UTC · re: Johannes Schindelin via GitGitGadget · lore

Re: [PATCH 1/2] t9822: skip tests if file names cannot be ISO-8895-1 encoded

On Fri, 12 Apr 2019 at 12:39, Johannes Schindelin via GitGitGadget <gitgitgadget@gmail.com> wrote:

>
> From: Johannes Schindelin <johannes.schindelin@gmx.de>
>
> Most notably, it seems that macOS' APFS does not allow that.
Did you mean in the subject "ISO-8895-1" encoded or "ISO-8859-1" encoded?
It seems reasonable other than that!
Show 27 quoted lines
>
> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
> ---
>  t/t9822-git-p4-path-encoding.sh | 7 +++++++
>  1 file changed, 7 insertions(+)
>
> diff --git a/t/t9822-git-p4-path-encoding.sh b/t/t9822-git-p4-path-encoding.sh
> index c78477c19b..de0b46581d 100755
> --- a/t/t9822-git-p4-path-encoding.sh
> +++ b/t/t9822-git-p4-path-encoding.sh
> @@ -7,6 +7,13 @@ test_description='Clone repositories with non ASCII paths'
>  UTF8_ESCAPED="a-\303\244_o-\303\266_u-\303\274.txt"
>  ISO8859_ESCAPED="a-\344_o-\366_u-\374.txt"
>
> +ISO8859="$(printf "$ISO8859_ESCAPED")" &&
> +echo content123 >"$ISO8859" &&
> +rm "$ISO8859" || {
> +       skip_all="fs does not accept ISO-8859-1 filenames"
> +       test_done
> +}
> +
>  test_expect_success 'start p4d' '
>         start_p4d
>  '
> --
> gitgitgadget
>
Johannes Schindelin· Apr 14, 2019, 19:38 UTC · re: Luke Diamand · lore

Re: [PATCH 1/2] t9822: skip tests if file names cannot be ISO-8895-1 encoded

Hi Luke,
On Sat, 13 Apr 2019, Luke Diamand wrote:
Show 8 quoted lines
> On Fri, 12 Apr 2019 at 12:39, Johannes Schindelin via GitGitGadget
> <gitgitgadget@gmail.com> wrote:
> >
> > From: Johannes Schindelin <johannes.schindelin@gmx.de>
> >
> > Most notably, it seems that macOS' APFS does not allow that.
>
> Did you mean in the subject "ISO-8895-1" encoded or "ISO-8859-1" encoded?
D'oh... Fixed in v2!
> It seems reasonable other than that!

Thanks, Dscho

Johannes Schindelin via GitGitGadget· Apr 14, 2019, 21:19 UTC · re: Johannes Schindelin via GitGitGadget · lore

[PATCH v2 0/2] Prepare our git-p4 tests for running on APFS

Yesterday, the macOS agents of Azure Pipelines were upgraded to Mojave, and since that does not support HFS+ anymore, everything will be upgraded to APFS.

As I just found yesterday, we have one test that fails on that filesystem (t9822, which is only run if Perforce's p4d is available).

The first patch adds a workaround, as I failed to find any way to finagle APFS into accepting that ISO-8859-1 encoded file name.

The second patch is a fix to make things compile on Mojave again, apparently Homebrew changed and the /usr/local/ directories need to be added to the compiler and linker flags explicitly. Maybe this is a gcc-8 only thing, as it seems to have affected only the osx-gcc job, not the osx-clang job.

Changes since v1:
 * Fix the tyop in the oneline of the first patch where it should talk about
   ISO-8859-1.
Johannes Schindelin (2):
  t9822: skip tests if file names cannot be ISO-8859-1 encoded
  macOS: make sure that gettext is found
 config.mak.uname                | 2 ++
 t/t9822-git-p4-path-encoding.sh | 7 +++++++
 2 files changed, 9 insertions(+)
base-commit: e35b8cb8e212e3557efc565157ceb5cbaaf0d87f
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-179%2Fdscho%2Fskip-t9822-on-apfs-v2
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-179/dscho/skip-t9822-on-apfs-v2
Pull-Request: https://github.com/gitgitgadget/git/pull/179
Range-diff vs v1:
 1:  52681aee0a ! 1:  6161c76702 t9822: skip tests if file names cannot be ISO-8895-1 encoded
     @@ -1,6 +1,6 @@
      Author: Johannes Schindelin <johannes.schindelin@gmx.de>
      
     -    t9822: skip tests if file names cannot be ISO-8895-1 encoded
     +    t9822: skip tests if file names cannot be ISO-8859-1 encoded
      
          Most notably, it seems that macOS' APFS does not allow that.
      
 2:  f006524f78 = 2:  25be67b1b7 macOS: make sure that gettext is found
-- 
gitgitgadget
Johannes Schindelin via GitGitGadget· Apr 14, 2019, 21:19 UTC · re: Johannes Schindelin via GitGitGadget · lore

[PATCH v2 1/2] t9822: skip tests if file names cannot be ISO-8859-1 encoded

From: Johannes Schindelin <johannes.schindelin@gmx.de>
Most notably, it seems that macOS' APFS does not allow that.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
---
 t/t9822-git-p4-path-encoding.sh | 7 +++++++
 1 file changed, 7 insertions(+)
Show changes to t/t9822-git-p4-path-encoding.sh +7 −0
diff --git a/t/t9822-git-p4-path-encoding.sh b/t/t9822-git-p4-path-encoding.sh
index c78477c19b..de0b46581d 100755
--- a/t/t9822-git-p4-path-encoding.sh
+++ b/t/t9822-git-p4-path-encoding.sh
@@ -7,6 +7,13 @@ test_description='Clone repositories with non ASCII paths'
 UTF8_ESCAPED="a-\303\244_o-\303\266_u-\303\274.txt"
 ISO8859_ESCAPED="a-\344_o-\366_u-\374.txt"
 
+ISO8859="$(printf "$ISO8859_ESCAPED")" &&
+echo content123 >"$ISO8859" &&
+rm "$ISO8859" || {
+	skip_all="fs does not accept ISO-8859-1 filenames"
+	test_done
+}
+
 test_expect_success 'start p4d' '
 	start_p4d
 '
-- 
gitgitgadget
Johannes Schindelin· Apr 15, 2019, 12:37 UTC · re: Johannes Schindelin via GitGitGadget · lore

Re: [PATCH v2 1/2] t9822: skip tests if file names cannot be ISO-8859-1 encoded

Hi Junio,
On Sun, 14 Apr 2019, Johannes Schindelin via GitGitGadget wrote:
Show 5 quoted lines
> From: Johannes Schindelin <johannes.schindelin@gmx.de>
>
> Most notably, it seems that macOS' APFS does not allow that.
>
> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>

This is actually a quite important fix, really, as it makes *every* CI build fail in the macOS part, meaning that I am swamped with false positives until this is fixed.

It seems not to have made it into the js/macos-gettext-build branch, though. Would you terribly mind picking it up, please?

Thanks, Dscho

Junio C Hamano· Apr 15, 2019, 12:53 UTC · re: Johannes Schindelin · lore

Re: [PATCH v2 1/2] t9822: skip tests if file names cannot be ISO-8859-1 encoded

On Mon, Apr 15, 2019 at 9:37 PM Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:

>
> It seems not to have made it into the js/macos-gettext-build branch,
> though. Would you terribly mind picking it up, please?

I think they are separately queued, so that they can graduate in any order, even if/when one of them turns out to need rerolling.

Johannes Schindelin· Apr 17, 2019, 11:48 UTC · re: Junio C Hamano · lore

Re: [PATCH v2 1/2] t9822: skip tests if file names cannot be ISO-8859-1 encoded

Hi Junio,
On Mon, 15 Apr 2019, Junio C Hamano wrote:
Show 8 quoted lines
> On Mon, Apr 15, 2019 at 9:37 PM Johannes Schindelin
> <Johannes.Schindelin@gmx.de> wrote:
> >
> > It seems not to have made it into the js/macos-gettext-build branch,
> > though. Would you terribly mind picking it up, please?
>
> I think they are separately queued, so that they can graduate in any order,
> even if/when one of them turns out to need rerolling.
Okay.

Please note, though, that I had packaged them together because they *both* need to advance to any branch in order to make it pass on Azure Pipelines again. (And to be sure, they both fix real bugs in Git, they are not mere workarounds necessary to make the CI builds "green" again.)

Ciao, Dscho

Johannes Schindelin via GitGitGadget· Apr 14, 2019, 21:19 UTC · re: Johannes Schindelin via GitGitGadget · lore

[PATCH v2 2/2] macOS: make sure that gettext is found

From: Johannes Schindelin <johannes.schindelin@gmx.de>

Due to reasons (some XCode versions seem to include gettext, some don't?), Homebrew does not expose the libraries and headers in /usr/local/ by default anymore.

Let's help find them again.
Note: for some reason, this is a change of behavior caused by the
upgrade to Mojave, identified in our Azure Pipeline; it seems that
Homebrew used to add the /usr/local/ directories to the include and link
search path before, but now it no longer does.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
---
 config.mak.uname | 2 ++
 1 file changed, 2 insertions(+)
Show changes to config.mak.uname +2 −0
diff --git a/config.mak.uname b/config.mak.uname
index 41e85fab1c..3605fead53 100644
--- a/config.mak.uname
+++ b/config.mak.uname
@@ -114,6 +114,8 @@ ifeq ($(uname_S),Darwin)
 	HAVE_BSD_SYSCTL = YesPlease
 	FREAD_READS_DIRECTORIES = UnfortunatelyYes
 	HAVE_NS_GET_EXECUTABLE_PATH = YesPlease
+	BASIC_CFLAGS += -I/usr/local/include
+	BASIC_LDFLAGS += -L/usr/local/lib
 endif
 ifeq ($(uname_S),SunOS)
 	NEEDS_SOCKET = YesPlease
-- 
gitgitgadget

← back to recent threads