bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gnulib - test-getcwd failure on Mac OS X


From: Assaf Gordon
Subject: Re: gnulib - test-getcwd failure on Mac OS X
Date: Mon, 1 Dec 2014 13:49:35 -0500

Hello,

On Nov 30, 2014, at 6:09, Pádraig Brady <address@hidden> wrote:

> For context, gnulib-tests/test-getcwd.c is failing on Mac OS X with exit(7)...

I've tried forcing AT_FDCWD to zero in 'test-getcwd.c' on Mac-OS,
and it still fails with exit code 7, due to errno=2 (ENOENT).
So perhaps my initial guess about AT_FDCWD being the problem wasn't correct (at 
least it wasn't the only problem).

====
--- ../../gnulib/tests/test-getcwd.c    2014-12-01 13:34:24.000000000 -0500
+++ ./test-getcwd.c     2014-12-01 13:37:50.000000000 -0500
@@ -38,6 +38,9 @@
    trigger a bug in glibc's getcwd implementation before 2.4.90-10.  */
 #define TARGET_LEN (5 * 1024)
 
+#undef AT_FDCWD
+#define AT_FDCWD (0)
+
 #if defined HAVE_OPENAT || (defined GNULIB_OPENAT && defined HAVE_FDOPENDIR)
 # define HAVE_OPENAT_SUPPORT 1
 #else
@@ -204,6 +207,8 @@ test_long_name (void)
                 }
               if (AT_FDCWD || errno == ERANGE || errno == ENOENT)
                 {
+                  printf("errno=%i\n",errno);
+                  printf("AT_FDCWD=%i\n",AT_FDCWD);
                   fail = 7;
                   break;
                 }
====
$ ./test-getcwd ; echo $?
errno=2
AT_FDCWD=0
7
====

The system  is:
====
$ uname -a
Darwin x.local 13.4.0 Darwin Kernel Version 13.4.0: Sun Aug 17 19:50:11 PDT 
2014; root:xnu-2422.115.4~1/RELEASE_X86_64 x86_64 i386 MacBookAir6,1 Darwin
$ cc --version
Apple LLVM version 6.0 (clang-600.0.54) (based on LLVM 3.5svn)
Target: x86_64-apple-darwin13.4.0
Thread model: posix
====

I can try more things if you have suggestions.

Regards,
 - Assaf





reply via email to

[Prev in Thread] Current Thread [Next in Thread]