public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
* [glibc] String: Improve test coverage for memchr
@ 2022-10-10 17:43 Sunil Pandey
0 siblings, 0 replies; 2+ messages in thread
From: Sunil Pandey @ 2022-10-10 17:43 UTC (permalink / raw)
To: glibc-cvs
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=264db94040c463d9bc356101595d89335586875e
commit 264db94040c463d9bc356101595d89335586875e
Author: Sunil K Pandey <skpgkp2@gmail.com>
Date: Mon Oct 10 09:28:14 2022 -0700
String: Improve test coverage for memchr
This test improves memchr coverage near page boundary.
Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
Diff:
---
string/test-memchr.c | 7 +++++--
1 file 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 ();
^ permalink raw reply [flat|nested] 2+ messages in thread
* [glibc] String: Improve test coverage for memchr
@ 2022-10-18 16:11 Sunil Pandey
0 siblings, 0 replies; 2+ messages in thread
From: Sunil Pandey @ 2022-10-18 16:11 UTC (permalink / raw)
To: glibc-cvs
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=932dd83efdce7dbe7c008a27c4eff424a109b3a0
commit 932dd83efdce7dbe7c008a27c4eff424a109b3a0
Author: Sunil K Pandey <skpgkp2@gmail.com>
Date: Tue Oct 18 00:36:51 2022 -0700
String: Improve test coverage for memchr
This test improves memchr coverage near page boundary.
Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
Diff:
---
string/test-memchr.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/string/test-memchr.c b/string/test-memchr.c
index 1cbcd57fd4..ab206e05db 100644
--- a/string/test-memchr.c
+++ b/string/test-memchr.c
@@ -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 ();
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-10-18 16:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-10 17:43 [glibc] String: Improve test coverage for memchr Sunil Pandey
2022-10-18 16:11 Sunil Pandey
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).