]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
String: Improve test coverage for memchr
authorSunil K Pandey <skpgkp2@gmail.com>
Tue, 18 Oct 2022 07:36:51 +0000 (00:36 -0700)
committerSunil K Pandey <skpgkp2@gmail.com>
Tue, 18 Oct 2022 16:10:33 +0000 (09:10 -0700)
This test improves memchr coverage near page boundary.

Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
string/test-memchr.c

index 1cbcd57fd43ae0f3cf2d2b855cfa5ba6280f1191..ab206e05db3dfe42c9d8b46ba7d89d9b45f7a820 100644 (file)
@@ -251,6 +251,7 @@ test_main (void)
       /* page_size is in fact getpagesize() * 2.  */
       do_test (page_size / 2 - i, i, i, 1, 0x9B);
       do_test (page_size / 2 - i, i - 1, i - 1, 1, 0x9B);
+      do_test (page_size / 2 - (i * 4), i + 128, i + 128, i, 0x9B);
     }
 
   do_random_tests ();