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

Re: [RFC PATCH] config.mak.uname: add HAVE_DEV_TTY to cygwin config section

From
Jeff King <peff@peff.net>
Date
Sep 5, 2024, 10:43 UTC
Message-ID
<20240905104331.GD2556395@coredump.intra.peff.net>
In-Reply-To
<a59f53af-58f7-42f5-aefb-50a4d9f344c4@ramsayjones.plus.com>
On Mon, Sep 02, 2024 at 11:15:35PM +0100, Ramsay Jones wrote:
> Still, I need to do a full test suite run, just to check for any regressions.
> (Unfortunately, that takes about 6 hours to run, so I can't get to that soon).

I'm not sure if we cover this at all in the test suite, since it implies access to an actual terminal. All of the auth tests rely on the askpass interface to simulate the user typing a password.

We do have test_terminal, which simulates a pty, but I don't think it would work for this case. For one thing, I don't know that it counts as the controlling terminal, so opening /dev/tty wouldn't find it. And two, the stdin handling had race problems that caused us to remove it recently. So it's really only good for checking isatty() for stdout/stderr.

On the plus side, if it works for you in a single manual test then I suspect that's enough. The key thing is really "can we get something tty-ish that responds to termios", and it sounds like you can.

Certainly doesn't hurt to test the single-key mode of "add -p", etc, though.

> Anyhow, just a quick heads up.
Thanks for looking into it. :)
-Peff
Previous: Ramsay JonesNext: Ramsay Jones
Message 2 of 5 in “config.mak.uname: add HAVE_DEV_TTY to cygwin config section”
  1. config.mak.uname: add HAVE_DEV_TTY to cygwin config sectionRamsay Jones, Sep 2, 2024
  2. Jeff KingSep 5, 2024
  3. Ramsay JonesSep 6, 2024
  4. Jeff KingSep 7, 2024
  5. Ramsay JonesSep 7, 2024

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.