# Solaris 11.3 SPARC grep problem with t1450-fsck.sh

4 messages from 2017-06-27 to 2017-06-28. Participants: Michael Kebe, Junio C Hamano.
Thread: https://gitlist.dev/t/46267

## Michael Kebe, 2017-06-27 12:15

Subject: Solaris 11.3 SPARC grep problem with t1450-fsck.sh
Message-ID: <CAKKM46uJLu+w-UUFZc1HRar3apAD6Db2KD+GjiNL5v+Q2Ni7hA@mail.gmail.com>
URL: https://gitlist.dev/e/CAKKM46uJLu%2Bw-UUFZc1HRar3apAD6Db2KD%2BGjiNL5v%2BQ2Ni7hA%40mail.gmail.com

```
Running the test suite on Solaris 11.3 SPARC fails on a test in t1450-fsck.sh.

not ok 60 - fsck --name-objects
#
#               rm -rf name-objects &&
#               git init name-objects &&
#               (
#                       cd name-objects &&
#                       test_commit julius caesar.t &&
#                       test_commit augustus &&
#                       test_commit caesar &&
#                       remove_object $(git rev-parse julius:caesar.t) &&
#                       test_must_fail git fsck --name-objects >out &&
#                       tree=$(git rev-parse --verify julius:) &&
#                       grep "$tree (\(refs/heads/master\|HEAD\)@{[0-9]*}:" out
#               )

Solaris has /usr/bin/grep and /usr/bin/ggrep. grep is a solaris
version and ggrep is the GNU grep.

Replacing grep with ggrep in t1450-fsck.sh script the fixes the problem.

I chatted with Ævar and he thinks that the problem is that configure
finds the right grep but it is not properly passed to the tests.


Furthermore I discovered that some tests in t3900-i18n-commit.sh are failing.

e.g.: not ok 17 - ISO-2022-JP should be shown in UTF-8 now

But that's another topic, which I will open once this is fixed.

Greetings
Michael

```

## Junio C Hamano, 2017-06-27 16:25

Subject: Re: Solaris 11.3 SPARC grep problem with t1450-fsck.sh
Message-ID: <xmqqa84t2yaa.fsf@gitster.mtv.corp.google.com>
URL: https://gitlist.dev/e/xmqqa84t2yaa.fsf%40gitster.mtv.corp.google.com
In-Reply-To: <CAKKM46uJLu+w-UUFZc1HRar3apAD6Db2KD+GjiNL5v+Q2Ni7hA@mail.gmail.com>

```
Michael Kebe <michael.kebe@gmail.com> writes:

> Running the test suite on Solaris 11.3 SPARC fails on a test in t1450-fsck.sh.
>
> not ok 60 - fsck --name-objects
> #
> #               rm -rf name-objects &&
> #               git init name-objects &&
> #               (
> #                       cd name-objects &&
> #                       test_commit julius caesar.t &&
> #                       test_commit augustus &&
> #                       test_commit caesar &&
> #                       remove_object $(git rev-parse julius:caesar.t) &&
> #                       test_must_fail git fsck --name-objects >out &&
> #                       tree=$(git rev-parse --verify julius:) &&
> #                       grep "$tree (\(refs/heads/master\|HEAD\)@{[0-9]*}:" out
> #               )
>
> Solaris has /usr/bin/grep and /usr/bin/ggrep. grep is a solaris
> version and ggrep is the GNU grep.

We do not need GNUism, but many tools that come in /usr/bin have
been found unfit.  I thought that Solaris users were expected to set
SANE_TOOL_PATH to point at /usr/xpg[46]/bin to avoid this problem.

Ah, wait, that particular grep may have GNUism.  If you changed it
to

    egrep "$tree \((refs/heads/master|HEAD)@{[0-9]*}:" out

does it make it pass for you?

```

## Michael Kebe, 2017-06-28 06:00

Subject: Re: Solaris 11.3 SPARC grep problem with t1450-fsck.sh
Message-ID: <CAKKM46ureAZNB-YjOrmi+H-_tf3hXGS7dA7o=dj8bnHc+8ABng@mail.gmail.com>
URL: https://gitlist.dev/e/CAKKM46ureAZNB-YjOrmi%2BH-_tf3hXGS7dA7o%3Ddj8bnHc%2B8ABng%40mail.gmail.com
In-Reply-To: <xmqqa84t2yaa.fsf@gitster.mtv.corp.google.com>

```
2017-06-27 18:25 GMT+02:00 Junio C Hamano <gitster@pobox.com>:
> Ah, wait, that particular grep may have GNUism.  If you changed it
> to
>
>     egrep "$tree \((refs/heads/master|HEAD)@{[0-9]*}:" out
>
> does it make it pass for you?

Yes, this is working.

Greetings
Michael

```

## Junio C Hamano, 2017-06-28 17:15

Subject: Re: Solaris 11.3 SPARC grep problem with t1450-fsck.sh
Message-ID: <xmqqo9t8vxsm.fsf@gitster.mtv.corp.google.com>
URL: https://gitlist.dev/e/xmqqo9t8vxsm.fsf%40gitster.mtv.corp.google.com
In-Reply-To: <CAKKM46ureAZNB-YjOrmi+H-_tf3hXGS7dA7o=dj8bnHc+8ABng@mail.gmail.com>

```
Michael Kebe <michael.kebe@gmail.com> writes:

> 2017-06-27 18:25 GMT+02:00 Junio C Hamano <gitster@pobox.com>:
>> Ah, wait, that particular grep may have GNUism.  If you changed it
>> to
>>
>>     egrep "$tree \((refs/heads/master|HEAD)@{[0-9]*}:" out
>>
>> does it make it pass for you?
>
> Yes, this is working.

Thanks.

```
