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

Re: FREAD_READS_DIRECTORIES test fails for the wrong reasons

From
Jeff King <peff@peff.net>
Date
Apr 6, 2018, 19:33 UTC
Message-ID
<20180406193301.GA11450@sigill.intra.peff.net>
In-Reply-To
<82c91eac-9dc4-834b-4648-3c4ba45af80d@gmail.com>
On Fri, Apr 06, 2018 at 02:06:50PM -0400, Jonathan Primrose wrote:
Show 9 quoted lines
> A while ago, the configure test for FREAD_READS_DIRECTORIES was changed
> to (attempt to) check for a NULL result from fopen. Unfortunately, the
> test will always fail - because it won't compile. The code snippet in
> configure.ac translates to:
> 
> return f);
> 
> Either there's an extra ) or a missing (. A cast to int wouldn't hurt
> either.

Oops. This is due to my 3adf9fdecf (configure.ac: loosen FREAD_READS_DIRECTORIES test program, 2017-06-14).

Neither I nor the original tester noticed, because we're on Linux, which needs that set.

> I'd supply a patch to fix this, but I'm not sure what the results of
> suddenly fixing the test would be. It seems to work well on my
> machine, but I don't stress git much here, and it's just one machine.

I think it should be fixed (and agreed on the "int" thing; the return value should be "f != NULL" or similar).

I don't know autoconf very well, but is there a way to invoke it that will let us know if a test-program fails to compile at all? Obviously for probing the system compler/includes, "does not compile" is an expected possible outcome. But for tests like this it's really a tristate: yes, no, or something went horribly wrong.

-Peff
Previous: Jonathan PrimroseNext: Jonathan Primrose
Message 2 of 4 in “FREAD_READS_DIRECTORIES test fails for the wrong reasons”
  1. Jonathan PrimroseApr 6, 2018
  2. Jeff KingApr 6, 2018
  3. Jonathan PrimroseApr 6, 2018
  4. Jeff KingApr 6, 2018

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.