git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* Perf lib sanity tests fail on OSX
@ 2020-12-15 19:08 Sangeeta
  2020-12-16  2:18 ` Philippe Blain
  0 siblings, 1 reply; 4+ messages in thread
From: Sangeeta @ 2020-12-15 19:08 UTC (permalink / raw)
  To: Git List; +Cc: Kaartic Sivaraam, Christian Couder

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

There is also a mail[2] from Lars mentioning this that dates back to
2016. Is there someone else who has encountered this issue or knows
how to fix this?
[2] https://public-inbox.org/git/9A11C3D1-3DAC-489F-BDF9-F4D409E8D3F7@gmail.com/

Thanks and Regards,
Sangeeta

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Perf lib sanity tests fail on OSX
  2020-12-15 19:08 Perf lib sanity tests fail on OSX Sangeeta
@ 2020-12-16  2:18 ` Philippe Blain
  2020-12-16  7:44   ` Eric Sunshine
  0 siblings, 1 reply; 4+ messages in thread
From: Philippe Blain @ 2020-12-16  2:18 UTC (permalink / raw)
  To: Sangeeta, Git List
  Cc: Kaartic Sivaraam, Christian Couder, Lars Schneider,
	Johannes Schindelin

Hi Sangeeta,

Le 2020-12-15 à 14:08, Sangeeta a écrit :

> 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.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Perf lib sanity tests fail on OSX
  2020-12-16  2:18 ` Philippe Blain
@ 2020-12-16  7:44   ` Eric Sunshine
  2020-12-22  5:23     ` Sangeeta
  0 siblings, 1 reply; 4+ messages in thread
From: Eric Sunshine @ 2020-12-16  7:44 UTC (permalink / raw)
  To: Philippe Blain
  Cc: Sangeeta, Git List, Kaartic Sivaraam, Christian Couder,
	Lars Schneider, Johannes Schindelin

On Tue, Dec 15, 2020 at 9:19 PM Philippe Blain
<levraiphilippeblain@gmail.com> wrote:
> Le 2020-12-15 à 14:08, Sangeeta a écrit :
> > 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. [...]
>
> 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:
>
> 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 do not know sed syntax enough to fix the invocation to make it
> portable (nor do I know if it's possible).

A patch fixing the problem (correctly diagnosed by Philippe as
non-portable `sed` usage) has been posted[1].

[1]: https://lore.kernel.org/git/20201216073907.62591-1-sunshine@sunshineco.com/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Perf lib sanity tests fail on OSX
  2020-12-16  7:44   ` Eric Sunshine
@ 2020-12-22  5:23     ` Sangeeta
  0 siblings, 0 replies; 4+ messages in thread
From: Sangeeta @ 2020-12-22  5:23 UTC (permalink / raw)
  To: Eric Sunshine
  Cc: Philippe Blain, Git List, Kaartic Sivaraam, Christian Couder,
	Lars Schneider, Johannes Schindelin

Hey Philippe and Eric,

Thanks for the workaround and the patch. The perf tests are now passing.

Thanks and regards,
Sangeeta

On Wed, Dec 16, 2020 at 1:14 PM Eric Sunshine <sunshine@sunshineco.com> wrote:
>
> On Tue, Dec 15, 2020 at 9:19 PM Philippe Blain
> <levraiphilippeblain@gmail.com> wrote:
> > Le 2020-12-15 à 14:08, Sangeeta a écrit :
> > > 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. [...]
> >
> > 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:
> >
> > 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 do not know sed syntax enough to fix the invocation to make it
> > portable (nor do I know if it's possible).
>
> A patch fixing the problem (correctly diagnosed by Philippe as
> non-portable `sed` usage) has been posted[1].
>
> [1]: https://lore.kernel.org/git/20201216073907.62591-1-sunshine@sunshineco.com/

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-12-22  5:25 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-15 19:08 Perf lib sanity tests fail on OSX Sangeeta
2020-12-16  2:18 ` Philippe Blain
2020-12-16  7:44   ` Eric Sunshine
2020-12-22  5:23     ` Sangeeta

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).