summary refs log tree commit diff
path: root/posix/tst-mmap.c
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2005-06-03 20:37:25 +0000
committerRoland McGrath <roland@gnu.org>2005-06-03 20:37:25 +0000
commit654fdda1e4300c6f82eff8ef0ed464c2356b9d04 (patch)
tree4516d63fc71210106a9ec68607c9f6614e1df450 /posix/tst-mmap.c
parent6b4b9713738727d176b7f14db20c19b16d66e459 (diff)
downloadglibc-654fdda1e4300c6f82eff8ef0ed464c2356b9d04.tar.gz
glibc-654fdda1e4300c6f82eff8ef0ed464c2356b9d04.tar.xz
glibc-654fdda1e4300c6f82eff8ef0ed464c2356b9d04.zip
[BZ #959]
2005-06-01  Roland McGrath  <roland@redhat.com>
	[BZ #959]
	* posix/tst-mmap.c (main): Fill the test file with enough data for the
	page size.
Diffstat (limited to 'posix/tst-mmap.c')
-rw-r--r--posix/tst-mmap.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/posix/tst-mmap.c b/posix/tst-mmap.c
index 355a784124..c03acf5e16 100644
--- a/posix/tst-mmap.c
+++ b/posix/tst-mmap.c
@@ -30,7 +30,7 @@ main (void)
   for (c = 0; c < sizeof (buf); ++c)
     buf[c] = '0' + (c % 10);
 
-  for (c = 0; c < 20; ++c)
+  for (c = 0; c < (ps * 4) / sizeof (buf); ++c)
     if (fwrite (buf, 1, sizeof (buf), fp) != sizeof (buf))
       {
 	printf ("`fwrite' failed: %m\n");
@@ -40,7 +40,7 @@ main (void)
   assert (ps + 1000 < c * sizeof (buf));
 
   /* First try something which is not allowed: map at an offset which is
-     not module the pagesize.  */
+     not modulo the pagesize.  */
   ptr = mmap (NULL, 1000, PROT_READ, MAP_SHARED, fd, ps - 1);
   if (ptr != MAP_FAILED)
     {