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

Re: Q: do people compile with NO_FNMATCH on OpenBSD 5.2?

From
GTGreg Troxel <gdt@ir.bbn.com>
Date
Dec 18, 2012, 20:23 UTC
Message-ID
<rmisj732jop.fsf@fnord.ir.bbn.com>
In-Reply-To
<7va9tbf7vd.fsf@alter.siamese.dyndns.org>
Junio C Hamano <gitster@pobox.com> writes:
Show 5 quoted lines
> I seem to get a failure from
>
>     git ls-files "a*"
>
> in t/t0000-basic.sh if I link with platform's fnmatch().

Not what you asked, but on NetBSD 5.1, libc fnmatch is used, and with git 1.8.0.1 that test passes.

This prompted me to look at the rest of the tests. All tests pass (except for expected failures) until:

  *** t0070-fundamental.sh ***
  ok 1 - character classes (isspace, isalpha etc.)
  not ok - 2 mktemp to nonexistent directory prints filename
  #
  #               test_must_fail test-mktemp doesnotexist/testXXXXXX 2>err &&
  #               grep "doesnotexist/test" err
  #
  ok 3 - mktemp to unwritable directory prints filename
  ok 4 - check for a bug in the regex routines
  # failed 1 among 4 test(s)
  1..4
Running this by hand, I get:

gdt 51 /usr/pkgsrc/devel/scmgit-base/work/git-1.8.0.1/t > ../test-mktemp foo/barXXXXXX > MKTEMP.stdout 2> MKTEMP.stderr; ls -l MKTEMP* -rw-r--r-- 1 gdt wheel 121 Dec 18 15:14 MKTEMP.stderr -rw-r--r-- 1 gdt wheel 0 Dec 18 15:14 MKTEMP.stdout gdt 52 /usr/pkgsrc/devel/scmgit-base/work/git-1.8.0.1/t > cat MKTEMP.stderr fatal: Unable to create temporary file '/usr/pkgsrc/devel/scmgit-base/work/git-1.8.0.1/t/foo': No such file or directory

It seems ENOENT is correct for the directory not existing. I think the test is complaining that the failed call to mkstemp modified the argument.

Looking at:
 
  http://pubs.opengroup.org/onlinepubs/9699919799/functions/mkstemp.html

I can't see that it requires anything in particular for the in/out paramater when there is an error.

Previous: Junio C HamanoNext: Junio C Hamano
Message 2 of 4 in “Q: do people compile with NO_FNMATCH on OpenBSD 5.2?”
  1. Junio C HamanoDec 18, 2012
  2. Greg TroxelDec 18, 2012
  3. Junio C HamanoDec 18, 2012
  4. Greg TroxelDec 20, 2012

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.