From: Jeff King <peff@peff.net>
To: "Øyvind A. Holm" <sunny@sunbase.org>,
"Jonathan Nieder" <jrnieder@gmail.com>,
"Git mailing list" <git@vger.kernel.org>,
"Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>,
"Junio C Hamano" <gitster@pobox.com>
Subject: Re: t1308-config-set.sh fails on current master
Date: Wed, 14 Jun 2017 01:15:44 -0400 [thread overview]
Message-ID: <20170614051544.cz2zvnkc4mlysz7h@sigill.intra.peff.net> (raw)
In-Reply-To: <20170614050215.c32crnjifah6cxae@sigill.intra.peff.net>
On Wed, Jun 14, 2017 at 01:02:15AM -0400, Jeff King wrote:
> On Wed, Jun 14, 2017 at 04:17:40AM +0200, Øyvind A. Holm wrote:
>
> > > Interesting. I'm not able to reproduce it, but of course that doesn't
> > > mean much.
> >
> > I'll admit that I have a somewhat special build system, but it's been
> > working great since I created it 7 months ago, and I run the test suite
> > every time I install a new git. I'm using the Makefile located at
> >
> > https://gitlab.com/sunny256/src-other/blob/master/devel/git/Makefile
> >
> > It's only doing regular stuff like "make configure", "./configure", etc,
> > but I'm mentioning it in case the Makefile reveals something
> > interesting. The git installation is in a non-standard location, the
> > newest version of git I've installed is for example located under
> > /usr/src-other/pool/git.master.v2.13.1-394-g41dd4330a121/ .
>
> I couldn't reproduce either with my usual build, but I don't usually use
> autoconf. Running:
>
> make configure
> ./configure
> make
> (cd t && ./t1308-*)
>
> does fail for me. The problem is that the generated config.mak.autogen
> sets the wrong value for FREAD_READS_DIRECTORIES (and overrides the
> default entry for Linux from config.mak.uname. So the configure script
> needs to be fixed.
Actually, I'm not sure if configure.ac is wrong, or the new uses of
FREAD_READS_DIRECTORIES. Because the test configure.ac actually checks:
FILE *f = fopen(".", "r");
return f && fread(&c, 1, 1, f);
I.e., it sees that not only do we fopen() a directory, but we actually
read garbage from it. Whereas on Linux, we fopen the file and then the
read gets EISDIR.
So it's not true that FREAD_READS_DIRECTORIES; this is more like
FOPEN_OPENS_DIRECTORIES.
Just looking at how the macro is used, I think we want to handle both
cases the same (by doing an fstat check after fopen). So I think it
would be OK to continue to use FREAD_READS_DIRECTORIES for both cases,
and just fix the configure script. It may be worth updating the macro
name for clarity, though.
-Peff
next prev parent reply other threads:[~2017-06-14 5:15 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-14 1:15 t1308-config-set.sh fails on current master Øyvind A. Holm
2017-06-14 1:25 ` Jonathan Nieder
2017-06-14 2:17 ` Øyvind A. Holm
2017-06-14 5:02 ` Jeff King
2017-06-14 5:15 ` Jeff King [this message]
2017-06-14 5:30 ` [PATCH] configure.ac: loosen FREAD_READS_DIRECTORIES test program Jeff King
2017-06-14 10:59 ` Øyvind A. Holm
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=20170614051544.cz2zvnkc4mlysz7h@sigill.intra.peff.net \
--to=peff@peff.net \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=jrnieder@gmail.com \
--cc=pclouds@gmail.com \
--cc=sunny@sunbase.org \
/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).