projects
/
platform
/
upstream
/
glibc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5355f9c
)
String: Improve test coverage for memchr
author
Sunil K Pandey
<skpgkp2@gmail.com>
Mon, 10 Oct 2022 16:28:14 +0000
(09:28 -0700)
committer
Sunil K Pandey
<skpgkp2@gmail.com>
Mon, 10 Oct 2022 17:07:10 +0000
(10:07 -0700)
This test improves memchr coverage near page boundary.
Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
string/test-memchr.c
patch
|
blob
|
history
diff --git
a/string/test-memchr.c
b/string/test-memchr.c
index
279a67e
..
1cbcd57
100644
(file)
--- 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 ();