about summary refs log tree commit diff
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2001-08-24 23:51:15 +0000
committerRoland McGrath <roland@gnu.org>2001-08-24 23:51:15 +0000
commitfb2c7eab2e3435e440d289fcbaf9fa0a2d45b12c (patch)
treee648dd2620ed5ce50a71ffe14c5987abfab1cd4a
parentf0b1a6c8762a6e2ec698fa7e253399b327047e34 (diff)
downloadglibc-fb2c7eab2e3435e440d289fcbaf9fa0a2d45b12c.tar.gz
glibc-fb2c7eab2e3435e440d289fcbaf9fa0a2d45b12c.tar.xz
glibc-fb2c7eab2e3435e440d289fcbaf9fa0a2d45b12c.zip
* string/tester.c (test_strerror): Don't use _sys_errlist/_sys_nerr.
	Just test that strerror returns non-null for a few errno codes.
-rw-r--r--ChangeLog5
-rw-r--r--string/tester.c7
2 files changed, 8 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 0d3dab8ea4..d61be87bbf 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2001-08-24  Roland McGrath  <roland@frob.com>
+
+	* string/tester.c (test_strerror): Don't use _sys_errlist/_sys_nerr.
+	Just test that strerror returns non-null for a few errno codes.
+
 2001-08-23  Roland McGrath  <roland@frob.com>
 
 	* hurd/Versions (libc: GLIBC_2.2.5): New set; add _hurd_raise_signal,
diff --git a/string/tester.c b/string/tester.c
index f44d27bbbb..bd2445f0d1 100644
--- a/string/tester.c
+++ b/string/tester.c
@@ -1272,11 +1272,10 @@ test_bcmp (void)
 static void
 test_strerror (void)
 {
-  int f;
   it = "strerror";
-  f = __open("/", O_WRONLY);	/* Should always fail. */
-  check(f < 0 && errno > 0 && errno < _sys_nerr, 1);
-  equal(strerror(errno), _sys_errlist[errno], 2);
+  check(strerror(EDOM) != 0, 1);
+  check(strerror(ERANGE) != 0, 2);
+  check(strerror(ENOENT) != 0, 3);
 }
 
 int