diff options
author | Sunil K Pandey <skpgkp2@gmail.com> | 2022-10-10 09:28:14 -0700 |
---|---|---|
committer | Sunil K Pandey <skpgkp2@gmail.com> | 2022-10-10 10:07:10 -0700 |
commit | 264db94040c463d9bc356101595d89335586875e (patch) | |
tree | 5ad1de2a0145554678ff9be1861462ff28d76043 /string | |
parent | 5355f9ca7b10183ce06e8a18003ba30f43774858 (diff) | |
download | glibc-264db94040c463d9bc356101595d89335586875e.tar.gz glibc-264db94040c463d9bc356101595d89335586875e.tar.xz glibc-264db94040c463d9bc356101595d89335586875e.zip |
String: Improve test coverage for memchr
This test improves memchr coverage near page boundary. Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
Diffstat (limited to 'string')
-rw-r--r-- | string/test-memchr.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/string/test-memchr.c b/string/test-memchr.c index 279a67ebe6..1cbcd57fd4 100644 --- a/string/test-memchr.c +++ b/string/test-memchr.c @@ -247,8 +247,11 @@ test_main (void) /* BZ#21182 - wrong overflow calculation for i686 implementation with address near end of the page. */ for (i = 2; i < 16; ++i) - /* page_size is in fact getpagesize() * 2. */ - do_test (page_size / 2 - i, i, i, 1, 0x9B); + { + /* 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_random_tests (); do_overflow_tests (); |