{"thread":{"id":"54832","subject":"Perf lib sanity tests fail on OSX","startedAt":"2020-12-15T19:09:29Z","lastAt":"2020-12-22T05:24:32Z","messageCount":4,"participants":["Sangeeta","Philippe Blain","Eric Sunshine"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"412290","messageId":"CAHjREB6QrR-FQzwOphgw1z1Rba=o7gNvEwomHc60aNH3EkQg5A@mail.gmail.com","threadId":"54832","inReplyTo":null,"subject":"Perf lib sanity tests fail on OSX","fromName":"Sangeeta","fromEmail":"sangunb09@gmail.com","sentAt":"2020-12-15T19:08:12Z","receivedAt":"2020-12-15T19:09:29Z","isPatch":false,"sender":{"key":"sangunb09@gmail.com","avatar":"https://avatars.githubusercontent.com/u/64827599?v=4"},"body":"Hey everyone,\n\nThe performance test, p0000-perf-lib-sanity.sh[1], is failing on my\nlocal OSX machine due to an error in the test_export of the foo\nvariable. I think the test is failing because it is not able to export\nthe `foo` variable using `test_export`.\n[1] https://github.com/git/git/blob/master/t/perf/p0000-perf-lib-sanity.sh#L26\n\nThere is also a mail[2] from Lars mentioning this that dates back to\n2016. Is there someone else who has encountered this issue or knows\nhow to fix this?\n[2] https://public-inbox.org/git/9A11C3D1-3DAC-489F-BDF9-F4D409E8D3F7@gmail.com/\n\nThanks and Regards,\nSangeeta\n"},{"id":"412329","messageId":"fde32488-97e7-55f3-86d5-25f525492844@gmail.com","threadId":"54832","inReplyTo":"CAHjREB6QrR-FQzwOphgw1z1Rba=o7gNvEwomHc60aNH3EkQg5A@mail.gmail.com","subject":"Re: Perf lib sanity tests fail on OSX","fromName":"Philippe Blain","fromEmail":"levraiphilippeblain@gmail.com","sentAt":"2020-12-16T02:18:02Z","receivedAt":"2020-12-16T02:18:57Z","isPatch":false,"sender":{"key":"levraiphilippeblain@gmail.com","avatar":"https://avatars.githubusercontent.com/u/44212482?v=4"},"body":"Hi Sangeeta,\n\nLe 2020-12-15 à 14:08, Sangeeta a écrit :\n\n> Hey everyone,\n>\n> The performance test, p0000-perf-lib-sanity.sh[1], is failing on my\n> local OSX machine due to an error in the test_export of the foo\n> variable. I think the test is failing because it is not able to export\n> the `foo` variable using `test_export`.\n> [1] https://github.com/git/git/blob/master/t/perf/p0000-perf-lib-sanity.sh#L26\n\nIt is not the export per se that fails (that would be very bad news\nindeed), it is the shell magic in the 'test_run_perf_' function in\n'perf-lib.sh' that uses a non-portable sed(1) invocation:\n\n      set | sed -n \"s'\"/'/'\\\\\\\\''/g\"';s/^\\\\($test_export_\\\\)/export \n'\"'&'\"'/p\" >test_vars\n\nAs you might already know, since macOS has some BSD background/ancestry,\nmost POSIX utilities are closer to the OpenBSD/FreeBSD versions than to\ntheir GNU/Linux counterparts.\n\nI successfully ran p0000-perf-lib-sanity.sh on my Mac after installing \nthe GNU version of sed using Homebrew and making sure to follow the\nindications in the 'Caveats' so that the sed from Homebrew is first in\nPATH:\n\n      brew install gnu-sed\n\n      export PATH=\"/usr/local/opt/gnu-sed/libexec/gnubin:$PATH\"\n\n      ./p0000-perf-lib-sanity.sh\n\nI do not know sed syntax enough to fix the invocation to make it\nportable (nor do I know if it's possible).\n\nI've CC-ed Johannes and Lars since they were involved in the thread you \nmentioned.\n\n> Thanks and Regards,\n> Sangeeta\n\nCheers,\n\nPhilippe.\n\nP.S. my usual email setup is broken at the moment so I'm sorry if this \nemail is formatted wrong.\nP.P.S. and sorry for the re-send.\n\n"},{"id":"412341","messageId":"CAPig+cSh0L3RniJpEs3oddkzPGUyw5Ud39SAbYFoxwtBowLiaQ@mail.gmail.com","threadId":"54832","inReplyTo":"fde32488-97e7-55f3-86d5-25f525492844@gmail.com","subject":"Re: Perf lib sanity tests fail on OSX","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2020-12-16T07:44:31Z","receivedAt":"2020-12-16T07:45:26Z","isPatch":false,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"On Tue, Dec 15, 2020 at 9:19 PM Philippe Blain\n<levraiphilippeblain@gmail.com> wrote:\n> Le 2020-12-15 à 14:08, Sangeeta a écrit :\n> > The performance test, p0000-perf-lib-sanity.sh[1], is failing on my\n> > local OSX machine due to an error in the test_export of the foo\n> > variable. [...]\n>\n> It is not the export per se that fails (that would be very bad news\n> indeed), it is the shell magic in the 'test_run_perf_' function in\n> 'perf-lib.sh' that uses a non-portable sed(1) invocation:\n>\n> As you might already know, since macOS has some BSD background/ancestry,\n> most POSIX utilities are closer to the OpenBSD/FreeBSD versions than to\n> their GNU/Linux counterparts.\n>\n> I do not know sed syntax enough to fix the invocation to make it\n> portable (nor do I know if it's possible).\n\nA patch fixing the problem (correctly diagnosed by Philippe as\nnon-portable `sed` usage) has been posted[1].\n\n[1]: https://lore.kernel.org/git/20201216073907.62591-1-sunshine@sunshineco.com/\n"},{"id":"412842","messageId":"CAHjREB6y_zr-TrEsQu5MpwegpSHg_5XxWLf0O_HFRrSg+sFvQg@mail.gmail.com","threadId":"54832","inReplyTo":"CAPig+cSh0L3RniJpEs3oddkzPGUyw5Ud39SAbYFoxwtBowLiaQ@mail.gmail.com","subject":"Re: Perf lib sanity tests fail on OSX","fromName":"Sangeeta","fromEmail":"sangunb09@gmail.com","sentAt":"2020-12-22T05:23:23Z","receivedAt":"2020-12-22T05:24:32Z","isPatch":false,"sender":{"key":"sangunb09@gmail.com","avatar":"https://avatars.githubusercontent.com/u/64827599?v=4"},"body":"Hey Philippe and Eric,\n\nThanks for the workaround and the patch. The perf tests are now passing.\n\nThanks and regards,\nSangeeta\n\nOn Wed, Dec 16, 2020 at 1:14 PM Eric Sunshine <sunshine@sunshineco.com> wrote:\n>\n> On Tue, Dec 15, 2020 at 9:19 PM Philippe Blain\n> <levraiphilippeblain@gmail.com> wrote:\n> > Le 2020-12-15 à 14:08, Sangeeta a écrit :\n> > > The performance test, p0000-perf-lib-sanity.sh[1], is failing on my\n> > > local OSX machine due to an error in the test_export of the foo\n> > > variable. [...]\n> >\n> > It is not the export per se that fails (that would be very bad news\n> > indeed), it is the shell magic in the 'test_run_perf_' function in\n> > 'perf-lib.sh' that uses a non-portable sed(1) invocation:\n> >\n> > As you might already know, since macOS has some BSD background/ancestry,\n> > most POSIX utilities are closer to the OpenBSD/FreeBSD versions than to\n> > their GNU/Linux counterparts.\n> >\n> > I do not know sed syntax enough to fix the invocation to make it\n> > portable (nor do I know if it's possible).\n>\n> A patch fixing the problem (correctly diagnosed by Philippe as\n> non-portable `sed` usage) has been posted[1].\n>\n> [1]: https://lore.kernel.org/git/20201216073907.62591-1-sunshine@sunshineco.com/\n"}]}