diff mbox series

Fix for failing tests on Solaris

Message ID 20220429062337.bcpjizaujjmw65dt@virtual.cz.oracle.com (mailing list archive)
State New, archived
Headers show
Series Fix for failing tests on Solaris | expand

Commit Message

Vladimir Marek April 29, 2022, 6:23 a.m. UTC
Hello,

Sorry if this is not the best way to report issues.

Solaris ships git[1]. We run it's test suite and we were having multiple
failures[2]. I noticed that the tests do expect binaries to be found
in [3]:

SANE_TOOL_PATH = /usr/xpg6/bin:/usr/xpg4/bin

That paths contain posix conformant binaries, but the tests do expect
Linux-like behaving binaries.

The patch I am about to apply to git


Makes all tests but t7812 pass successfully. t7812 fails on locales and
utf-8 which do behave differently in Solaris.

I would suggest to update the tests to use /usr/gnu/bin path.

[1] https://github.com/oracle/solaris-userland/tree/master/components/git
[2] https://github.com/oracle/solaris-userland/tree/master/components/git/test
[3] https://github.com/git/git/blob/master/config.mak.uname#L176

Thank you

Comments

Carlo Marcelo Arenas Belón April 29, 2022, 4:09 p.m. UTC | #1
On Fri, Apr 29, 2022 at 08:23:37AM +0200, Vladimir Marek wrote:
> 
> That paths contain posix conformant binaries, but the tests do expect
> Linux-like behaving binaries.

Expecting Linux-like behaviour is indeed not what the tests should be
doing, so correcting that might ALSO help other people that don't have
an alternative GNU implementation available IMHO

So detailing those failures and fixing them might be preferable (even if
likely more difficult)

> --- git-2.35.1/config.mak.uname
> +++ git-2.35.1/config.mak.uname
> @@ -162,7 +162,7 @@ ifeq ($(uname_S),SunOS)
>         NEEDS_SOCKET = YesPlease
>         NEEDS_NSL = YesPlease
>         SHELL_PATH = /bin/bash
> -       SANE_TOOL_PATH = /usr/xpg6/bin:/usr/xpg4/bin
> +       SANE_TOOL_PATH = /usr/gnu/bin

I haven't used Solaris for a while (since around OpenSolaris Indiana
development stopped), but wouldn't this break in Solaris 10 and older?

> Makes all tests but t7812 pass successfully. t7812 fails on locales and
> utf-8 which do behave differently in Solaris.

And additional fix for that (since you seem to have access to a fresh
Solaris 11.4 installation at least), would be forthcomming.

Wondering also if there is a way to plug one of those from Oracle Cloud
through a GitHub actions so we could prevent future issues by including
Solaris in our CI runs.

Carlo
Junio C Hamano April 29, 2022, 4:48 p.m. UTC | #2
Carlo Marcelo Arenas Belón <carenas@gmail.com> writes:

>> --- git-2.35.1/config.mak.uname
>> +++ git-2.35.1/config.mak.uname
>> @@ -162,7 +162,7 @@ ifeq ($(uname_S),SunOS)
>>         NEEDS_SOCKET = YesPlease
>>         NEEDS_NSL = YesPlease
>>         SHELL_PATH = /bin/bash
>> -       SANE_TOOL_PATH = /usr/xpg6/bin:/usr/xpg4/bin
>> +       SANE_TOOL_PATH = /usr/gnu/bin
>
> I haven't used Solaris for a while (since around OpenSolaris Indiana
> development stopped), but wouldn't this break in Solaris 10 and older?
>
>> Makes all tests but t7812 pass successfully. t7812 fails on locales and
>> utf-8 which do behave differently in Solaris.
>
> And additional fix for that (since you seem to have access to a fresh
> Solaris 11.4 installation at least), would be forthcomming.
>
> Wondering also if there is a way to plug one of those from Oracle Cloud
> through a GitHub actions so we could prevent future issues by including
> Solaris in our CI runs.

I do not think we want to take this patch until we know how exactly
the tests failing for Vladimir fail without GNUism, which we do not
want to rely on.  If a test by mistake used "sed -i -e '<script>'"
GNUism which /usr/xpg[46]/bin/sed does not support, for example, we
want to know about it, so that we can move away from such a use of
GNUism.

Thanks.
diff mbox series

Patch

--- git-2.35.1/config.mak.uname
+++ git-2.35.1/config.mak.uname
@@ -162,7 +162,7 @@  ifeq ($(uname_S),SunOS)
        NEEDS_SOCKET = YesPlease
        NEEDS_NSL = YesPlease
        SHELL_PATH = /bin/bash
-       SANE_TOOL_PATH = /usr/xpg6/bin:/usr/xpg4/bin
+       SANE_TOOL_PATH = /usr/gnu/bin
        HAVE_ALLOCA_H = YesPlease
        NO_STRCASESTR = YesPlease
        NO_MEMMEM = YesPlease