# TTY tests are unnecessarily suppressed under Mac OS

3 messages from 2014-11-12 to 2014-11-13. Participants: Michael Blume, Jeff King.
Thread: https://gitlist.dev/t/37945

## Michael Blume, 2014-11-12 22:25

Subject: TTY tests are unnecessarily suppressed under Mac OS
Message-ID: <CAO2U3QhB6rSfJn5ODE8-n2XWuBw8BePqDpQbNdx6LyWy=OFbcg@mail.gmail.com>
URL: https://gitlist.dev/e/CAO2U3QhB6rSfJn5ODE8-n2XWuBw8BePqDpQbNdx6LyWy%3DOFbcg%40mail.gmail.com

```
>From lib_terminal.sh:

# Reading from the pty master seems to get stuck _sometimes_
# on Mac OS X 10.5.0, using Perl 5.10.0 or 5.8.9.
#
# Reproduction recipe: run
#
# i=0
# while ./test-terminal.perl echo hi $i
# do
# : $((i = $i + 1))
# done
#
# After 2000 iterations or so it hangs.
# https://rt.cpan.org/Ticket/Display.html?id=65692
#
test "$(uname -s)" != Darwin &&

I tried the reproduction recipe on my mac and couldn't reproduce, so
it may make sense to take this switch out? In any case, I've set my
automated mac build to include TTY tests

```

## Jeff King, 2014-11-13 20:20

Subject: Re: TTY tests are unnecessarily suppressed under Mac OS
Message-ID: <20141113201959.GD3869@peff.net>
URL: https://gitlist.dev/e/20141113201959.GD3869%40peff.net
In-Reply-To: <CAO2U3QhB6rSfJn5ODE8-n2XWuBw8BePqDpQbNdx6LyWy=OFbcg@mail.gmail.com>

```
On Wed, Nov 12, 2014 at 02:25:52PM -0800, Michael Blume wrote:

> From lib_terminal.sh:
> 
> # Reading from the pty master seems to get stuck _sometimes_
> # on Mac OS X 10.5.0, using Perl 5.10.0 or 5.8.9.
> #
> # Reproduction recipe: run
> #
> # i=0
> # while ./test-terminal.perl echo hi $i
> # do
> # : $((i = $i + 1))
> # done
> #
> # After 2000 iterations or so it hangs.
> # https://rt.cpan.org/Ticket/Display.html?id=65692
> #
> test "$(uname -s)" != Darwin &&
> 
> I tried the reproduction recipe on my mac and couldn't reproduce, so
> it may make sense to take this switch out? In any case, I've set my
> automated mac build to include TTY tests

10.5.0 is pretty ancient at this point; I can well believe that the
upstream problem has been fixed. It would be nice if we knew in which
version it was fixed, though. Just dropping the restriction risks people
getting spurious failures if they are on an old enough version.

Do you want to roll a patch that checks $(uname) to see if we're on a
recent-enough version (where we can just be conservative, and assume
whatever version you have is the first one to fix it)?

-Peff

```

## Jeff King, 2014-11-13 21:10

Subject: Re: TTY tests are unnecessarily suppressed under Mac OS
Message-ID: <20141113211025.GA7402@peff.net>
URL: https://gitlist.dev/e/20141113211025.GA7402%40peff.net
In-Reply-To: <CAO2U3QjGKYLRNWOWeoxqc_kmsdvhB5yfeRwQPuxTtf8n0XjBGA@mail.gmail.com>

```
On Thu, Nov 13, 2014 at 09:06:51PM +0000, Michael Blume wrote:

> Can do =)
> 
> uname -r spits out "14.0.0". Is there anything in git's testing library for
> comparing version strings or should I roll my own?

No, there's nothing standard for comparing version numbers. Probably

    test "$(uname -r | cut -d. -f1") -ge 14

sufficient.

-Peff

```
