Index: string/test-strcat.c
===================================================================
RCS file: /cvs/glibc/libc/string/test-strcat.c,v
retrieving revision 1.4
diff -p -u -w -r1.4 test-strcat.c
--- string/test-strcat.c	27 Dec 2005 22:49:50 -0000	1.4
+++ string/test-strcat.c	11 May 2006 21:32:09 -0000
@@ -91,15 +91,15 @@ do_test (size_t align1, size_t align2, s
   if (align2 + len1 + len2 >= page_size)
     return;
 
-  s1 = (char *) (buf1 + align1);
-  s2 = (char *) (buf2 + align2);
+  s1 = (char *) (buf1 + page_size - ((len1 + 1 + align1 + 7) / 8) * 8 + align1);
+  s2 = (char *) (buf2 + page_size - ((len2 + len1 + 1 + align2 + 7) / 8) * 8 + align2);
 
   for (i = 0; i < len1; ++i)
-    s1[i] = 32 + 23 * i % (max_char - 32);
+    s1[i] = ' ' + 23 * i % (max_char - ' ');
   s1[len1] = '\0';
 
   for (i = 0; i < len2; i++)
-    s2[i] = 32 + 23 * i % (max_char - 32);
+    s2[i] = ' ' + 23 * i % (max_char - ' ');
 
   if (HP_TIMING_AVAIL)
     printf ("Length %4zd/%4zd, alignment %2zd/%2zd:", len1, len2, align1, align2);
Index: string/test-strchr.c
===================================================================
RCS file: /cvs/glibc/libc/string/test-strchr.c,v
retrieving revision 1.4
diff -p -u -w -r1.4 test-strchr.c
--- string/test-strchr.c	27 Dec 2005 22:49:50 -0000	1.4
+++ string/test-strchr.c	11 May 2006 21:32:09 -0000
@@ -84,27 +84,29 @@ static void
 do_test (size_t align, size_t pos, size_t len, int seek_char, int max_char)
 {
   size_t i;
-  char *result;
+  char *s1, *result;
 
   align &= 7;
   if (align + len >= page_size)
     return;
 
+  s1 = (char *) (buf1 + page_size - ((len + 1 + align + 7) / 8) * 8 + align);
+
   for (i = 0; i < len; ++i)
     {
-      buf1[align + i] = 32 + 23 * i % (max_char - 32);
-      if (buf1[align + i] == seek_char)
-        buf1[align + i] = seek_char + 1;
+      s1[i] = ' ' + 23 * i % (max_char - ' ');
+      if (s1[i] == seek_char)
+        s1[i] = seek_char + 1;
     }
-  buf1[align + len] = 0;
+  s1[len] = 0;
 
   if (pos < len)
     {
-      buf1[align + pos] = seek_char;
-      result = (char *) (buf1 + align + pos);
+      s1[pos] = seek_char;
+      result = s1 + pos;
     }
   else if (seek_char == 0)
-    result = (char *) (buf1 + align + len);
+    result = s1 + len;
   else
     result = NULL;
 
@@ -112,7 +114,7 @@ do_test (size_t align, size_t pos, size_
     printf ("Length %4zd, alignment %2zd:", pos, align);
 
   FOR_EACH_IMPL (impl, 0)
-    do_one_test (impl, (char *) (buf1 + align), seek_char, result);
+    do_one_test (impl, s1, seek_char, result);
 
   if (HP_TIMING_AVAIL)
     putchar ('\n');
Index: string/test-strcmp.c
===================================================================
RCS file: /cvs/glibc/libc/string/test-strcmp.c,v
retrieving revision 1.5
diff -p -u -w -r1.5 test-strcmp.c
--- string/test-strcmp.c	27 Dec 2005 22:49:50 -0000	1.5
+++ string/test-strcmp.c	11 May 2006 21:32:09 -0000
@@ -103,8 +103,8 @@ do_test (size_t align1, size_t align2, s
   if (align2 + len + 1 >= page_size)
     return;
 
-  s1 = (char *) (buf1 + align1);
-  s2 = (char *) (buf2 + align2);
+  s1 = (char *) (buf1 + page_size - ((len + 1 + 1 + align1 + 7) / 8) * 8 + align1);
+  s2 = (char *) (buf2 + page_size - ((len + 1 + 1 + align2 + 7) / 8) * 8 + align2);
 
   for (i = 0; i < len; i++)
     s1[i] = s2[i] = 1 + 23 * i % max_char;
Index: string/test-strcpy.c
===================================================================
RCS file: /cvs/glibc/libc/string/test-strcpy.c,v
retrieving revision 1.3
diff -p -u -w -r1.3 test-strcpy.c
--- string/test-strcpy.c	27 Dec 2005 22:49:50 -0000	1.3
+++ string/test-strcpy.c	11 May 2006 21:32:09 -0000
@@ -92,11 +92,11 @@ do_test (size_t align1, size_t align2, s
   if (align2 + len >= page_size)
     return;
 
-  s1 = (char *) (buf1 + align1);
-  s2 = (char *) (buf2 + align2);
+  s1 = (char *) (buf1 + page_size - ((len + 1 + align1 + 7) / 8) * 8 + align1);
+  s2 = (char *) (buf2 + page_size - ((len + 1 + align2 + 7) / 8) * 8 + align2);
 
   for (i = 0; i < len; i++)
-    s1[i] = 32 + 23 * i % (max_char - 32);
+    s1[i] = ' ' + 23 * i % (max_char - ' ');
   s1[len] = 0;
 
   if (HP_TIMING_AVAIL)
Index: string/test-strlen.c
===================================================================
RCS file: /cvs/glibc/libc/string/test-strlen.c,v
retrieving revision 1.3
diff -p -u -w -r1.3 test-strlen.c
--- string/test-strlen.c	27 Dec 2005 22:49:50 -0000	1.3
+++ string/test-strlen.c	11 May 2006 21:32:09 -0000
@@ -79,20 +79,23 @@ static void
 do_test (size_t align, size_t len, int max_char)
 {
   size_t i;
+  char *s1;
 
   align &= 7;
   if (align + len >= page_size)
     return;
 
+  s1 = (char *) (buf1 + page_size - ((len + 1 + align + 7) / 8) * 8 + align);
+
   for (i = 0; i < len; ++i)
-    buf1[align + i] = 1 + 7 * i % max_char;
-  buf1[align + len] = 0;
+    s1[i] = 1 + 7 * i % max_char;
+  s1[len] = 0;
 
   if (HP_TIMING_AVAIL)
     printf ("Length %4zd, alignment %2zd:", len, align);
 
   FOR_EACH_IMPL (impl, 0)
-    do_one_test (impl, (char *) (buf1 + align), len);
+    do_one_test (impl, s1, len);
 
   if (HP_TIMING_AVAIL)
     putchar ('\n');
Index: string/test-strncmp.c
===================================================================
RCS file: /cvs/glibc/libc/string/test-strncmp.c,v
retrieving revision 1.7
diff -p -u -w -r1.7 test-strncmp.c
Index: string/test-strncpy.c
===================================================================
RCS file: /cvs/glibc/libc/string/test-strncpy.c,v
retrieving revision 1.6
diff -p -u -w -r1.6 test-strncpy.c
--- string/test-strncpy.c	27 Dec 2005 22:49:50 -0000	1.6
+++ string/test-strncpy.c	11 May 2006 21:32:09 -0000
@@ -124,14 +124,14 @@ do_test (size_t align1, size_t align2, s
   if (align2 + len >= page_size)
     return;
 
-  s1 = (char *) (buf1 + align1);
-  s2 = (char *) (buf2 + align2);
+  s1 = (char *) (buf1 + page_size - (((len + 1 > n? len + 1: n) + 1 + align1 + 7) / 8) * 8 + align1);
+  s2 = (char *) (buf2 + page_size - (((len + 1 > n? len + 1: n) + 1 + align2 + 7) / 8) * 8 + align2);
 
   for (i = 0; i < len; ++i)
-    s1[i] = 32 + 23 * i % (max_char - 32);
+    s1[i] = ' ' + 23 * i % (max_char - ' ');
   s1[len] = 0;
-  for (i = len + 1; i + align1 < page_size && i < len + 64; ++i)
-    s1[i] = 32 + 32 * i % (max_char - 32);
+  for (i = len + 1; s1 + i < buf1 + page_size && i < len + 64; ++i)
+    s1[i] = ' ' + 32 * i % (max_char - ' ');
 
   if (HP_TIMING_AVAIL)
     printf ("Length %4zd, n %4zd, alignment %2zd/%2zd:", len, n, align1, align2);
