String: Improve test coverage for memchr

This test improves memchr coverage near page boundary.

Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
This commit is contained in:
Sunil K Pandey 2022-10-10 09:28:14 -07:00
parent 5355f9ca7b
commit 264db94040

View File

@ -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 ();