This is the mail archive of the
glibc-cvs@sourceware.org
mailing list for the glibc project.
GNU C Library master sources branch master updated. glibc-2.25-428-g4615f5a
- From: hjl at sourceware dot org
- To: glibc-cvs at sourceware dot org
- Date: 8 Jun 2017 16:56:09 -0000
- Subject: GNU C Library master sources branch master updated. glibc-2.25-428-g4615f5a
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".
The branch, master has been updated
via 4615f5aefeaa45345484a9ce8e3d0ea977c80d80 (commit)
from 5e1122827a9f9751922b25c332f8f0272de60719 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=4615f5aefeaa45345484a9ce8e3d0ea977c80d80
commit 4615f5aefeaa45345484a9ce8e3d0ea977c80d80
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Thu Jun 8 09:55:48 2017 -0700
Add more tests for memchr
This patch adds tests for len == 0 and tests for positions close to the
beginning, which are equivalent to positions close to the end for memchr.
* string/test-memrchr.c (test_main): Add tests for len == 0
and tests for positions close to the beginning, which are
equivalent to positions close to the end for memchr.
diff --git a/ChangeLog b/ChangeLog
index bbc21ab..bd530a8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2017-06-08 H.J. Lu <hongjiu.lu@intel.com>
+
+ * string/test-memrchr.c (test_main): Add tests for len == 0
+ and tests for positions close to the beginning, which are
+ equivalent to positions close to the end for memchr.
+
2017-06-07 H.J. Lu <hongjiu.lu@intel.com>
* sysdeps/x86_64/multiarch/ifunc-impl-list.c: Update
diff --git a/string/test-memrchr.c b/string/test-memrchr.c
index bfc9920..15483f5 100644
--- a/string/test-memrchr.c
+++ b/string/test-memrchr.c
@@ -151,15 +151,32 @@ test_main (void)
for (i = 1; i < 8; ++i)
{
+ /* Test len == 0. */
+ do_test (i, i, 0, 0);
+ do_test (i, i, 0, 23);
+
do_test (0, 16 << i, 2048, 23);
do_test (i, 64, 256, 23);
do_test (0, 16 << i, 2048, 0);
do_test (i, 64, 256, 0);
+
+ do_test (0, i, 256, 23);
+ do_test (0, i, 256, 0);
+ do_test (i, i, 256, 23);
+ do_test (i, i, 256, 0);
+
}
for (i = 1; i < 32; ++i)
{
do_test (0, i, i + 1, 23);
do_test (0, i, i + 1, 0);
+ do_test (i, i, i + 1, 23);
+ do_test (i, i, i + 1, 0);
+
+ do_test (0, 1, i + 1, 23);
+ do_test (0, 2, i + 1, 0);
+ do_test (i, 1, i + 1, 23);
+ do_test (i, 2, i + 1, 0);
}
do_random_tests ();
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 6 ++++++
string/test-memrchr.c | 17 +++++++++++++++++
2 files changed, 23 insertions(+), 0 deletions(-)
hooks/post-receive
--
GNU C Library master sources