about summary refs log tree commit diff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2000-09-07 17:04:27 +0000
committerUlrich Drepper <drepper@redhat.com>2000-09-07 17:04:27 +0000
commitea639044648eae3cdcaebdfc448357cd114511f4 (patch)
treea8ba4120cd4123d05e6a812dae689271ad40a961
parent2f25732d5deb612a22420de73781cd0c756af75d (diff)
downloadglibc-ea639044648eae3cdcaebdfc448357cd114511f4.tar.gz
glibc-ea639044648eae3cdcaebdfc448357cd114511f4.tar.xz
glibc-ea639044648eae3cdcaebdfc448357cd114511f4.zip
Update.
2000-09-07  Ulrich Drepper  <drepper@redhat.com>

	* posix/tst-dir.c (main): Correct one bug (missing NULL test) and
	add one more test.
-rw-r--r--ChangeLog5
-rw-r--r--posix/tst-dir.c8
2 files changed, 12 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 261f2e58dd..c9f4bbc824 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2000-09-07  Ulrich Drepper  <drepper@redhat.com>
+
+	* posix/tst-dir.c (main): Correct one bug (missing NULL test) and
+	add one more test.
+
 2000-09-07  Andreas Jaeger  <aj@suse.de>
 
 	* sysdeps/unix/sysv/linux/mips/lockf64.c: New file.
diff --git a/posix/tst-dir.c b/posix/tst-dir.c
index c4372cdf57..4f55fcc90d 100644
--- a/posix/tst-dir.c
+++ b/posix/tst-dir.c
@@ -296,7 +296,7 @@ main (int argc, char *argv[])
 
   /* Try to find the new directory.  */
   rewinddir (dir1);
-  while (readdir64_r (dir1, &direntbuf, &d) == 0)
+  while (readdir64_r (dir1, &direntbuf, &d) == 0 && d != NULL)
     {
 #ifdef _DIRENT_HAVE_D_TYPE
       if (d->d_type != DT_UNKNOWN && d->d_type != DT_DIR)
@@ -430,6 +430,12 @@ main (int argc, char *argv[])
 	}
     }
 
+  if (stat64 ("does-not-exist", &st1) >= 0)
+    {
+      puts ("stat for unexisting file did not fail");
+      result = 1;
+    }
+
   /* Free all resources.  */
 
   if (closedir (dir1) < 0)