sys_select: don't depend on sys_socket
[gnulib.git] / tests / test-getcwd.c
index 0e0f90f..3381077 100644 (file)
@@ -26,6 +26,7 @@
 #include <string.h>
 #include <sys/stat.h>
 
+#include "pathmax.h"
 #include "macros.h"
 
 #if ! HAVE_GETPAGESIZE
@@ -55,7 +56,7 @@ test_abort_bug (void)
 
   cwd = getcwd (NULL, 0);
   if (cwd == NULL)
-    return 0;
+    return 2;
 
   initial_cwd_len = strlen (cwd);
   free (cwd);
@@ -82,11 +83,14 @@ test_abort_bug (void)
   while (0 < d--)
     {
       if (chdir ("..") < 0)
-        break;
+        {
+          fail = 5;
+          break;
+        }
       rmdir (dir_name);
     }
 
-  return 0;
+  return fail;
 }
 
 /* The length of this name must be 8.  */