From: Sunil K Pandey <skpgkp2@gmail.com>
To: libc-alpha@sourceware.org
Subject: [PATCH] String: Improve test coverage for memchr
Date: Mon, 10 Oct 2022 09:48:42 -0700 [thread overview]
Message-ID: <20221010164842.453596-1-skpgkp2@gmail.com> (raw)
This test improves memchr coverage near page boundary.
---
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 ();
--
2.36.1
next reply other threads:[~2022-10-10 16:48 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-10 16:48 Sunil K Pandey [this message]
2022-10-10 16:52 ` H.J. Lu
2022-10-18 6:30 [PATCH v5] x86_64: Implement evex512 version of memchr, rawmemchr and wmemchr Noah Goldstein
2022-10-18 7:44 ` [PATCH] String: Improve test coverage for memchr Sunil K Pandey
2022-10-18 15:44 ` H.J. Lu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221010164842.453596-1-skpgkp2@gmail.com \
--to=skpgkp2@gmail.com \
--cc=libc-alpha@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).