git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Jeff King <peff@peff.net>
To: Jonathan Primrose <jprimros@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: FREAD_READS_DIRECTORIES test fails for the wrong reasons
Date: Fri, 6 Apr 2018 15:33:01 -0400	[thread overview]
Message-ID: <20180406193301.GA11450@sigill.intra.peff.net> (raw)
In-Reply-To: <82c91eac-9dc4-834b-4648-3c4ba45af80d@gmail.com>

On Fri, Apr 06, 2018 at 02:06:50PM -0400, Jonathan Primrose wrote:

> 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

  reply	other threads:[~2018-04-06 19:33 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-06 18:06 FREAD_READS_DIRECTORIES test fails for the wrong reasons Jonathan Primrose
2018-04-06 19:33 ` Jeff King [this message]
2018-04-06 21:57   ` Jonathan Primrose
2018-04-06 22:07     ` Jeff King

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180406193301.GA11450@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=jprimros@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).