]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
string/tester memrchr test
authorAlan Modra <amodra@gmail.com>
Sat, 17 Aug 2013 09:08:26 +0000 (18:38 +0930)
committerAlan Modra <amodra@gmail.com>
Fri, 4 Oct 2013 01:12:15 +0000 (10:42 +0930)
http://sourceware.org/ml/libc-alpha/2013-08/msg00095.html

I found this useful at one stage when I was seeing a huge number of
memrchr failures all of test number 10.

* string/tester.c (test_memrchr): Increment reported test cycle.

ChangeLog
string/tester.c

index a1c6f5ce1f84008364e493678aa55bc563158d21..89fb3effa1a4e337f1718a5174926e2b7c3a0c10 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2013-10-04  Alan Modra  <amodra@gmail.com>
+
+       * string/tester.c (test_memrchr): Increment reported test cycle.
+
 2013-10-04  Alan Modra  <amodra@gmail.com>
 
        * string/test-memcpy.c (do_one_test): When reporting errors, print
index 2fe520caf12eef5b73b6cfea32d64091fe02608c..f1ea4381d4751a0b48a70a4dbe51fb656e14979b 100644 (file)
@@ -704,7 +704,7 @@ test_memrchr (void)
      more than 128 byte chunks: */
   {
     char buf[128 + sizeof(long)];
-    long align, len, i, pos;
+    long align, len, i, pos, n = 9;
 
     for (align = 0; align < (long) sizeof(long); ++align) {
       for (len = 0; len < (long) (sizeof(buf) - align); ++len) {
@@ -715,9 +715,9 @@ test_memrchr (void)
 #if 0
          printf("align %d, len %d, pos %d\n", align, len, pos);
 #endif
-         check(memrchr(buf + align, 'x', len) == buf + align + pos, 9);
+         check(memrchr(buf + align, 'x', len) == buf + align + pos, n++);
          check(memrchr(buf + align + pos + 1, 'x', len - (pos + 1)) == NULL,
-               10);
+               n++);
          buf[align + pos] = '-';
        }
       }