From: Jeff King <peff@peff.net>
To: "Randall S. Becker" <rsbecker@nexbridge.com>
Cc: git@vger.kernel.org, 'Duy Nguyen' <pclouds@gmail.com>
Subject: Re: [Possible Breakage] t1308 - Bad return value from test-tool
Date: Sat, 9 Feb 2019 18:32:46 -0500 [thread overview]
Message-ID: <20190209233246.GB7135@sigill.intra.peff.net> (raw)
In-Reply-To: <000501d4c0a2$683b78f0$38b26ad0$@nexbridge.com>
On Sat, Feb 09, 2019 at 01:08:01PM -0500, Randall S. Becker wrote:
> > It sounds like you might need to set FREAD_READS_DIRECTORIES in your
> > config.mak.
>
> Setting FREAD_READS_DIRECTORIES = UnfortunatelyYes
Silly question, but you did rebuild after setting that, not just re-run
the tests, right?
> still results in
>
> Value not found for "foo.bar"
> test_expect_code: command exited with 1, we wanted 2 test-tool config configset_get_value foo.bar a-directory
> not ok 23 - proper error on directory "files"
> #
> # echo "Error (-1) reading configuration file a-directory." >expect &&
> # mkdir a-directory &&
> # test_expect_code 2 test-tool config configset_get_value foo.bar a-directory 2>output &&
> # grep "^warning:" output &&
> # grep "^Error" output >actual &&
> # test_cmp expect actual
> #
>
> I don't think that helped. While fopen can open a directory, fread
> does not return any data in this platform. readdir or nftw/ftw are
> pretty much the only options. However, the code still goes down the
> goto exit1 path in this situation.
Hrm. That's the exact case FREAD_READS_DIRECTORIES is supposed to help.
It does an fstat() after fopen()ing the file to see if it points to a
directory, and if so closes it immediately and returns EISDIR.
Can you confirm via debugger (or printf statements) that we make it into
git_fopen, and what the resulting st.st_mode we see looks like?
-Peff
next prev parent reply other threads:[~2019-02-09 23:32 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-08 21:42 [Possible Breakage] t1308 - Bad return value from test-tool Randall S. Becker
2019-02-09 4:24 ` Jeff King
2019-02-09 18:08 ` Randall S. Becker
2019-02-09 23:32 ` Jeff King [this message]
2019-02-10 0:15 ` Randall S. Becker
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=20190209233246.GB7135@sigill.intra.peff.net \
--to=peff@peff.net \
--cc=git@vger.kernel.org \
--cc=pclouds@gmail.com \
--cc=rsbecker@nexbridge.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).