git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Perf lib sanity tests fail on OSX

From
Philippe Blain <levraiphilippeblain@gmail.com>
Date
Dec 16, 2020, 02:18 UTC
Message-ID
<fde32488-97e7-55f3-86d5-25f525492844@gmail.com>
In-Reply-To
<CAHjREB6QrR-FQzwOphgw1z1Rba=o7gNvEwomHc60aNH3EkQg5A@mail.gmail.com>
Hi Sangeeta,
Le 2020-12-15 à 14:08, Sangeeta a écrit :
Show 7 quoted lines
> Hey everyone,
>
> The performance test, p0000-perf-lib-sanity.sh[1], is failing on my
> local OSX machine due to an error in the test_export of the foo
> variable. I think the test is failing because it is not able to export
> the `foo` variable using `test_export`.
> [1] https://github.com/git/git/blob/master/t/perf/p0000-perf-lib-sanity.sh#L26

It is not the export per se that fails (that would be very bad news indeed), it is the shell magic in the 'test_run_perf_' function in 'perf-lib.sh' that uses a non-portable sed(1) invocation:

      set | sed -n "s'"/'/'\\\\''/g"';s/^\\($test_export_\\)/export 
'"'&'"'/p" >test_vars

As you might already know, since macOS has some BSD background/ancestry, most POSIX utilities are closer to the OpenBSD/FreeBSD versions than to their GNU/Linux counterparts.

I successfully ran p0000-perf-lib-sanity.sh on my Mac after installing the GNU version of sed using Homebrew and making sure to follow the indications in the 'Caveats' so that the sed from Homebrew is first in PATH:

      brew install gnu-sed
      export PATH="/usr/local/opt/gnu-sed/libexec/gnubin:$PATH"
      ./p0000-perf-lib-sanity.sh

I do not know sed syntax enough to fix the invocation to make it portable (nor do I know if it's possible).

I've CC-ed Johannes and Lars since they were involved in the thread you mentioned.

> Thanks and Regards,
> Sangeeta
Cheers,
Philippe.

P.S. my usual email setup is broken at the moment so I'm sorry if this email is formatted wrong. P.P.S. and sorry for the re-send.

Previous: SangeetaNext: Eric Sunshine
Message 2 of 4 in “Perf lib sanity tests fail on OSX”
  1. SangeetaDec 15, 2020
  2. Philippe BlainDec 16, 2020
  3. Eric SunshineDec 16, 2020
  4. SangeetaDec 22, 2020

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.