git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v4] Allow TTY tests to run under recent Mac OS

From
John Szakmeister <john@szakmeister.net>
Date
Nov 15, 2014, 00:14 UTC
Message-ID
<CAEBDL5XHdRA1eqgEqdMV-HMA006XGcPQ+BVQgkhzhaGLErGwgw@mail.gmail.com>
In-Reply-To
<20141114232106.GA6527@google.com>
On Fri, Nov 14, 2014 at 6:21 PM, Jonathan Nieder <jrnieder@gmail.com> wrote:
Show 33 quoted lines
> Hi,
>
> Mike Blume wrote:
>
>> TTY tests were previously skipped on all Mac OS systems because of a
>> bug where reading from pty master occasionally hung. This bug has since
>> been found not to be reproducible under Mac OS 10.9 and 10.10.1.
>>
>> Therefore, run TTY tests under Mac OS 10.9 (Mavericks) and higher.
>
> *puzzled* Testing on Yosemite with the following script[1]
>
>         perl -MIO::Pty -MFile::Copy -e '
>                for (my $i = 0;; $i++) {
>                        my $master = new IO::Pty;
>                        my $slave = $master->slave;
>                        if (fork == 0) {
>                                close $master or die "close: $!";
>                                open STDOUT, ">&", $slave or die "dup2: $!";
>                                close $slave or die "close: $!";
>                                exec("echo", "hi", $i) or die "exec: $!";
>                        }
>                        close $slave or die "close: $!";
>                        copy($master, \*STDOUT) or die "copy: $!";
>                        close $master or die "close: $!";
>                        wait;
>                }
>         '
>
> still seems to hang eventually (after 61 iterations when my officemate
> tried it), reproducing the bug.
>
> Do you get a different result?

Interesting. It took quite a while, but it did finally fail on my Mavericks box on the 115,140th iteration.

Show 5 quoted lines
> The bug was originally found in an autobuilder that would run the test
> suite when new versions were pushed to check for regressions.  Even if
> the hang only happened 0.1% of the time, that would get the
> autobuilder stuck after a while, which was how the problem got
> noticed.
Eek... that's nasty.
-John
Previous: Junio C Hamano
Message 5 of 5 in “Allow TTY tests to run under recent Mac OS”
  1. Allow TTY tests to run under recent Mac OSMike Blume, Nov 14, 2014
  2. Junio C HamanoNov 14, 2014
  3. Jonathan NiederNov 14, 2014
  4. Junio C HamanoNov 14, 2014
  5. John SzakmeisterNov 15, 2014

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.