mirror of
git://sourceware.org/git/glibc.git
synced 2024-11-21 01:12:26 +08:00
string: Expand page cross test cases in test-strcmp.c
Test cases for when both `s1` and `s2` are near the end of a page where previously missing. Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
This commit is contained in:
parent
d154758e61
commit
22833848e3
@ -392,7 +392,7 @@ check3 (void)
|
||||
int
|
||||
test_main (void)
|
||||
{
|
||||
size_t i, j;
|
||||
size_t i, j, k;
|
||||
const size_t test_len = MIN(TEST_LEN, 3 * 4096);
|
||||
test_init ();
|
||||
check();
|
||||
@ -453,6 +453,19 @@ test_main (void)
|
||||
do_test (j, getpagesize () - j - 1, i, 127, 1);
|
||||
do_test (j, getpagesize () - j - 1, i, 127, -1);
|
||||
|
||||
for (k = 2; k <= 128; k += k)
|
||||
{
|
||||
do_test (getpagesize () - k, getpagesize () - j - 1, i, 127, 0);
|
||||
do_test (getpagesize () - k - 1, getpagesize () - j - 1, i, 127,
|
||||
0);
|
||||
do_test (getpagesize () - k, getpagesize () - j - 1, i, 127, 1);
|
||||
do_test (getpagesize () - k - 1, getpagesize () - j - 1, i, 127,
|
||||
1);
|
||||
do_test (getpagesize () - k, getpagesize () - j - 1, i, 127, -1);
|
||||
do_test (getpagesize () - k - 1, getpagesize () - j - 1, i, 127,
|
||||
-1);
|
||||
}
|
||||
|
||||
if (i < 32)
|
||||
{
|
||||
i += 1;
|
||||
|
Loading…
Reference in New Issue
Block a user